/*
Theme Name: HostGemini
Theme URI: https://hostgemini.com
Author: HostGemini
Description: HostGemini — Web Hosting & Tech Hub. Expert web hosting guides, tutorials, and tech tips.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: hostgemini
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* =========================================
   CSS VARIABLES — Light Mode (default)
   ========================================= */
:root {
  --background: hsl(230, 30%, 97%);
  --foreground: hsl(230, 50%, 8%);
  --primary: hsl(248, 90%, 60%);
  --primary-hover: hsl(248, 85%, 55%);
  --violet: hsl(270, 85%, 65%);
  --border: hsl(214, 32%, 91%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222, 84%, 5%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --accent: hsl(210, 40%, 96%);
  --ring: hsl(248, 90%, 60%);

  /* Glass */
  --glass-bg: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.3);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);

  /* Hero gradient */
  --hero-from: rgba(99, 102, 241, 0.08);
  --hero-to: rgba(139, 92, 246, 0.06);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', sans-serif;

  /* Radius */
  --radius: 0.5rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

/* Dark Mode */
.dark,
[data-theme="dark"] {
  --background: hsl(230, 20%, 8%);
  --foreground: hsl(210, 40%, 98%);
  --border: rgba(255,255,255,0.08);
  --card: hsl(230, 20%, 11%);
  --card-foreground: hsl(210, 40%, 98%);
  --muted: hsl(230, 18%, 15%);
  --muted-foreground: hsl(215, 20%, 55%);
  --accent: hsl(230, 18%, 15%);

  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.08);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4);

  --hero-from: rgba(99, 102, 241, 0.15);
  --hero-to: rgba(139, 92, 246, 0.1);
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* =========================================
   GLASS MORPHISM
   ========================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow blobs */
.site-wrapper::before,
.site-wrapper::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.site-wrapper::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: -200px; left: -200px;
}
.site-wrapper::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  bottom: -150px; right: -150px;
}

main { flex: 1; position: relative; z-index: 1; }

/* =========================================
   HEADER / NAV
   ========================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: all .3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.site-logo svg { width: 28px; height: 28px; }

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: .875rem;
  font-weight: 500;
}
.main-nav a {
  color: rgba(var(--foreground-rgb, 230,50,8), 0.75);
  color: color-mix(in srgb, var(--foreground) 75%, transparent);
  position: relative;
  transition: color .2s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .2s;
}
.main-nav a:hover,
.main-nav a.current { color: var(--primary); }
.main-nav a:hover::after { width: 100%; }

/* Resources dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  background: none; border: none; padding: 0;
  font-size: .875rem; font-weight: 500;
  color: color-mix(in srgb, var(--foreground) 75%, transparent);
  cursor: pointer; transition: color .2s;
  display: flex; align-items: center; gap: 4px;
}
.nav-dropdown-trigger:hover { color: var(--primary); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--glass-shadow);
  display: none;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 8px 12px;
  border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  color: var(--foreground);
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:hover {
  background: rgba(99,102,241,0.1);
  color: var(--primary);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  transition: all .2s;
}
.theme-toggle:hover { color: var(--primary); background: rgba(99,102,241,0.1); }
.theme-toggle svg { width: 16px; height: 16px; }

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  align-items: center; justify-content: center;
  color: var(--foreground);
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  color: var(--foreground);
  transition: background .15s, color .15s;
}
.mobile-nav a:hover { background: rgba(99,102,241,0.1); color: var(--primary); }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 28px;
  border-radius: var(--radius-xl);
  font-weight: 600; font-size: .9rem;
  font-family: var(--font-sans);
  transition: all .2s; border: none; cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--foreground);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }
.btn-lg { padding: 14px 32px; font-size: 1rem; height: 56px; }
.btn-sm { padding: 8px 18px; font-size: .82rem; }

/* =========================================
   HERO GRADIENT
   ========================================= */
.hero-gradient {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  padding: 80px 24px 60px;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
}
.hero-gradient::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  position: relative; z-index: 1;
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 7fr 5fr; }
  .hero-gradient { padding: 120px 24px 80px; }
}

/* Hero badges */
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px;
}
.hero-badge {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .04em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--muted-foreground);
}
.hero-badge.accent { color: var(--primary); }

/* Hero headline */
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--foreground);
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.15rem;
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
  margin-bottom: 36px;
  max-width: 600px;
  line-height: 1.75;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* Featured article card on hero right */
.hero-featured-card {
  border-radius: var(--radius-2xl);
  overflow: hidden;
}
.hero-card-accent-bar {
  height: 4px;
  background: linear-gradient(to right, var(--primary), #a78bfa);
}
.hero-card-body { padding: 28px; }
.hero-card-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.hero-card-meta .cat-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--primary);
}
.hero-card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.hero-card-meta .read-time { font-size: .75rem; color: var(--muted-foreground); }
.hero-card-title {
  font-size: 1.5rem; font-weight: 800; line-height: 1.3;
  margin-bottom: 12px;
  transition: color .2s;
}
.hero-card-title:hover { color: var(--primary); }
.hero-card-excerpt {
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
  font-size: .9rem; line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}
.author-chip { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: var(--primary);
  border: 1.5px solid rgba(99,102,241,0.3);
}
.author-name { font-size: .875rem; font-weight: 600; }
.author-date { font-size: .75rem; color: var(--muted-foreground); }
.card-arrow-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(99,102,241,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); transition: all .2s;
}
.card-arrow-btn:hover { background: var(--primary); color: #fff; transform: translateX(2px); }

/* =========================================
   AD SLOTS
   ========================================= */
.ad-slot {
  border: 2px dashed rgba(99,102,241,0.2);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: color-mix(in srgb, var(--muted-foreground) 60%, transparent);
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  background: var(--glass-bg);
  position: relative; overflow: hidden;
}
.ad-slot:hover { border-color: rgba(99,102,241,0.4); }
.ad-leaderboard { width: 100%; max-width: 728px; height: 90px; margin: 0 auto; }
.ad-sidebar { width: 100%; max-width: 300px; height: 300px; margin: 0 auto; }
.ad-inline { width: 100%; height: 90px; }
.ad-slot svg { width: 20px; height: 20px; opacity: .5; }

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 8px;
}
.section-subtitle { font-size: 1.05rem; color: var(--muted-foreground); }
.section-header-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 40px;
}

/* =========================================
   CATEGORY GRID (homepage)
   ========================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

.category-card {
  padding: 28px 20px;
  border-radius: var(--radius-2xl);
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  transition: all .3s; position: relative; overflow: hidden;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(99,102,241,0.2);
}
.category-icon {
  width: 60px; height: 60px; border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  border: 1px solid var(--glass-border);
  transition: transform .3s;
}
.dark .category-icon { background: rgba(0,0,0,0.2); }
.category-card:hover .category-icon { transform: scale(1.1); }
.category-icon svg { width: 28px; height: 28px; }
.category-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; transition: color .2s; }
.category-card:hover .category-name { color: var(--primary); }
.category-count { font-size: .82rem; color: var(--muted-foreground); font-weight: 500; }

/* Category colors */
.cat-hosting { color: #6366f1; }
.cat-wordpress { color: #3b82f6; }
.cat-security { color: #10b981; }
.cat-seo { color: #f59e0b; }
.cat-domain { color: #8b5cf6; }
.cat-cloud { color: #06b6d4; }
.cat-email { color: #ec4899; }
.cat-ecommerce { color: #f97316; }

/* =========================================
   ARTICLE GRID
   ========================================= */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Article card */
.article-card {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: all .3s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(99,102,241,0.2);
}
.article-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--primary), #a78bfa);
  opacity: 0; transition: opacity .3s; z-index: 2;
}
.article-card:hover::before { opacity: 1; }
.article-card-img {
  height: 180px; overflow: hidden;
}
.article-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.article-card:hover .article-card-img img { transform: scale(1.06); }
.article-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.article-card-body {
  padding: 22px 22px 8px;
  flex: 1;
}
.article-card-cat {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); display: block; margin-bottom: 10px;
}
.article-card-title {
  font-size: 1.1rem; font-weight: 700; line-height: 1.4;
  margin-bottom: 0; color: var(--foreground); transition: color .2s;
}
.article-card-title:hover { color: var(--primary); }
.article-card-excerpt {
  flex: 1; padding: 0 22px 16px;
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
  font-size: .875rem; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.dark .article-card-footer { background: rgba(0,0,0,0.08); }
.mini-author { display: flex; align-items: center; gap: 10px; }
.mini-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .65rem; color: var(--primary);
  border: 1px solid rgba(99,102,241,0.25);
}
.mini-author-name { font-size: .78rem; font-weight: 600; }
.mini-author-date { font-size: .72rem; color: var(--muted-foreground); }
.read-more-link {
  font-size: .8rem; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 4px; transition: gap .2s;
}
.read-more-link:hover { gap: 8px; }
.read-more-link svg { width: 13px; height: 13px; }

/* =========================================
   NEWSLETTER SECTION
   ========================================= */
.newsletter-section {
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.08) 100%);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-2xl);
  padding: 56px 48px;
  text-align: center;
  position: relative; overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -100px; right: -50px; pointer-events: none;
}
.newsletter-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800; margin-bottom: 10px;
}
.newsletter-desc {
  color: var(--muted-foreground);
  max-width: 480px; margin: 0 auto 28px;
  font-size: .95rem; line-height: 1.7;
}
.newsletter-form {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: 13px 18px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--foreground); font-size: .9rem;
  font-family: var(--font-sans);
  outline: none; transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-privacy {
  font-size: .78rem; color: var(--muted-foreground); margin-top: 12px;
}
.newsletter-privacy a { color: var(--primary); }
@media (max-width: 600px) {
  .newsletter-section { padding: 36px 24px; }
  .newsletter-form { flex-direction: column; }
}

/* =========================================
   POPULAR POSTS SECTION (homepage)
   ========================================= */
.popular-posts-section { background: var(--muted); border-radius: var(--radius-2xl); padding: 48px; }
@media (max-width: 640px) { .popular-posts-section { padding: 28px 20px; } }

.popular-posts-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .popular-posts-grid { grid-template-columns: repeat(3, 1fr); }
}
.popular-post-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius-xl);
  transition: background .2s;
}
.popular-post-item:hover { background: rgba(99,102,241,0.06); }
.popular-post-num {
  font-size: 1.5rem; font-weight: 900; color: rgba(99,102,241,0.2);
  flex-shrink: 0; line-height: 1;
}
.popular-post-title {
  font-size: .9rem; font-weight: 600; line-height: 1.4;
  color: var(--foreground); transition: color .2s; margin-bottom: 4px;
}
.popular-post-title:hover { color: var(--primary); }
.popular-post-meta { font-size: .77rem; color: var(--muted-foreground); }

/* =========================================
   BLOG PAGE
   ========================================= */
.blog-hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding: 64px 24px 48px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.blog-hero-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.blog-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900; letter-spacing: -.03em; margin-bottom: 12px;
}
.blog-hero-desc { font-size: 1.05rem; color: var(--muted-foreground); margin-bottom: 32px; }
.blog-search-wrap {
  position: relative; max-width: 480px; margin: 0 auto;
}
.blog-search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground); width: 16px; height: 16px; pointer-events: none;
}
.blog-search {
  width: 100%; padding: 13px 16px 13px 44px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--foreground);
  font-size: .9rem; font-family: var(--font-sans);
  outline: none; transition: border-color .2s;
}
.blog-search:focus { border-color: var(--primary); }

/* Category filter pills */
.cat-filter-wrap {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.cat-filter-btn {
  padding: 6px 16px; border-radius: 100px;
  font-size: .82rem; font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--muted-foreground);
  transition: all .15s; cursor: pointer;
  font-family: var(--font-sans);
}
.cat-filter-btn:hover,
.cat-filter-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,0.08);
}

/* =========================================
   SINGLE ARTICLE
   ========================================= */
.article-hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding: 64px 24px 0;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.article-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--muted-foreground); margin-bottom: 20px;
}
.article-breadcrumb a { color: var(--primary); }
.article-breadcrumb svg { width: 12px; height: 12px; }
.article-hero-inner { max-width: 820px; margin: 0 auto; }
.article-cat-tag {
  display: inline-block;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: rgba(99,102,241,0.12);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 16px;
}
.article-title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 900; letter-spacing: -.03em;
  line-height: 1.2; margin-bottom: 20px;
}
.article-meta-row {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 36px;
}
.article-meta-author { display: flex; align-items: center; gap: 10px; }
.article-author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: var(--primary);
  border: 2px solid rgba(99,102,241,0.25);
}
.article-author-name { font-size: .875rem; font-weight: 600; }
.article-meta-divider { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.article-meta-date,
.article-meta-read { font-size: .82rem; color: var(--muted-foreground); display: flex; align-items: center; gap: 5px; }
.article-meta-read svg,
.article-meta-date svg { width: 13px; height: 13px; }

/* Featured image */
.article-featured-img {
  width: 100%; max-width: 820px; margin: 0 auto;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  overflow: hidden; height: 400px;
}
.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .article-featured-img { height: 240px; } }

/* Article body layout */
.article-body-wrap {
  display: grid; grid-template-columns: 1fr;
  gap: 40px; padding: 40px 24px 72px;
}
@media (min-width: 1024px) {
  .article-body-wrap { grid-template-columns: 1fr 300px; }
}

/* Article content typography */
.article-content {
  max-width: 820px;
  font-size: 1.0625rem; line-height: 1.85;
  color: var(--foreground);
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 800; letter-spacing: -.025em; margin: 2.5em 0 1em; color: var(--foreground);
}
.article-content h2 { font-size: 1.65rem; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.article-content h3 { font-size: 1.3rem; }
.article-content h4 { font-size: 1.1rem; }
.article-content p { margin-bottom: 1.5em; }
.article-content strong { font-weight: 700; color: var(--foreground); }
.article-content em { font-style: italic; }
.article-content ul,
.article-content ol { margin: 1.25em 0 1.25em 1.5em; }
.article-content li { margin-bottom: .6em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px; margin: 2em 0;
  background: rgba(99,102,241,0.06); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.article-content code {
  background: rgba(99,102,241,0.1); padding: 2px 8px; border-radius: 4px;
  font-family: 'Menlo', monospace; font-size: .9em;
}
.article-content pre {
  background: var(--muted); padding: 20px; border-radius: var(--radius-xl);
  overflow-x: auto; margin: 1.5em 0;
}
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Article sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  border-radius: var(--radius-xl);
  padding: 24px;
}
.widget-title {
  font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* Related articles */
.related-post { display: flex; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.related-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.related-post-img { width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.related-post-img img { width: 100%; height: 100%; object-fit: cover; }
.related-post-title { font-size: .875rem; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.related-post-title a { color: var(--foreground); transition: color .2s; }
.related-post-title a:hover { color: var(--primary); }
.related-post-meta { font-size: .75rem; color: var(--muted-foreground); }

/* Table of Contents */
.toc-list { list-style: none; }
.toc-list li { padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.toc-list li:last-child { border-bottom: none; }
.toc-list a { color: var(--muted-foreground); transition: color .2s; display: flex; align-items: center; gap: 8px; }
.toc-list a:hover { color: var(--primary); }
.toc-list a svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Comment section */
.comments-section {
  border-top: 1px solid var(--border);
  padding-top: 48px; margin-top: 48px;
}
.comment-form-wrap { max-width: 620px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 11px 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--foreground);
  font-size: .9rem; font-family: var(--font-sans);
  outline: none; transition: border-color .2s;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--primary); }

/* Star rating */
.star-rating { display: flex; gap: 4px; margin-bottom: 6px; }
.star-btn {
  background: none; border: none; padding: 0;
  font-size: 1.4rem; cursor: pointer; color: var(--border); transition: color .15s;
}
.star-btn.active, .star-btn:hover { color: #f59e0b; }

/* Comments list */
.comment-item {
  display: flex; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comment-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: var(--primary);
  border: 2px solid rgba(99,102,241,0.2);
}
.comment-author { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.comment-meta { font-size: .78rem; color: var(--muted-foreground); margin-bottom: 8px; }
.comment-text { font-size: .9rem; line-height: 1.7; color: color-mix(in srgb, var(--foreground) 80%, transparent); }
.comment-stars { display: flex; gap: 2px; color: #f59e0b; font-size: .9rem; margin-bottom: 4px; }

/* =========================================
   ABOUT PAGE
   ========================================= */
.about-hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  padding: 80px 24px 72px;
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
}
.about-hero-title { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: 16px; }
.about-hero-desc { font-size: 1.2rem; color: var(--muted-foreground); max-width: 600px; margin: 0 auto; line-height: 1.75; }

/* Core values */
.values-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { padding: 32px; border-radius: var(--radius-2xl); }
.value-num {
  width: 52px; height: 52px; border-radius: var(--radius-xl);
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.25rem; color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid rgba(99,102,241,0.25);
  box-shadow: inset 0 2px 8px rgba(99,102,241,0.1);
}
.value-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.value-text { color: var(--muted-foreground); line-height: 1.75; font-size: .95rem; }

/* Team */
.team-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card { display: flex; flex-direction: column; gap: 20px; padding: 32px; border-radius: var(--radius-2xl); }
@media (min-width: 480px) { .team-card { flex-direction: row; } }
.team-avatar {
  width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.8rem; color: var(--primary);
  border: 2px solid rgba(99,102,241,0.3);
}
.team-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.team-role {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.team-bio { font-size: .9rem; color: var(--muted-foreground); line-height: 1.7; }

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; padding: 64px 24px;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.contact-form-card { border-radius: var(--radius-2xl); padding: 36px; }
.contact-info-card { border-radius: var(--radius-2xl); padding: 32px; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info-icon {
  width: 44px; height: 44px; border-radius: var(--radius-xl);
  background: rgba(99,102,241,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.contact-info-title { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.contact-info-text { font-size: .875rem; color: var(--muted-foreground); line-height: 1.6; }

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  border-top: 1px solid var(--glass-border);
  background: var(--card);
  position: relative; z-index: 1;
}
.footer-inner { padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand-desc { font-size: .875rem; color: var(--muted-foreground); margin: 20px 0 24px; line-height: 1.75; max-width: 280px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all .2s;
}
.footer-social:hover { color: var(--primary); background: rgba(99,102,241,0.1); }
.footer-social svg { width: 15px; height: 15px; }

.footer-col-title {
  font-size: 1rem; font-weight: 700; letter-spacing: -.01em;
  margin-bottom: 24px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.footer-links a {
  font-size: .875rem; color: var(--muted-foreground);
  display: flex; align-items: center; gap: 8px;
  transition: color .2s;
}
.footer-links a svg { width: 11px; height: 11px; transition: transform .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-links a:hover svg { transform: translateX(3px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-copyright { font-size: .875rem; color: var(--muted-foreground); }
.footer-craft {
  font-size: .875rem; color: var(--muted-foreground);
  display: flex; align-items: center; gap: 4px;
}
.footer-craft .star { color: var(--primary); }

/* =========================================
   SEARCH PAGE
   ========================================= */
.search-header {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--glass-border);
}
.search-result-card {
  display: grid; grid-template-columns: 1fr;
  border-radius: var(--radius-2xl); overflow: hidden;
  transition: all .2s;
}
@media (min-width: 600px) { .search-result-card { grid-template-columns: 200px 1fr; } }
.search-result-card:hover { transform: translateY(-3px); }
.search-result-img { min-height: 140px; overflow: hidden; }
.search-result-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.search-result-card:hover .search-result-img img { transform: scale(1.06); }
mark {
  background: rgba(99,102,241,0.15);
  color: var(--primary); border-radius: 3px; padding: 0 2px;
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 48px; flex-wrap: wrap;
}
.pagination a,
.pagination span {
  padding: 8px 16px; border-radius: var(--radius-xl);
  font-size: .875rem; font-weight: 600;
  border: 1.5px solid var(--border); color: var(--muted-foreground);
  transition: all .15s;
}
.pagination a:hover,
.pagination .current {
  border-color: var(--primary); color: var(--primary);
  background: rgba(99,102,241,0.08);
}

/* =========================================
   404 PAGE
   ========================================= */
.page-404 {
  text-align: center; padding: 120px 24px;
}
.page-404-code {
  font-size: 8rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}

/* =========================================
   CATEGORY PILL (inline badge)
   ========================================= */
.cat-pill {
  padding: 5px 14px; border-radius: 100px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(99,102,241,0.1); color: var(--primary);
  transition: all .15s;
}
.cat-pill:hover { background: rgba(99,102,241,0.2); }

/* =========================================
   UTILITIES
   ========================================= */
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.space-y-32 > * + * { margin-top: 32px; }
.section-pad { padding: 80px 24px; }
.section-pad-sm { padding: 48px 24px; }

/* Alert boxes */
.alert-success {
  background: #dcfce7; border: 1.5px solid #86efac;
  border-radius: var(--radius-xl); padding: 18px 22px;
  color: #166534; margin-bottom: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.alert-error {
  background: #fee2e2; border: 1.5px solid #fca5a5;
  border-radius: var(--radius-xl); padding: 18px 22px;
  color: #991b1b; margin-bottom: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}

/* Progress bar */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(to right, var(--primary), #a78bfa);
  z-index: 9999; transition: width .1s;
}

/* Back to top */
#back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  opacity: 0; pointer-events: none;
  transition: all .3s; cursor: pointer; z-index: 500;
}
#back-to-top.visible { opacity: 1; pointer-events: all; }
#back-to-top:hover { transform: translateY(-3px); background: var(--primary-hover); }
#back-to-top svg { width: 18px; height: 18px; }

/* =========================================
   RESPONSIVE HELPERS
   ========================================= */
@media (max-width: 640px) {
  .section-pad { padding: 56px 20px; }
  .section-pad-sm { padding: 32px 20px; }
  .container { padding: 0 16px; }
  .hero-gradient { padding: 72px 16px 52px; }
}

/* =========================================
   FLUID GLASS UPGRADE
   ========================================= */
:root {
  --glass-blur: blur(20px) saturate(180%);
  --glass-inner-glow: inset 0 1px 0 rgba(255,255,255,0.45);
  --btn-shadow-color: rgba(79,70,229,0.55);
  --nav-transition: cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] {
  --glass-inner-glow: inset 0 1px 0 rgba(255,255,255,0.08);
  --btn-shadow-color: rgba(99,102,241,0.5);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner-glow);
}
.glass {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

#site-header {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 0 var(--glass-border), 0 4px 24px rgba(0,0,0,0.06);
}
[data-theme="dark"] #site-header {
  box-shadow: 0 1px 0 var(--glass-border), 0 4px 24px rgba(0,0,0,0.3);
}

/* Stronger ambient blobs */
.site-wrapper::before {
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
}
.site-wrapper::after {
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
}

/* =========================================
   3D BUTTON SYSTEM
   ========================================= */
.btn {
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
  transform: translateY(0) translateZ(0);
  will-change: transform;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(155deg, hsl(248,90%,65%) 0%, hsl(258,85%,55%) 100%);
  box-shadow:
    0 4px 0 0 hsl(248,70%,42%),
    0 6px 20px var(--btn-shadow-color),
    var(--glass-inner-glow);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-primary:hover {
  background: linear-gradient(155deg, hsl(248,90%,68%) 0%, hsl(258,85%,58%) 100%);
  transform: translateY(-2px) translateZ(0);
  box-shadow:
    0 6px 0 0 hsl(248,70%,42%),
    0 10px 28px var(--btn-shadow-color),
    var(--glass-inner-glow);
}
.btn-primary:active {
  transform: translateY(3px) translateZ(0);
  box-shadow:
    0 1px 0 0 hsl(248,70%,42%),
    0 2px 8px var(--btn-shadow-color);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.btn-outline {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: var(--foreground);
  box-shadow: 0 2px 0 0 rgba(0,0,0,0.15), var(--glass-inner-glow);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 4px 0 0 rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.1), var(--glass-inner-glow);
}
.btn-outline:active {
  transform: translateY(2px) translateZ(0);
  box-shadow: 0 0px 0 0 rgba(0,0,0,0.1);
  transition: transform 0.06s ease;
}

/* 3D card arrow button */
.card-arrow-btn {
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  box-shadow: 0 2px 0 0 rgba(79,70,229,0.3), var(--glass-inner-glow);
  transition: all 0.12s ease;
}
.card-arrow-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px) translateY(-1px);
  box-shadow: 0 3px 0 0 hsl(248,70%,42%), 0 6px 16px var(--btn-shadow-color);
}
.card-arrow-btn:active {
  transform: translateX(2px) translateY(2px);
  box-shadow: 0 0px 0 0 hsl(248,70%,42%);
}

/* =========================================
   NAVIGATION ANIMATIONS
   ========================================= */

/* Smooth underline animation (keyframe variant) */
@keyframes nav-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav links — smoother hover */
.main-nav a {
  transition: color 0.2s var(--nav-transition);
  padding: 4px 0;
}
.main-nav a::after {
  border-radius: 2px;
  height: 2.5px;
  background: linear-gradient(to right, var(--primary), #a78bfa);
  transition: width 0.25s var(--nav-transition), opacity 0.2s;
}
.main-nav a:hover::after,
.main-nav a.current::after { width: 100%; opacity: 1; }

/* Dropdown — animated with opacity + transform instead of display toggle */
.nav-dropdown-menu {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top center;
  transition:
    opacity 0.2s var(--nav-transition),
    transform 0.2s var(--nav-transition);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.nav-dropdown-menu a {
  transform: translateX(-4px);
  opacity: 0.85;
  transition: background 0.15s, color 0.15s, transform 0.15s, opacity 0.15s;
}
.nav-dropdown-menu a:hover {
  transform: translateX(0);
  opacity: 1;
  background: rgba(99,102,241,0.1);
  color: var(--primary);
}

/* Logo hover animation */
.site-logo {
  transition: transform 0.2s var(--nav-transition), color 0.2s;
}
.site-logo:hover {
  transform: translateY(-1px);
}
.site-logo svg {
  transition: transform 0.3s var(--nav-transition);
}
.site-logo:hover svg {
  transform: rotate(15deg) scale(1.1);
}

/* Theme toggle — 3D micro interaction */
.theme-toggle {
  box-shadow: 0 2px 0 0 rgba(0,0,0,0.12), var(--glass-inner-glow);
  transition: all 0.15s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px) rotate(15deg);
  box-shadow: 0 4px 0 0 rgba(0,0,0,0.1), 0 6px 14px rgba(99,102,241,0.25);
}
.theme-toggle:active {
  transform: translateY(1px) rotate(-5deg);
}

/* =========================================
   CARD HOVER — 3D LIFT EFFECT
   ========================================= */
.article-card {
  transition: transform 0.25s var(--nav-transition), box-shadow 0.25s var(--nav-transition);
}
.article-card:hover {
  transform: translateY(-6px) translateZ(0);
  box-shadow:
    0 16px 48px rgba(99,102,241,0.2),
    0 4px 12px rgba(0,0,0,0.08),
    0 0 0 1px rgba(99,102,241,0.08);
}

.category-card {
  transition: transform 0.25s var(--nav-transition), box-shadow 0.25s var(--nav-transition);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04), var(--glass-inner-glow);
}
.category-card:hover {
  transform: translateY(-8px) translateZ(0);
  box-shadow:
    0 20px 48px rgba(99,102,241,0.22),
    0 4px 0 rgba(79,70,229,0.15),
    var(--glass-inner-glow);
}

/* =========================================
   PAGE ENTRANCE ANIMATIONS
   ========================================= */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-inner > * {
  animation: fade-up 0.6s var(--nav-transition) both;
}
.hero-inner > *:nth-child(2) { animation-delay: 0.1s; }

.category-card {
  animation: fade-up 0.5s var(--nav-transition) both;
}
.articles-grid .article-card-wrap:nth-child(1) { animation: fade-up 0.4s 0.05s var(--nav-transition) both; }
.articles-grid .article-card-wrap:nth-child(2) { animation: fade-up 0.4s 0.1s var(--nav-transition) both; }
.articles-grid .article-card-wrap:nth-child(3) { animation: fade-up 0.4s 0.15s var(--nav-transition) both; }
.articles-grid .article-card-wrap:nth-child(4) { animation: fade-up 0.4s 0.2s var(--nav-transition) both; }
.articles-grid .article-card-wrap:nth-child(5) { animation: fade-up 0.4s 0.25s var(--nav-transition) both; }
.articles-grid .article-card-wrap:nth-child(6) { animation: fade-up 0.4s 0.3s var(--nav-transition) both; }

/* =========================================
   WIDGET: RECENT POSTS BY CATEGORY
   ========================================= */
.hg-cat-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hg-cat-posts-item {
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
}
.hg-cat-posts-item:last-child { border-bottom: none; }

.hg-cat-posts-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  text-decoration: none;
  color: var(--foreground);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.hg-cat-posts-link:hover { color: var(--primary); }
.hg-cat-posts-link:hover .hg-cat-posts-thumb img {
  transform: scale(1.07);
}

.hg-cat-posts-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(99,102,241,0.1);
}
.hg-cat-posts-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.hg-cat-posts-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0.5;
}
.hg-cat-posts-thumb--placeholder svg { width: 24px; height: 24px; }

.hg-cat-posts-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.hg-cat-posts-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
}
.hg-cat-posts-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hg-cat-posts-meta {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Widget wrapper from register_sidebar */
.widget-hg_category_posts {
  border-radius: var(--radius-xl) !important;
}

/* =========================================
   HERO CARD & NEWSLETTER — GLASS UPGRADE
   ========================================= */
.hero-featured-card.glass-card {
  box-shadow:
    0 20px 60px rgba(99,102,241,0.2),
    0 4px 0 rgba(79,70,229,0.1),
    var(--glass-inner-glow);
}

.newsletter-section {
  border: 1px solid rgba(99,102,241,0.2);
  box-shadow: 0 4px 40px rgba(99,102,241,0.1), var(--glass-inner-glow);
}

/* =========================================
   READING PROGRESS — GRADIENT ANIMATION
   ========================================= */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
#reading-progress {
  background: linear-gradient(90deg, #6366f1, #a78bfa, #6366f1);
  background-size: 200% 100%;
  animation: gradient-shift 3s linear infinite;
  height: 3px;
}

/* =========================================
   BACK TO TOP — 3D STYLE
   ========================================= */
#back-to-top {
  background: linear-gradient(155deg, hsl(248,90%,65%), hsl(258,85%,55%));
  box-shadow: 0 4px 0 hsl(248,70%,42%), 0 6px 20px var(--btn-shadow-color);
  transition: all 0.15s ease;
}
#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 hsl(248,70%,42%), 0 10px 28px var(--btn-shadow-color);
}
#back-to-top:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 hsl(248,70%,42%), 0 4px 10px var(--btn-shadow-color);
}

/* =========================================
   THEME TRANSITION SYSTEM
   ========================================= */

/* Disable ALL transitions during initial theme restore (no flash) */
[data-no-transition],
[data-no-transition] *,
[data-no-transition] *::before,
[data-no-transition] *::after {
  transition: none !important;
  animation: none !important;
}

/* Smooth transitions on ALL themeable properties when toggling */
html {
  color-scheme: dark;
}
[data-theme="light"] {
  color-scheme: light;
}

body,
#site-header,
.glass-card,
.glass,
.article-card,
.category-card,
.sidebar-widget,
.newsletter-section,
#site-footer,
.btn,
.nav-dropdown-menu,
.mobile-nav,
.article-content,
.form-group input,
.form-group textarea,
.form-group select,
.newsletter-form input {
  transition:
    background-color 0.35s ease,
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Toggle button — spin animation */
@keyframes theme-spin {
  0%   { transform: rotate(0deg)   scale(1);   }
  40%  { transform: rotate(200deg) scale(1.15); }
  70%  { transform: rotate(340deg) scale(0.92); }
  100% { transform: rotate(360deg) scale(1);   }
}
.theme-toggle--spinning svg {
  animation: theme-spin 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* View Transition API — circle reveal styles */
::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Ensure no colour flash behind the transition circle */
::view-transition-group(root) {
  z-index: 99998;
}

/* =========================================
   THEME TOGGLE — GLOW RING ON ACTIVE THEME
   ========================================= */
[data-theme="light"] .theme-toggle {
  box-shadow: 0 2px 0 rgba(0,0,0,0.1), 0 0 0 0 transparent, var(--glass-inner-glow);
}
[data-theme="dark"] .theme-toggle {
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), 0 0 12px rgba(99,102,241,0.3), var(--glass-inner-glow);
}
.theme-toggle:hover {
  box-shadow: 0 4px 0 rgba(0,0,0,0.1), 0 0 0 3px rgba(99,102,241,0.25), 0 6px 14px rgba(99,102,241,0.25) !important;
  transform: translateY(-1px);
}

/* =========================================
   LIGHT MODE EXTRA POLISH
   ========================================= */
[data-theme="light"] .glass-card {
  box-shadow:
    0 4px 24px rgba(99,102,241,0.08),
    0 1px 4px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
[data-theme="light"] #site-header {
  background: rgba(255,255,255,0.75);
  border-bottom-color: rgba(99,102,241,0.1);
}
[data-theme="light"] .btn-primary {
  box-shadow:
    0 4px 0 0 hsl(248,70%,42%),
    0 6px 20px rgba(99,102,241,0.3),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow:
    0 6px 0 0 hsl(248,70%,42%),
    0 10px 28px rgba(99,102,241,0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* =========================================
   DARK MODE EXTRA POLISH
   ========================================= */
[data-theme="dark"] .glass-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
[data-theme="dark"] #site-header {
  background: rgba(15,14,26,0.7);
}
[data-theme="dark"] .article-card-footer {
  background: rgba(0,0,0,0.15);
}

/* =========================================
   PERFORMANCE AUDIT TOOL PAGE
   ========================================= */

/* --- Hero --- */
.tool-page-hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border-bottom: 1px solid var(--border);
  padding: 72px 0 56px;
  text-align: center;
}
.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,.12);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.tool-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.1;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--foreground) 60%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-hero-desc {
  max-width: 660px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}
.tool-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--muted-foreground);
}
.tool-hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Body layout --- */
.tool-page-body {
  padding: 60px 0 80px;
}
.tool-article-wrap {
  max-width: 820px;
  margin: 0 auto;
}

/* --- Article prose --- */
.tool-article-section {
  font-size: 1.0125rem;
  line-height: 1.85;
  color: color-mix(in srgb, var(--foreground) 82%, transparent);
}
.tool-article-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--foreground);
  margin: 48px 0 16px;
  line-height: 1.25;
}
.tool-article-section h2:first-child { margin-top: 0; }
.tool-article-section p { margin: 0 0 1.35em; }
.tool-article-section strong { color: var(--foreground); font-weight: 700; }
.tool-article-section a { color: var(--primary); text-decoration: underline; }

/* Grade table in article */
.tool-grade-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 32px;
  padding: 24px;
  background: var(--muted);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}
.tool-grade-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: .9rem;
  line-height: 1.6;
}
.tool-grade-badge-sm {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .85rem;
}
.tool-grade-a-plus { background: rgba(34,197,94,.15);  color: #16a34a; }
.tool-grade-a      { background: rgba(34,197,94,.1);   color: #22c55e; }
.tool-grade-b      { background: rgba(99,102,241,.12); color: var(--primary); }
.tool-grade-c      { background: rgba(245,158,11,.12); color: #d97706; }
.tool-grade-d      { background: rgba(249,115,22,.12); color: #ea580c; }
.tool-grade-f      { background: rgba(239,68,68,.12);  color: #dc2626; }

/* =========================================
   AUDIT TOOL WIDGET
   ========================================= */
.audit-tool-wrap {
  margin: 40px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
}

/* Header bar */
.audit-tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.06));
  border-bottom: 1px solid var(--border);
}
.audit-tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.audit-tool-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--foreground);
  margin: 0 0 4px;
}
.audit-tool-subtitle {
  font-size: .85rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.5;
}

/* Score dashboard */
.audit-score-dash {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.audit-score-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.audit-score-ring { display: block; }
.audit-ring-bg   { stroke: var(--border); }
.audit-ring-fill {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4,0,0.2,1), stroke 0.4s ease;
}
.audit-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.audit-score-num {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--foreground);
  font-family: var(--font-sans);
  transition: color 0.3s;
}
.audit-score-label {
  font-size: .7rem;
  color: var(--muted-foreground);
  font-weight: 600;
}
.audit-score-meta { flex: 1; min-width: 200px; }
.audit-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--muted);
  color: var(--muted-foreground);
  margin-bottom: 8px;
  transition: background 0.4s, color 0.4s;
}
.audit-grade-badge.grade-a-plus { background: rgba(34,197,94,.15);  color: #16a34a; }
.audit-grade-badge.grade-a      { background: rgba(34,197,94,.12);  color: #22c55e; }
.audit-grade-badge.grade-b      { background: rgba(99,102,241,.15); color: var(--primary); }
.audit-grade-badge.grade-c      { background: rgba(245,158,11,.15); color: #d97706; }
.audit-grade-badge.grade-d      { background: rgba(249,115,22,.15); color: #ea580c; }
.audit-grade-badge.grade-f      { background: rgba(239,68,68,.15);  color: #dc2626; }

.audit-grade-label {
  font-size: .83rem;
  color: var(--muted-foreground);
  margin: 0 0 12px;
  line-height: 1.4;
  font-weight: 500;
}
.audit-progress-bar-wrap {
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.audit-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1), background 0.4s;
}
.audit-stats-row {
  font-size: .78rem;
  color: var(--muted-foreground);
  font-weight: 600;
}

/* Categories */
.audit-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.audit-category {
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
  transition: background 0.2s;
}
.audit-category:last-child { border-bottom: none; }
.audit-category:hover { background: rgba(99,102,241,.02); }
.audit-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.audit-cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.audit-cat-icon--blue   { background: rgba(99,102,241,.12);  color: #6366f1; }
.audit-cat-icon--green  { background: rgba(34,197,94,.12);   color: #22c55e; }
.audit-cat-icon--violet { background: rgba(139,92,246,.12);  color: #8b5cf6; }
.audit-cat-icon--orange { background: rgba(249,115,22,.12);  color: #f97316; }
.audit-cat-icon--red    { background: rgba(239,68,68,.12);   color: #ef4444; }
.audit-cat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 2px;
  letter-spacing: -.01em;
}
.audit-cat-score {
  font-size: .75rem;
  color: var(--muted-foreground);
  font-weight: 600;
  transition: color 0.3s;
}
.audit-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual checklist item */
.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.audit-item:hover { background: rgba(99,102,241,.05); }
.audit-item input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.audit-check-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--card);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}
.audit-check-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
  transform: rotate(-45deg) scale(0);
  transition: border-color 0.15s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  margin-top: -2px;
}
.audit-item input:checked ~ .audit-check-box {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.audit-item input:checked ~ .audit-check-box::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
  transform: rotate(-45deg) scale(1);
}
.audit-item input:checked ~ .audit-item-text {
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
  text-decoration: line-through;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px;
}

.audit-item-text {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.2s;
  flex: 1;
}
.audit-item-why {
  display: block;
  font-size: .775rem;
  color: var(--muted-foreground);
  font-weight: 400;
  margin-top: 2px;
  font-style: italic;
  text-decoration: none !important;
}
.audit-item input:checked ~ .audit-item-text .audit-item-why {
  text-decoration: none !important;
}

/* Results panel */
.audit-results-panel {
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  background: rgba(99,102,241,.03);
  animation: fade-up .35s ease both;
}
.audit-results-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--foreground);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.rec-category { margin-bottom: 16px; }
.rec-cat-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.rec-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .83rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
[data-theme="dark"] .rec-item { border-bottom-color: rgba(255,255,255,.04); }
.rec-item svg { color: #f59e0b; flex-shrink: 0; margin-top: 3px; }
.rec-perfect {
  text-align: center;
  padding: 24px 0;
  color: #22c55e;
}
.rec-perfect svg { margin-bottom: 12px; }
.rec-perfect strong { display: block; font-size: 1.1rem; margin-bottom: 8px; }
.rec-perfect p { color: var(--muted-foreground); font-size: .875rem; }

/* Actions */
.audit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

/* Responsive */
@media (max-width: 600px) {
  .audit-tool-header { flex-direction: column; text-align: center; padding: 20px; }
  .audit-score-dash  { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
  .audit-category    { padding: 16px 16px; }
  .audit-actions     { flex-direction: column; padding: 16px; }
  .audit-actions .btn { width: 100%; justify-content: center; }
  .tool-grade-table  { padding: 16px; }
}

/* =========================================
   NAV — "Free Tool" pill link
   ========================================= */
.nav-tools-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.12));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 999px;
  padding: 5px 13px !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s !important;
}
.nav-tools-link:hover {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.2));
  box-shadow: 0 0 0 3px rgba(99,102,241,.15), 0 4px 12px rgba(99,102,241,.2);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.nav-tools-link::after { display: none !important; }

/* =========================================
   HOMEPAGE — Featured Tool Banner
   ========================================= */
.featured-tool-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  background: linear-gradient(135deg,
    rgba(99,102,241,.08) 0%,
    rgba(139,92,246,.06) 50%,
    rgba(99,102,241,.04) 100%);
  border: 1px solid rgba(99,102,241,.2);
  position: relative;
  overflow: hidden;
}
.featured-tool-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99,102,241,.12), transparent 70%);
  pointer-events: none;
}
.ftb-icon-wrap {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.ftb-body { flex: 1; min-width: 0; }
.ftb-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.ftb-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.025em;
  color: var(--foreground);
  margin: 0 0 8px;
  line-height: 1.2;
}
.ftb-desc {
  font-size: .875rem;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin: 0 0 14px;
}
.ftb-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.ftb-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .775rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.ftb-cta {
  text-align: center;
  flex-shrink: 0;
}
.ftb-sub {
  font-size: .73rem;
  color: var(--muted-foreground);
  margin: 10px 0 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .featured-tool-banner {
    flex-direction: column;
    padding: 24px 20px;
    text-align: center;
  }
  .ftb-stats { justify-content: center; }
  .ftb-cta .btn { width: 100%; justify-content: center; }
}

/* =========================================
   SINGLE ARTICLE — In-article Tool CTA
   ========================================= */
.article-tool-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 40px 0;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(99,102,241,.07), rgba(139,92,246,.05));
  border: 1.5px solid rgba(99,102,241,.25);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.article-tool-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(99,102,241,.04), transparent);
  pointer-events: none;
}
.atc-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.atc-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
  flex-shrink: 0;
}
.atc-eyebrow {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.atc-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--foreground);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.atc-desc {
  font-size: .83rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0;
}
.atc-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .article-tool-cta {
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }
  .atc-btn { width: 100%; justify-content: center; }
}

/* =========================================
   TOOL PAGE — Related Articles Grid
   ========================================= */
.tool-related-section {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.tool-related-header {
  text-align: center;
  margin-bottom: 32px;
}
.tool-related-title {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--foreground);
  margin: 0 0 8px;
}
.tool-related-sub {
  font-size: .9rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.6;
}
.tool-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-related-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}
.tool-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99,102,241,.12), 0 2px 8px rgba(0,0,0,.06);
}
.trc-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trc-icon--blue   { background: rgba(99,102,241,.12);  color: #6366f1; }
.trc-icon--violet { background: rgba(139,92,246,.12);  color: #8b5cf6; }
.trc-icon--green  { background: rgba(34,197,94,.12);   color: #22c55e; }
.trc-icon--orange { background: rgba(249,115,22,.12);  color: #f97316; }
.trc-icon--red    { background: rgba(239,68,68,.12);   color: #ef4444; }
.trc-cat {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.trc-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.4;
  margin-bottom: 8px;
}
.trc-arrow {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.8;
  transition: opacity 0.15s;
}
.tool-related-card:hover .trc-arrow { opacity: 1; }

@media (max-width: 860px) {
  .tool-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .tool-related-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   HEADER — scroll-triggered navbar + search button
   ========================================================= */
#site-header {
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.25s ease,
              background 0.25s ease !important;
}
#site-header.header-scrolled {
  background: var(--header-bg) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,.10) !important;
}
#site-header.header-hidden {
  transform: translateY(-100%);
}

/* Search icon button */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--muted-foreground);
  transition: background 0.18s, color 0.18s, transform 0.15s;
  text-decoration: none !important;
}
.header-search-btn:hover {
  background: var(--muted);
  color: var(--foreground);
  transform: scale(1.08);
}

/* Theme toggle — enhanced active ring */
.theme-toggle {
  position: relative;
}
.theme-toggle:after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.theme-toggle:focus-visible:after {
  border-color: var(--primary);
}
.theme-toggle--spinning {
  animation: toggle-spin 0.45s ease;
}
@keyframes toggle-spin {
  from { transform: rotate(0deg) scale(0.9); }
  60%  { transform: rotate(220deg) scale(1.1); }
  to   { transform: rotate(0deg) scale(1); }
}

/* =========================================================
   GSAP HERO SECTION — SVG mask + animated orbs
   ========================================================= */
.hero-gsap-section {
  position: relative;
  overflow: hidden;
}
.hero-svg-mask-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-mask-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-gsap-section > .container {
  position: relative;
  z-index: 1;
}
.hero-orb {
  transform-origin: center;
}
.hero-orb-1 {
  animation: orb-float 8s ease-in-out infinite;
}
.hero-orb-2 {
  animation: orb-float 11s ease-in-out infinite reverse;
}
.hero-orb-3 {
  animation: orb-float 6s ease-in-out infinite;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-18px) scale(1.04); }
}

/* Hero search hint pill */
.hero-search-hint {
  margin-top: 20px;
}
.hero-search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--muted-foreground);
  text-decoration: none !important;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  background: rgba(255,255,255,0.03);
}
.hero-search-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.06);
}
.hero-search-pill kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: .72rem;
  font-family: inherit;
  background: var(--muted);
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* =========================================================
   SEARCH PAGE
   ========================================================= */
.search-page-hero {
  padding: 64px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99,102,241,.04) 0%, transparent 100%);
}
.search-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--foreground);
  margin: 0 0 10px;
}
.search-hero-sub {
  font-size: 1rem;
  color: var(--muted-foreground);
  margin: 0 0 28px;
}
.search-input-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  left: 16px;
  color: var(--muted-foreground);
  pointer-events: none;
  flex-shrink: 0;
}
.search-main-input {
  width: 100%;
  padding: 14px 48px 14px 46px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.search-main-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12), 0 2px 12px rgba(0,0,0,.06);
}
.search-main-input::placeholder { color: var(--muted-foreground); }
.search-clear-btn {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: background 0.15s;
}
.search-clear-btn:hover { background: var(--border); color: var(--foreground); }
.search-kbd {
  position: absolute;
  right: 46px;
  font-size: .72rem;
  color: var(--muted-foreground);
  pointer-events: none;
}
@media (max-width: 480px) { .search-kbd { display: none; } }

.search-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}
.search-chip {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--muted-foreground);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.search-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.search-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-page-body {
  padding-top: 40px;
  padding-bottom: 80px;
  min-height: 50vh;
}
.search-meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: .85rem;
  margin-bottom: 24px;
  color: var(--muted-foreground);
}
.search-meta-row #search-count-text { font-weight: 600; color: var(--foreground); }

.search-highlight {
  background: rgba(99,102,241,.18);
  color: var(--primary);
  border-radius: 3px;
  padding: 1px 2px;
  font-style: normal;
}

.search-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted-foreground);
}
.search-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.search-empty-state h3 { font-size: 1.3rem; color: var(--foreground); margin-bottom: 8px; }
.search-empty-state p  { font-size: .9rem; }

.search-loading-state {
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--muted-foreground);
  font-size: .9rem;
}
.search-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   RSS PAGE
   ========================================================= */
.rss-hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, rgba(249,115,22,.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.rss-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(249,115,22,.35);
}
.rss-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--foreground);
  margin: 0 0 12px;
}
.rss-hero-desc {
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.rss-url-copy-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
.rss-url-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: .85rem;
  font-family: monospace;
  outline: none;
  min-width: 0;
}

.rss-services-section {
  padding-top: 56px;
  padding-bottom: 16px;
}
.rss-section-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--foreground);
  text-align: center;
  margin: 0 0 8px;
}
.rss-section-sub {
  text-align: center;
  color: var(--muted-foreground);
  font-size: .9rem;
  margin: 0 0 32px;
}
.rss-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) { .rss-services-grid { grid-template-columns: 1fr; } }

.rss-service-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rss-service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  text-decoration: none !important;
}
.rss-svc-logo {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rss-svc-feedly   { background: #2bb24c; color: #fff; }
.rss-svc-inoreader{ background: #0073e6; color: #fff; }
.rss-svc-newsblur { background: #ec6320; color: #fff; }
.rss-svc-feedbin  { background: #f24e4e; color: #fff; }
.rss-svc-reeder   { background: #e85c33; color: #fff; }

.rss-svc-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--foreground);
  margin-bottom: 4px;
}
.rss-svc-desc {
  font-size: .8rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.rss-svc-arrow {
  margin-left: auto;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.rss-service-card:hover .rss-svc-arrow {
  color: var(--primary);
  transform: translateX(3px);
}
.rss-raw-feed { cursor: default; }
.rss-raw-feed:hover { transform: none; }
.rss-raw-link {
  display: block;
  font-family: monospace;
  font-size: .75rem;
  color: var(--primary);
  margin-top: 6px;
  word-break: break-all;
}

.rss-preview-section {
  padding: 48px 0 80px;
}
.rss-recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.rss-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}
.rss-item-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.rss-item-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 7px;
}
.rss-item-title {
  display: block;
  font-weight: 700;
  font-size: .925rem;
  color: var(--foreground);
  text-decoration: none;
  line-height: 1.4;
  margin: 4px 0 6px;
  transition: color 0.15s;
}
.rss-item-title:hover { color: var(--primary); }
.rss-item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: var(--muted-foreground);
}

/* =========================================================
   RELATED ARTICLES CAROUSEL
   ========================================================= */
.related-carousel-section {
  padding: 56px 0 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.related-carousel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.related-carousel-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--foreground);
  margin: 0 0 4px;
}
.related-carousel-sub {
  font-size: .875rem;
  color: var(--muted-foreground);
  margin: 0;
}
.carousel-nav-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.carousel-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s, opacity 0.2s;
}
.carousel-nav-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.06);
  transform: scale(1.07);
}
.carousel-nav-btn:disabled { opacity: 0.4; cursor: default; }

.carousel-outer {
  overflow: hidden;
  margin: 0 -20px;        /* bleed past container on mobile */
  padding: 0 20px;
}
.related-carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 32px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.related-carousel-track::-webkit-scrollbar { display: none; }
.related-carousel-track:active { cursor: grabbing; }

.carousel-card {
  flex: 0 0 280px;
  min-width: 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
.carousel-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.carousel-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.carousel-card:hover .carousel-card-img img { transform: scale(1.05); }
.carousel-card-body {
  padding: 16px 16px 8px;
  flex: 1;
}
.carousel-card-title {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.carousel-card-title a {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.15s;
}
.carousel-card-title a:hover { color: var(--primary); }
.carousel-card-excerpt {
  font-size: .78rem;
  color: var(--muted-foreground);
  line-height: 1.55;
  margin: 0;
}
.carousel-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* Mobile responsive enhancements */
@media (max-width: 640px) {
  .carousel-card { flex: 0 0 240px; min-width: 240px; }
  .rss-url-copy-wrap { flex-direction: column; }
  .rss-url-copy-wrap .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   THEME TOGGLE — always visible, enhanced active ring
   ========================================================= */
.header-actions {
  flex-shrink: 0;
}
/* Force theme toggle visible at all viewport widths */
.theme-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Active state ring (light mode — show as "currently light") */
[data-theme="light"] .theme-toggle {
  background: rgba(251,191,36,.12);
  color: #d97706;
  box-shadow: 0 0 0 2px rgba(251,191,36,.3);
}
/* Active state ring (dark mode — show as "currently dark") */
[data-theme="dark"] .theme-toggle {
  background: rgba(99,102,241,.12);
  color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99,102,241,.3);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(251,191,36,.2);
  box-shadow: 0 0 0 3px rgba(251,191,36,.4), 0 4px 14px rgba(251,191,36,.2);
}
[data-theme="dark"] .theme-toggle:hover {
  background: rgba(99,102,241,.2);
  box-shadow: 0 0 0 3px rgba(99,102,241,.4), 0 4px 14px rgba(99,102,241,.2);
}

/* =========================================================
   ADMIN DASHBOARD PAGE — /admin
   ========================================================= */
.admin-dash-page {
  padding: 56px 0 80px;
  min-height: 70vh;
}
.admin-dash-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.admin-dash-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(99,102,241,.3);
}
.admin-dash-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--foreground);
  margin: 0 0 4px;
}
.admin-dash-sub {
  font-size: .875rem;
  color: var(--muted-foreground);
  margin: 0;
}
.admin-dash-badge { margin-left: auto; }
.admin-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.admin-badge-green {
  background: rgba(34,197,94,.12);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,.25);
}
.admin-badge-orange {
  background: rgba(249,115,22,.12);
  color: #d97706;
  border: 1px solid rgba(249,115,22,.25);
}
.admin-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 900px)  { .admin-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .admin-stats-grid { grid-template-columns: 1fr; } }

.admin-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
}
.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-stat-val {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--foreground);
  line-height: 1;
}
.admin-stat-lbl {
  font-size: .8rem;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-top: -4px;
}

/* Tabs */
.admin-tabs-wrap { overflow: hidden; }
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted-foreground);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.admin-tab:hover  { color: var(--foreground); }
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.admin-tab-badge {
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.6;
}

/* Subscriber table */
.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  font-size: .875rem;
  color: var(--muted-foreground);
}
.admin-export-btn {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.admin-table thead tr {
  background: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.admin-table th {
  padding: 10px 18px;
  text-align: left;
}
.admin-table td {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}
.admin-table tbody tr:hover td { background: rgba(99,102,241,.03); }
.admin-td-muted  { color: var(--muted-foreground); font-size: .78rem; }
.admin-td-email  { font-weight: 600; }
.admin-td-date   { color: var(--muted-foreground); font-size: .82rem; }

.admin-empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.admin-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.admin-empty-state h3 { color: var(--foreground); margin-bottom: 8px; font-size: 1.1rem; }

/* Quick Links tab */
.admin-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 860px) { .admin-links-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .admin-links-grid { grid-template-columns: 1fr; } }

.admin-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
.admin-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}
.admin-link-icon { font-size: 1.3rem; flex-shrink: 0; }
.admin-link-name { font-weight: 700; font-size: .875rem; color: var(--foreground); }
.admin-link-desc { font-size: .75rem; color: var(--muted-foreground); margin-top: 2px; }
.admin-link-arrow {
  margin-left: auto;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.admin-link-card:hover .admin-link-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* SEO tab */
.admin-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .admin-seo-grid { grid-template-columns: 1fr; } }

.admin-seo-card {
  padding: 24px;
}
.admin-seo-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--foreground);
}
.admin-seo-card p {
  font-size: .875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0 0 12px;
}
.admin-seo-urls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.admin-seo-urls a {
  font-size: .78rem;
  font-family: monospace;
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}
.admin-seo-urls a:hover { text-decoration: underline; }
.admin-seo-hint {
  font-size: .78rem !important;
  color: var(--muted-foreground) !important;
}
.admin-seo-hint a { color: var(--primary); }

/* Login prompt */
.admin-login-prompt {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
}
.admin-login-icon { font-size: 2.5rem; margin-bottom: 16px; }
.admin-login-prompt h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 10px; color: var(--foreground); }
.admin-login-prompt p  { font-size: .9rem; color: var(--muted-foreground); line-height: 1.65; margin-bottom: 0; }

/* ============================================================
   HOSTGEMINI ANIMATION SYSTEM v3
   Cursor spotlight · Constellation particles · Spring physics
   3D tilt · Magnetic buttons · Ripple · Shimmer · Parallax
   ============================================================ */

/* --- Core keyframes --- */
@keyframes hg-float      { 0%,100%{transform:translateY(0)}        50%{transform:translateY(-14px)} }
@keyframes hg-float-sm   { 0%,100%{transform:translateY(0)}        50%{transform:translateY(-6px)} }
@keyframes hg-shimmer    { 0%{background-position:200% center}    100%{background-position:-200% center} }
@keyframes hg-ripple     { to{transform:scale(4);opacity:0} }
@keyframes hg-badge-pop  { 0%{transform:scale(0.5);opacity:0} 55%{transform:scale(1.12)} 100%{transform:scale(1);opacity:1} }
@keyframes hg-pulse-glow { 0%,100%{box-shadow:0 0 0 0 rgba(99,102,241,.45)} 60%{box-shadow:0 0 0 14px rgba(99,102,241,0)} }
@keyframes hg-spin-once  { from{transform:rotate(0deg)scale(0.8)} to{transform:rotate(360deg)scale(1)} }
@keyframes hg-page-in    { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes hg-bar-glow   { 0%,100%{filter:drop-shadow(0 0 3px rgba(99,102,241,.5))} 50%{filter:drop-shadow(0 0 9px rgba(99,102,241,.9))} }
@keyframes hg-orb1       { 0%,100%{transform:translate(0,0)scale(1)}   40%{transform:translate(28px,-22px)scale(1.06)} 70%{transform:translate(-14px,18px)scale(0.97)} }
@keyframes hg-orb2       { 0%,100%{transform:translate(0,0)scale(1)}   35%{transform:translate(-22px,16px)scale(1.04)} 70%{transform:translate(18px,-24px)scale(0.98)} }
@keyframes hg-orb3       { 0%,100%{transform:translate(0,0)}           50%{transform:translate(12px,-10px)} }

/* --- Gradient text: animated shimmer --- */
.gradient-text {
  background: linear-gradient(90deg,#6366f1 0%,#8b5cf6 20%,#a78bfa 40%,#c4b5fd 50%,#a78bfa 60%,#8b5cf6 80%,#6366f1 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hg-shimmer 6s linear infinite;
}

/* --- Hero featured card: gentle float --- */
.hero-featured-card {
  animation: hg-float 7s ease-in-out infinite;
  will-change: transform;
}

/* --- SVG ambient orbs drift --- */
.hero-orb-1 { animation: hg-orb1 14s ease-in-out infinite; }
.hero-orb-2 { animation: hg-orb2 18s ease-in-out infinite; }
.hero-orb-3 { animation: hg-orb3 10s ease-in-out infinite; }

/* --- Hero badge spring entrance --- */
.hero-badge { animation: hg-badge-pop 0.55s cubic-bezier(0.34,1.56,0.64,1) both; }
.hero-badge:nth-child(1) { animation-delay:.04s }
.hero-badge:nth-child(2) { animation-delay:.11s }
.hero-badge:nth-child(3) { animation-delay:.18s }
.hero-badge:nth-child(4) { animation-delay:.25s }

/* --- Cursor spotlight --- */
#hg-spotlight {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, rgba(139,92,246,.05) 35%, transparent 70%);
  pointer-events: none; top: 0; left: 0; z-index: 9996;
  transform: translate(-50%,-50%);
  transition: opacity .5s ease;
  will-change: left, top;
  mix-blend-mode: screen;
}
[data-theme="light"] #hg-spotlight {
  background: radial-gradient(circle, rgba(99,102,241,.055) 0%, rgba(139,92,246,.03) 35%, transparent 70%);
  mix-blend-mode: multiply;
}

/* --- Constellation canvas --- */
#hg-particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
  opacity: 1;
}
.site-wrapper  { position: relative; z-index: 1; }
#site-header   { position: relative; z-index: 100; }

/* --- Button ripple --- */
.btn           { position: relative; overflow: hidden; }
.hg-ripple     { position: absolute; border-radius: 50%; pointer-events: none;
                 background: rgba(255,255,255,.38); transform: scale(0);
                 animation: hg-ripple .65s linear; }
.btn-outline .hg-ripple { background: rgba(99,102,241,.22); }

/* --- Button primary: glow on hover, magnetic-ready --- */
.btn-primary   { will-change: transform; transition: transform .18s cubic-bezier(.25,.46,.45,.94), box-shadow .2s ease, background .2s !important; }
.btn-primary:hover { box-shadow: 0 8px 32px rgba(99,102,241,.48), 0 2px 8px rgba(0,0,0,.15) !important; }

/* --- Glass card: soft glow on hover --- */
.glass-card    { transition: box-shadow .35s ease, border-color .35s ease !important; }
.glass-card:hover { box-shadow: var(--glass-shadow), 0 0 0 1px rgba(99,102,241,.24), 0 14px 52px rgba(99,102,241,.16) !important; }

/* --- Article card: spring-bounce lift --- */
.article-card  { will-change: transform; transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease !important; }
.article-card:hover { transform: translateY(-10px) scale(1.015) !important;
                      box-shadow: 0 24px 64px rgba(99,102,241,.2), 0 8px 24px rgba(0,0,0,.1) !important; }

/* --- Category card: spring-bounce --- */
.category-card { will-change: transform; transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease !important; }
.category-card:hover { transform: translateY(-8px) scale(1.03) !important;
                       box-shadow: 0 20px 52px rgba(99,102,241,.18) !important; }

/* --- Tool related card --- */
.tool-related-card { transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease !important; }
.tool-related-card:hover { transform: translateY(-6px) scale(1.02) !important; }

/* --- Reading progress: animated glow --- */
#reading-progress { box-shadow: 0 0 6px rgba(99,102,241,.6), 0 0 14px rgba(99,102,241,.3); }

/* --- Main nav: expanding underline --- */
.main-nav > a, .main-nav a:not(.nav-dropdown-trigger) { position: relative; }
.main-nav > a::after, .main-nav a:not(.nav-dropdown-trigger)::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; right: 50%;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--violet));
  transition: left .28s cubic-bezier(.25,.46,.45,.94), right .28s cubic-bezier(.25,.46,.45,.94);
}
.main-nav > a:hover::after,
.main-nav a:not(.nav-dropdown-trigger):hover::after,
.main-nav > a.current::after,
.main-nav a.hg-nav-active::after { left: 0; right: 0; }

/* --- Theme toggle enhanced spin --- */
.theme-toggle--spinning { animation: hg-spin-once .5s cubic-bezier(.34,1.56,.64,1) !important; }

/* --- Page content entrance --- */
.hero-inner          { animation: hg-page-in .75s cubic-bezier(.25,.46,.45,.94) both; }
.tool-article-wrap   { animation: hg-page-in .75s cubic-bezier(.25,.46,.45,.94) .1s both; }

/* --- Scroll reveal base (applied by JS) --- */
[data-hg-reveal]                           { opacity: 0; }
[data-hg-reveal="up"]                      { transform: translateY(32px); }
[data-hg-reveal="left"]                    { transform: translateX(32px); }
[data-hg-reveal="right"]                   { transform: translateX(-32px); }
[data-hg-reveal="zoom"]                    { transform: scale(0.88); }
[data-hg-reveal="flip"]                    { transform: perspective(600px) rotateX(22deg); }
[data-hg-reveal].hg-visible               { opacity: 1 !important; transform: none !important;
  transition: opacity .65s cubic-bezier(.25,.46,.45,.94) var(--hg-d,0s),
              transform .65s cubic-bezier(.25,.46,.45,.94) var(--hg-d,0s); }

/* --- Stagger delays --- */
[data-hg-d="1"]  { --hg-d: .06s } [data-hg-d="2"]  { --hg-d: .12s }
[data-hg-d="3"]  { --hg-d: .18s } [data-hg-d="4"]  { --hg-d: .24s }
[data-hg-d="5"]  { --hg-d: .30s } [data-hg-d="6"]  { --hg-d: .36s }
[data-hg-d="7"]  { --hg-d: .42s } [data-hg-d="8"]  { --hg-d: .48s }

/* --- Audit items reveal --- */
.audit-category          { transition: opacity .5s ease, transform .5s ease; }
.audit-category .audit-item { transition: opacity .25s ease, transform .25s ease; }

/* --- PSI metric card hover --- */
.psi-metric-card { transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease !important; }
.psi-metric-card:hover { transform: translateY(-4px) scale(1.03) !important; box-shadow: 0 12px 32px rgba(99,102,241,.15) !important; }

