/*
Theme Name: HackTheSim Glass
Theme URI: https://hackthesim.com
Author: HackTheSim
Author URI: https://hackthesim.com
Description: Glassmorphism / Aero-glass WordPress theme matching the Prompt Hub Pro aesthetic. Features frosted-glass surfaces, indigo accent, Inter font, and full dark mode support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hackthesim-glass
Tags: glass, dark-mode, indigo, modern, one-column, custom-menu, custom-logo, featured-images
*/

/* ============================================================
   0. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Accent */
  --hts-accent:        #16a34a;
  --hts-accent-dark:   #15803d;
  --hts-accent-light:  #86efac;
  --hts-accent-glow:   rgba(22,163,74,.22);
  --hts-accent-glow-lg:rgba(22,163,74,.12);

  /* Backgrounds */
  --hts-bg: linear-gradient(155deg,#f0fdf4 0%,#f4f6fb 35%,#f0fdf4 65%,#dcfce7 100%);

  /* Glass surfaces */
  --hts-glass:         rgba(255,255,255,.62);
  --hts-glass-hover:   rgba(255,255,255,.82);
  --hts-glass-strong:  rgba(255,255,255,.88);
  --hts-border:        rgba(255,255,255,.82);
  --hts-border-subtle: rgba(22,163,74,.12);
  --hts-blur:          blur(18px) saturate(180%);

  /* Text */
  --hts-text:          #111827;
  --hts-text-muted:    #586072;
  --hts-text-faint:    #8a94a6;

  /* Layout */
  --hts-max-w:         1100px;
  --hts-content-w:     780px;
  --hts-radius:        14px;
  --hts-radius-sm:     8px;
  --hts-radius-pill:   999px;

  /* Shadow */
  --hts-shadow:        0 4px 24px rgba(22,163,74,.10), 0 1px 4px rgba(0,0,0,.05);
  --hts-shadow-lg:     0 8px 40px rgba(22,163,74,.14), 0 2px 8px rgba(0,0,0,.06);

  /* Transitions */
  --hts-transition:    all .18s ease;

  /* Header height */
  --hts-header-h:      64px;

  /* Font */
  --hts-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hts-mono:          'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Dark mode overrides */
[data-hts-theme="dark"],
[data-ph-theme="dark"] {
  --hts-bg: linear-gradient(155deg,#080c1a 0%,#0f1117 35%,#0b0f20 65%,#0d0a1f 100%);
  --hts-glass:         rgba(20,24,38,.62);
  --hts-glass-hover:   rgba(30,35,55,.82);
  --hts-glass-strong:  rgba(20,24,38,.92);
  --hts-border:        rgba(255,255,255,.07);
  --hts-border-subtle: rgba(22,163,74,.18);
  --hts-text:          #e8eaf0;
  --hts-text-muted:    #8892a4;
  --hts-text-faint:    #4a5568;
  --hts-shadow:        0 4px 24px rgba(0,0,0,.40), 0 1px 4px rgba(0,0,0,.20);
  --hts-shadow-lg:     0 8px 40px rgba(0,0,0,.50), 0 2px 8px rgba(0,0,0,.30);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--hts-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--hts-text);
  background: var(--hts-bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .3s ease, color .2s ease;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--hts-accent);
  text-decoration: none;
  transition: var(--hts-transition);
}
a:hover { color: var(--hts-accent-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--hts-text);
  margin-bottom: .5em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.1em; }

ul, ol { padding-left: 1.5em; margin-bottom: 1.1em; }

blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--hts-accent);
  background: var(--hts-glass);
  border-radius: 0 var(--hts-radius-sm) var(--hts-radius-sm) 0;
  backdrop-filter: var(--hts-blur);
  font-style: italic;
  color: var(--hts-text-muted);
}

code {
  font-family: var(--hts-mono);
  font-size: .88em;
  background: rgba(22,163,74,.10);
  color: var(--hts-accent);
  padding: .15em .45em;
  border-radius: 4px;
}

pre {
  font-family: var(--hts-mono);
  font-size: .85em;
  background: rgba(10,12,26,.82);
  color: #e8eaf0;
  padding: 1.25em 1.5em;
  border-radius: var(--hts-radius-sm);
  overflow-x: auto;
  margin-bottom: 1.5em;
  border: 1px solid rgba(22,163,74,.18);
}
pre code { background: none; color: inherit; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  border-radius: var(--hts-radius-sm);
  overflow: hidden;
}
th, td {
  padding: .75em 1em;
  text-align: left;
  border-bottom: 1px solid var(--hts-border-subtle);
}
th {
  font-weight: 600;
  background: rgba(22,163,74,.08);
  font-size: .9em;
  text-transform: uppercase;
  letter-spacing: .04em;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(22,163,74,.04); }

hr {
  border: none;
  border-top: 1px solid var(--hts-border-subtle);
  margin: 2em 0;
}

input, textarea, select {
  font-family: var(--hts-font);
  font-size: 1rem;
}

/* ============================================================
   2. GLASS UTILITY
   ============================================================ */
.hts-glass {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius);
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.9);
  transition: var(--hts-transition);
}
@supports (backdrop-filter: blur(1px)) {
  .hts-glass {
    backdrop-filter: var(--hts-blur);
    -webkit-backdrop-filter: var(--hts-blur);
  }
}
[data-hts-theme="dark"] .hts-glass,
[data-ph-theme="dark"] .hts-glass {
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ============================================================
   3. LAYOUT WRAPPER
   ============================================================ */
.hts-wrap {
  max-width: var(--hts-max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.hts-content-wrap {
  max-width: var(--hts-content-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   4. SITE HEADER
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--hts-header-h);
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 2px 20px rgba(22,163,74,.08), inset 0 -1px 0 rgba(255,255,255,.5);
  transition: background .3s ease, box-shadow .2s ease;
}
@supports (backdrop-filter: blur(1px)) {
  #site-header {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}
[data-hts-theme="dark"] #site-header,
[data-ph-theme="dark"] #site-header {
  background: rgba(8,12,26,.72);
  border-bottom-color: rgba(255,255,255,.06);
  box-shadow: 0 2px 20px rgba(0,0,0,.40), inset 0 -1px 0 rgba(255,255,255,.04);
}

.hts-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Logo */
.hts-site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hts-site-branding a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.hts-logo-img,
.custom-logo,
.hts-site-branding img,
.hts-site-branding .custom-logo-link img,
.wp-block-site-logo img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}
/* Remove figure margin WP adds */
.hts-site-branding figure,
.hts-site-branding .wp-block-site-logo {
  margin: 0;
  padding: 0;
  line-height: 0;
}
.hts-site-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 60%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1;
}

/* Primary Navigation */
#site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
#site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
#site-nav ul li a {
  display: block;
  padding: 6px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--hts-text-muted);
  border-radius: var(--hts-radius-pill);
  text-decoration: none;
  transition: var(--hts-transition);
}
#site-nav ul li a:hover,
#site-nav ul li.current-menu-item > a,
#site-nav ul li.current-page-ancestor > a {
  color: var(--hts-accent);
  background: rgba(22,163,74,.10);
}
/* Dropdown */
#site-nav ul li {
  position: relative;
}
#site-nav ul ul {
  /* Use visibility/opacity so the padding hover-bridge works */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;          /* flush — gap is created by padding-top below */
  left: 0;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--hts-glass-strong);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius-sm);
  box-shadow: var(--hts-shadow-lg);
  padding: 14px 6px 6px; /* 14px top = visual gap + hover bridge */
  z-index: 300;
  transition: opacity .15s ease, visibility .15s ease;
}
@supports (backdrop-filter: blur(1px)) {
  #site-nav ul ul {
    backdrop-filter: blur(24px) saturate(180%);
  }
}
#site-nav ul li:hover > ul {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
#site-nav ul ul li a {
  font-size: .88rem;
  padding: 7px 12px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Header actions */
.hts-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Dark mode toggle */
.hts-dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hts-border-subtle);
  background: var(--hts-glass);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--hts-transition);
  flex-shrink: 0;
}
.hts-dark-toggle:hover {
  background: var(--hts-glass-hover);
  border-color: var(--hts-accent);
  box-shadow: 0 0 0 3px var(--hts-accent-glow);
}

/* Mobile menu toggle */
.hts-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--hts-radius-sm);
  border: 1px solid var(--hts-border-subtle);
  background: var(--hts-glass);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
.hts-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--hts-text-muted);
  border-radius: 2px;
  transition: var(--hts-transition);
}
.hts-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hts-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hts-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* CTA button in header */
.hts-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--hts-radius-pill);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--hts-transition);
  text-decoration: none !important;
  line-height: 1;
}
.hts-btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 2px 12px var(--hts-accent-glow);
}
.hts-btn-primary:hover {
  box-shadow: 0 4px 20px var(--hts-accent-glow);
  transform: translateY(-1px);
  color: #fff;
}
.hts-btn-ghost {
  background: transparent;
  color: var(--hts-text-muted);
  border: 1px solid var(--hts-border-subtle);
}
.hts-btn-ghost:hover {
  background: var(--hts-glass);
  color: var(--hts-accent);
  border-color: var(--hts-accent);
}

/* ============================================================
   5. MOBILE MENU OVERLAY
   ============================================================ */
#mobile-menu {
  display: none;
  position: fixed;
  inset: var(--hts-header-h) 0 0 0;
  z-index: 190;
  background: rgba(8,12,26,.72);
  padding: 0;
}
@supports (backdrop-filter: blur(1px)) {
  #mobile-menu { backdrop-filter: blur(30px) saturate(200%); }
}
#mobile-menu.is-open { display: block; }
#mobile-menu .hts-mobile-nav-inner {
  background: var(--hts-glass-strong);
  border-bottom: 1px solid var(--hts-border);
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#mobile-menu ul li a {
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--hts-text);
  border-radius: var(--hts-radius-sm);
  text-decoration: none;
  transition: var(--hts-transition);
  border: 1px solid transparent;
}
#mobile-menu ul li a:hover,
#mobile-menu ul li.current-menu-item > a {
  color: var(--hts-accent);
  background: rgba(22,163,74,.10);
  border-color: rgba(22,163,74,.18);
}

/* ============================================================
   6. HERO (FRONT PAGE)
   ============================================================ */
.hts-hero {
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hts-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(22,163,74,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hts-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--hts-radius-pill);
  background: rgba(22,163,74,.10);
  border: 1px solid rgba(22,163,74,.22);
  font-size: .82rem;
  font-weight: 600;
  color: var(--hts-accent);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hts-hero-title {
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #111827 0%, #16a34a 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-hts-theme="dark"] .hts-hero-title,
[data-ph-theme="dark"] .hts-hero-title {
  background: linear-gradient(135deg, #e8eaf0 0%, #86efac 50%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hts-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--hts-text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hts-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hts-hero-actions .hts-btn {
  padding: 12px 28px;
  font-size: 1rem;
}

/* Hero stats strip */
.hts-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hts-stat-item {
  padding: 16px 32px;
  text-align: center;
  border-right: 1px solid var(--hts-border-subtle);
}
.hts-stat-item:last-child { border-right: none; }
.hts-stat-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--hts-accent);
  letter-spacing: -.03em;
  line-height: 1;
}
.hts-stat-label {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--hts-text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}

/* ============================================================
   7. FEATURE CARDS (FRONT PAGE)
   ============================================================ */
.hts-section {
  padding: 60px 0;
}
.hts-section-title {
  text-align: center;
  margin-bottom: 10px;
}
.hts-section-subtitle {
  text-align: center;
  color: var(--hts-text-muted);
  margin-bottom: 40px;
  font-size: 1.05rem;
}
.hts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.hts-card {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius);
  padding: 28px 24px;
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.9);
  transition: var(--hts-transition);
  text-decoration: none !important;
  display: block;
  color: var(--hts-text);
}
@supports (backdrop-filter: blur(1px)) {
  .hts-card { backdrop-filter: var(--hts-blur); -webkit-backdrop-filter: var(--hts-blur); }
}
[data-hts-theme="dark"] .hts-card,
[data-ph-theme="dark"] .hts-card {
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.04);
}
.hts-card:hover {
  box-shadow: var(--hts-shadow-lg), inset 0 1px 0 rgba(255,255,255,.95);
  transform: translateY(-3px);
  border-color: rgba(22,163,74,.35);
  background: var(--hts-glass-hover);
  text-decoration: none;
  color: var(--hts-text);
}
.hts-card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.hts-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.hts-card p {
  font-size: .9rem;
  color: var(--hts-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   8. CONTENT AREA (PAGE / SINGLE / ARCHIVE)
   ============================================================ */
#site-content {
  padding: 48px 0 64px;
  min-height: calc(100vh - var(--hts-header-h) - 80px);
}

/* Glass entry card */
.hts-entry-card {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius);
  padding: 40px 48px;
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.9);
  max-width: var(--hts-content-w);
  margin: 0 auto;
}
@supports (backdrop-filter: blur(1px)) {
  .hts-entry-card {
    backdrop-filter: var(--hts-blur);
    -webkit-backdrop-filter: var(--hts-blur);
  }
}
[data-hts-theme="dark"] .hts-entry-card,
[data-ph-theme="dark"] .hts-entry-card {
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.04);
}

/* Entry header */
.hts-entry-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hts-border-subtle);
}
.hts-entry-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--hts-accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.hts-entry-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.hts-entry-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--hts-text-faint);
}
.hts-entry-meta a { color: var(--hts-text-muted); }
.hts-entry-meta span { display: flex; align-items: center; gap: 5px; }

/* Featured image */
.hts-featured-img {
  width: 100%;
  border-radius: var(--hts-radius-sm);
  margin-bottom: 32px;
  object-fit: cover;
  max-height: 400px;
}

/* Entry content */
.hts-entry-content {
  font-size: 1.02rem;
  line-height: 1.8;
}
.hts-entry-content > * + * { margin-top: 1.1em; }
.hts-entry-content h2,
.hts-entry-content h3,
.hts-entry-content h4 {
  margin-top: 2em;
}

/* Entry footer */
.hts-entry-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hts-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
  color: var(--hts-text-faint);
}
.hts-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hts-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--hts-radius-pill);
  font-size: .78rem;
  font-weight: 500;
  background: rgba(22,163,74,.10);
  color: var(--hts-accent);
  border: 1px solid rgba(22,163,74,.18);
  text-decoration: none;
}
.hts-tag:hover {
  background: rgba(22,163,74,.18);
  color: var(--hts-accent-dark);
  text-decoration: none;
}

/* Post navigation */
.hts-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  max-width: var(--hts-content-w);
  margin-left: auto;
  margin-right: auto;
}
.hts-post-nav a {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius-sm);
  padding: 16px 20px;
  text-decoration: none !important;
  transition: var(--hts-transition);
  display: block;
}
@supports (backdrop-filter: blur(1px)) {
  .hts-post-nav a { backdrop-filter: var(--hts-blur); }
}
.hts-post-nav a:hover {
  border-color: rgba(22,163,74,.35);
  transform: translateY(-2px);
  box-shadow: var(--hts-shadow);
}
.hts-post-nav .hts-nav-dir {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hts-accent);
  margin-bottom: 4px;
}
.hts-post-nav .hts-nav-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--hts-text);
  line-height: 1.4;
}
.hts-post-nav-next { text-align: right; }

/* Comments */
.hts-comments {
  max-width: var(--hts-content-w);
  margin: 32px auto 0;
}
.hts-comments-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hts-border-subtle);
}

/* Blog archive */
.hts-archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: var(--hts-content-w);
  margin: 0 auto;
}
.hts-post-card {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius);
  padding: 24px 28px;
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.9);
  transition: var(--hts-transition);
}
@supports (backdrop-filter: blur(1px)) {
  .hts-post-card { backdrop-filter: var(--hts-blur); }
}
.hts-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hts-shadow-lg), inset 0 1px 0 rgba(255,255,255,.95);
  border-color: rgba(22,163,74,.25);
}
.hts-post-card-meta {
  font-size: .82rem;
  color: var(--hts-text-faint);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hts-post-card h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.hts-post-card h2 a {
  color: var(--hts-text);
  text-decoration: none;
}
.hts-post-card h2 a:hover { color: var(--hts-accent); text-decoration: none; }
.hts-post-card-excerpt {
  font-size: .92rem;
  color: var(--hts-text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.hts-read-more {
  font-size: .85rem;
  font-weight: 600;
  color: var(--hts-accent);
}
.hts-read-more:hover { color: var(--hts-accent-dark); text-decoration: none; }

/* Pagination */
.hts-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hts-pagination a,
.hts-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--hts-radius-sm);
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid var(--hts-border-subtle);
  text-decoration: none;
  transition: var(--hts-transition);
  color: var(--hts-text-muted);
  background: var(--hts-glass);
}
.hts-pagination a:hover {
  border-color: var(--hts-accent);
  color: var(--hts-accent);
  background: rgba(22,163,74,.08);
  text-decoration: none;
}
.hts-pagination span.current {
  background: var(--hts-accent);
  color: #fff;
  border-color: var(--hts-accent);
}

/* ============================================================
   9. SIDEBAR LAYOUT (optional)
   ============================================================ */
.hts-two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  max-width: var(--hts-max-w);
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}
.hts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hts-widget {
  background: var(--hts-glass);
  border: 1px solid var(--hts-border);
  border-radius: var(--hts-radius);
  padding: 20px;
  box-shadow: var(--hts-shadow), inset 0 1px 0 rgba(255,255,255,.9);
}
@supports (backdrop-filter: blur(1px)) {
  .hts-widget { backdrop-filter: var(--hts-blur); }
}
.hts-widget-title {
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hts-text-faint);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hts-border-subtle);
}

/* ============================================================
   10. 404 PAGE
   ============================================================ */
.hts-404 {
  text-align: center;
  padding: 80px 24px;
}
.hts-404-code {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hts-404 h2 { margin-bottom: 12px; }
.hts-404 p { color: var(--hts-text-muted); margin-bottom: 32px; }

/* ============================================================
   11. SITE FOOTER
   ============================================================ */
#site-footer {
  margin-top: auto;
  background: rgba(255,255,255,.52);
  border-top: 1px solid var(--hts-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
@supports (backdrop-filter: blur(1px)) {
  #site-footer {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
}
[data-hts-theme="dark"] #site-footer,
[data-ph-theme="dark"] #site-footer {
  background: rgba(8,12,26,.62);
  border-top-color: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.hts-footer-inner {
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.hts-footer-copy {
  font-size: .85rem;
  color: var(--hts-text-faint);
}
.hts-footer-copy a { color: var(--hts-text-muted); }
.hts-footer-copy a:hover { color: var(--hts-accent); }
.hts-footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 4px;
}
.hts-footer-nav ul li a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--hts-text-faint);
  padding: 4px 10px;
  border-radius: var(--hts-radius-pill);
  text-decoration: none;
  transition: var(--hts-transition);
}
.hts-footer-nav ul li a:hover { color: var(--hts-accent); background: rgba(22,163,74,.08); }
.hts-footer-brand {
  font-size: .82rem;
  font-weight: 700;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   12. FORMS
   ============================================================ */
.hts-form-group {
  margin-bottom: 20px;
}
.hts-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--hts-text-muted);
  margin-bottom: 6px;
}
.hts-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hts-border-subtle);
  border-radius: var(--hts-radius-sm);
  background: var(--hts-glass);
  color: var(--hts-text);
  font-size: .95rem;
  transition: var(--hts-transition);
  outline: none;
}
@supports (backdrop-filter: blur(1px)) {
  .hts-input { backdrop-filter: var(--hts-blur); }
}
.hts-input:focus {
  border-color: var(--hts-accent);
  box-shadow: 0 0 0 3px var(--hts-accent-glow);
  background: var(--hts-glass-hover);
}
.hts-input::placeholder { color: var(--hts-text-faint); }

/* WP comment form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hts-border-subtle);
  border-radius: var(--hts-radius-sm);
  background: var(--hts-glass);
  color: var(--hts-text);
  font-size: .95rem;
  transition: var(--hts-transition);
  outline: none;
  margin-bottom: 14px;
  font-family: var(--hts-font);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--hts-accent);
  box-shadow: 0 0 0 3px var(--hts-accent-glow);
}
.comment-form input[type="submit"] {
  padding: 10px 24px;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
  border: none;
  border-radius: var(--hts-radius-pill);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--hts-transition);
  font-family: var(--hts-font);
}
.comment-form input[type="submit"]:hover {
  box-shadow: 0 4px 16px var(--hts-accent-glow);
  transform: translateY(-1px);
}

/* Search form */
.search-form {
  display: flex;
  gap: 8px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--hts-border-subtle);
  border-radius: var(--hts-radius-sm);
  background: var(--hts-glass);
  color: var(--hts-text);
  font-size: .95rem;
  outline: none;
  font-family: var(--hts-font);
}
.search-form input[type="submit"] {
  padding: 10px 20px;
  background: var(--hts-accent);
  color: #fff;
  border: none;
  border-radius: var(--hts-radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--hts-font);
}

/* ============================================================
   13. WP ALIGN CLASSES
   ============================================================ */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.alignwide {
  margin-left: -48px;
  margin-right: -48px;
  max-width: calc(100% + 96px);
}
.wp-caption-text {
  font-size: .82rem;
  color: var(--hts-text-faint);
  text-align: center;
  margin-top: 6px;
}

/* ============================================================
   14. GUTENBERG BLOCKS (minimal)
   ============================================================ */
.wp-block-quote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--hts-accent);
  background: var(--hts-glass);
  border-radius: 0 var(--hts-radius-sm) var(--hts-radius-sm) 0;
  backdrop-filter: var(--hts-blur);
  font-style: italic;
  color: var(--hts-text-muted);
}
.wp-block-code {
  background: rgba(10,12,26,.82);
  color: #e8eaf0;
  border-radius: var(--hts-radius-sm);
  border: 1px solid rgba(22,163,74,.18);
  padding: 1.25em 1.5em;
  font-size: .85em;
}
.wp-block-image img { border-radius: var(--hts-radius-sm); }
.wp-block-button__link {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
  border-radius: var(--hts-radius-pill) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 2px 12px var(--hts-accent-glow);
}
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--hts-border-subtle);
  margin: 2em 0;
}
.wp-block-pullquote {
  border-top: 4px solid var(--hts-accent);
  border-bottom: 4px solid var(--hts-accent);
  padding: 1.5em 0;
  text-align: center;
}

/* ============================================================
   15. SCROLL TO TOP BUTTON
   ============================================================ */
#hts-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hts-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px var(--hts-accent-glow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
  z-index: 500;
}
#hts-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#hts-scroll-top:hover { box-shadow: 0 6px 24px var(--hts-accent-glow); transform: translateY(-2px); }

/* ============================================================
   16. RESPONSIVE — TABLET / MOBILE
   ============================================================ */
@media (max-width: 900px) {
  .hts-two-col {
    grid-template-columns: 1fr;
  }
  .hts-sidebar {
    order: -1;
  }
  .alignwide {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root { --hts-header-h: 56px; }

  #site-nav { display: none; }
  .hts-menu-toggle { display: flex; }

  .hts-entry-card {
    padding: 24px 20px;
  }
  .hts-hero {
    padding: 52px 0 44px;
  }
  .hts-hero-actions .hts-btn { width: 100%; justify-content: center; }
  .hts-hero-stats { flex-direction: row; }
  .hts-stat-item {
    padding: 12px 16px;
    flex: 1;
  }
  .hts-stat-num { font-size: 1.35rem; }
  .hts-cards-grid { grid-template-columns: 1fr; }
  .hts-post-nav { grid-template-columns: 1fr; }
  .hts-post-nav-next { text-align: left; }
  .hts-footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .hts-footer-nav ul { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hts-wrap, .hts-content-wrap { padding: 0 16px; }
  .hts-section { padding: 40px 0; }
  #site-content { padding: 28px 0 48px; }
  .hts-hero-stats { flex-direction: column; gap: 0; }
  .hts-stat-item { border-right: none; border-bottom: 1px solid var(--hts-border-subtle); }
  .hts-stat-item:last-child { border-bottom: none; }
}

/* ============================================================
   17. ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--hts-accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
  width: 1px;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 999;
  padding: 8px 16px;
  background: var(--hts-accent);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ============================================================
   18. PRINT
   ============================================================ */
@media print {
  #site-header, #site-footer, .hts-post-nav,
  .hts-hero-actions, #hts-scroll-top { display: none !important; }
  body { background: #fff; color: #000; }
  .hts-entry-card { box-shadow: none; border: 1px solid #ddd; }
}
