/**
 * Interaktionen Theme - Main Stylesheet
 * Minimalist, Accessible, High Performance, Privacy-First
 */

/* ==========================================================================
   1. LAYOUT & CONTAINER
   ========================================================================== */

.site-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-color: var(--color-bg);
}

/* Left Sidebar (Desktop) */
.site-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 3.5rem 2.5rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg);
  z-index: 50;
}

/* Brand / Logo */
.site-branding {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  color: var(--color-text);
}

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

.site-title a:hover {
  color: var(--color-accent);
}

.site-description {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}

/* Primary Navigation in Sidebar */
.sidebar-navigation {
  margin: auto 0;
  padding: 2rem 0;
}

.primary-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.primary-menu li {
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: inline-block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.primary-menu a:hover {
  color: var(--color-accent);
}

/* Active / Current item has crisp rectangular border box */
.primary-menu li.current-menu-item > a,
.primary-menu li.current_page_item > a,
.primary-menu li.active > a {
  border-color: var(--color-text);
  color: var(--color-text);
  font-weight: 600;
}

/* Sidebar Footer (Social Links & Search Button) */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.375rem 0;
  text-align: left;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-search-btn:hover {
  color: var(--color-accent);
}

.sidebar-search-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Social Links */
.social-links {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  opacity: 0.85;
  transition: opacity var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
  padding: 0.25rem;
}

.social-links a:hover {
  opacity: 1;
  color: var(--color-accent);
  transform: translateY(-2px);
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Main Content Wrapper */
.site-main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
}

.site-main {
  flex: 1;
  padding: 4rem 3.5rem 5rem 4rem;
  max-width: var(--content-max-width);
}

/* Mobile Header */
.site-mobile-header {
  display: none;
  height: var(--header-height-mobile);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 0 1.25rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle,
.search-toggle-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.menu-toggle:hover,
.search-toggle-btn:hover {
  background-color: var(--color-border-subtle);
  color: var(--color-accent);
}

.menu-toggle svg,
.search-toggle-btn svg {
  width: 22px;
  height: 22px;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height-mobile);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.mobile-nav-drawer.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-drawer .primary-menu {
  font-size: 1.25rem;
  gap: 1.25rem;
}

.mobile-nav-drawer .social-links {
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
}

.mobile-nav-drawer .social-links svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   2. HERO COMPONENT
   ========================================================================== */

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 8rem);
  padding: 2rem 0;
  max-width: 760px;
}

.hero-kicker {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.875rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--color-text);
  margin: 0 0 2.5rem 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Pill Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8125rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.2;
  text-align: center;
  border: 1.5px solid transparent;
}

.btn-pill-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

.btn-pill-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-pill-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-pill-secondary:hover {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* Front page recent posts section */
.front-page-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.front-posts-header {
  margin-bottom: 2.5rem;
}

.front-page-content {
  margin-top: 3rem;
}

.section-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

/* Horizontal Category Filter Bar (Themen / Fäden) */
.categories-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 2.5rem;
}

.categories-filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted);
}

.categories-filter-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  text-decoration: none;
  background-color: #ffffff;
  transition: all var(--transition-fast);
}

.category-filter-item:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.category-filter-item.is-active {
  background-color: var(--color-text);
  color: #ffffff;
  border-color: var(--color-text);
  font-weight: 600;
}

.category-count {
  font-size: 0.75rem;
  opacity: 0.75;
}

/* ==========================================================================
   3. BLOG LIST & ARCHIVE (Handling ~100 posts smoothly)
   ========================================================================== */

.page-header {
  margin-bottom: 3.5rem;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.page-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 600px;
  line-height: 1.5;
}

.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: transform var(--transition-fast);
}

.post-card:last-child {
  border-bottom: none;
}

.post-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
}

.post-date,
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.post-date svg,
.reading-time svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  stroke: currentColor;
}

.post-category-badge {
  display: inline-block;
  background-color: var(--color-border-subtle);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.post-category-badge:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

.post-card-title {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}

.post-card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-thumbnail {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-border-subtle);
}

.post-card-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.post-card-excerpt {
  color: var(--color-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
}

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  margin-top: 0.25rem;
}

.post-read-more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.post-read-more:hover svg {
  transform: translateX(3px);
}

/* Pagination */
.pagination {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.nav-links,
ul.page-numbers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links .page-numbers,
ul.page-numbers .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.nav-links .page-numbers:hover,
ul.page-numbers .page-numbers:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.nav-links .page-numbers.current,
ul.page-numbers .page-numbers.current {
  background-color: var(--color-text);
  color: #ffffff;
  border-color: var(--color-text);
}

.nav-links .dots,
ul.page-numbers .dots {
  border: none;
  background: transparent;
  color: var(--color-muted);
}

/* ==========================================================================
   4. SINGLE ESSAYS, PROGRESS BAR & TYPOGRAPHY
   ========================================================================== */

/* Visual Reading Progress Bar (Purely client-side helper for long essays) */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--color-accent);
  z-index: 1000;
  width: 0;
  transition: width 0.1s linear;
}

.single-article {
  max-width: 740px;
}

.article-meta-categories {
  margin-bottom: 0.75rem;
}

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--color-accent);
}

.breadcrumbs-sep {
  opacity: 0.5;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--color-text);
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 1.5rem;
}

.article-meta a {
  color: inherit;
  font-weight: 600;
}

.article-meta a:hover {
  color: var(--color-accent);
}

.article-featured-image {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
}

.featured-image-caption {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Rich Content Typography (Optimized for long philosophical/systemic essays) */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1f2937;
}

.article-content p {
  margin-bottom: 1.75rem;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 3rem;
  margin-bottom: 1.125rem;
  color: var(--color-text);
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  color: var(--color-text);
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 3px solid var(--color-text);
  padding-left: 1.5rem;
  margin: 2.25rem 0;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text);
}

.article-content blockquote cite {
  display: block;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--color-muted);
}

.article-content pre {
  background-color: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 2rem 0;
}

.article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  background-color: #f1f5f9;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  color: #0f172a;
}

.article-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.25rem 0;
  font-size: 1rem;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.article-content th {
  font-weight: 700;
  background-color: #f8fafc;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3.5rem 0;
}

.article-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  text-decoration: none;
}

/* Footnotes & Citation styling for scientific / systemic essays */
.article-content .footnotes,
.wp-block-footnotes {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.article-content .footnotes ol,
.wp-block-footnotes ol {
  padding-left: 1.25rem;
}

.article-content .footnotes li,
.wp-block-footnotes li {
  margin-bottom: 0.625rem;
}

/* Post tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

.article-tags-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-right: 0.25rem;
}

.article-tag-item {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-border-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.article-tag-item:hover {
  background-color: var(--color-accent);
  color: #ffffff;
}

/* Related Posts Section (Editorial match by taxonomy) */
.related-posts-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.related-posts-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  color: var(--color-text);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.related-post-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-post-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--color-border-subtle);
}

.related-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.related-post-card:hover .related-post-thumb img {
  transform: scale(1.03);
}

.related-post-meta {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.related-post-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.related-post-card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.related-post-card-title a:hover {
  color: var(--color-accent);
}

/* Author Box */
.author-box {
  margin-top: 3.5rem;
  padding: 1.75rem;
  background-color: #fcfcfd;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.author-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.375rem 0;
}

.author-bio {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* Post Navigation (Prev/Next) */
.post-navigation {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.post-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-nav-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-muted);
}

.post-nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.post-nav-next {
  text-align: right;
}

/* ==========================================================================
   5. COMMENTS SECTION (Accessible & Clean)
   ========================================================================== */

.comments-area {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

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

.comment-list .comment {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
  margin-top: 1.5rem;
  border-left: 2px solid var(--color-border);
}

.comment-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.comment-author-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.comment-date {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.comment-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.comment-reply-link:hover {
  text-decoration: underline;
}

.no-comments {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-top: 1.5rem;
}

/* Comment Form */
.comment-respond {
  margin-top: 2.5rem;
}

.comment-reply-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.comment-reply-title small a {
  font-size: 0.875rem;
  font-weight: normal;
  color: var(--color-muted);
  margin-left: 0.5rem;
}

.comment-notes {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.comment-form {
  display: grid;
  gap: 1.25rem;
}

.comment-form p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.comment-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.comment-form-cookies-consent {
  flex-direction: row !important;
  align-items: center;
  gap: 0.625rem !important;
}

.comment-form-cookies-consent label {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-muted);
}

.form-submit input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  align-self: flex-start;
}

.form-submit input[type="submit"]:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   6. SEARCH FORM & SEARCH OVERLAY
   ========================================================================== */

/* Standard Search Form */
.search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-form-input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  color: var(--color-text);
  background-color: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.search-form-submit {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-muted);
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.search-form-submit:hover {
  color: var(--color-accent);
}

.search-form-submit svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Search Modal Overlay */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.search-modal.is-active,
.search-modal:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: flex;
}

.search-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  cursor: default;
}

.search-modal-content {
  background-color: var(--color-bg);
  width: 100%;
  max-width: 640px;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  transform: translateY(-20px);
  transition: transform 0.25s ease;
}

.search-modal.is-active .search-modal-content,
.search-modal:target .search-modal-content {
  transform: translateY(0);
}

.search-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.search-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.search-modal-close:hover {
  color: var(--color-text);
}

.search-modal-close svg {
  width: 20px;
  height: 20px;
}

/* Search Results Page & Empty States */
.search-query-badge {
  color: var(--color-accent);
}

.no-results-box {
  padding: 3rem 2rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.no-results-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.no-results-text {
  color: var(--color-muted);
  max-width: 480px;
  margin: 0;
}

/* 404 Error Page */
.error-404-container {
  padding: 4rem 0;
}

.hero-kicker-404 {
  color: var(--color-accent);
  font-weight: 700;
}

.error-404-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 500px;
}

/* ==========================================================================
   7. FOOTER, FOOTER MENU & COPYRIGHT
   ========================================================================== */

.site-footer {
  padding: 3rem 4rem;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.875rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-footer-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.site-footer-copyright {
  font-weight: 500;
}

.site-footer-nav {
  display: flex;
  align-items: center;
}

.footer-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin: 0;
  padding: 0;
}

.footer-menu a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-menu a:hover {
  color: var(--color-accent);
}

.llms-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.llms-badge:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 1024px) {
  .site-container {
    flex-direction: column;
  }

  .site-sidebar {
    display: none;
  }

  .site-mobile-header {
    display: flex;
  }

  .mobile-nav-drawer {
    display: flex;
  }

  .site-main {
    padding: 2.5rem 1.5rem 4rem 1.5rem;
  }

  .hero-section {
    min-height: auto;
    padding: 3rem 0 2rem;
  }

  .site-footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-primary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-pill {
    width: 100%;
  }

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

  .post-nav-next {
    text-align: left;
  }

  .search-modal-content {
    padding: 1.75rem 1.25rem;
  }
}

/* ==========================================================================
   9. ACCESSIBILITY & PERFORMANCE ENHANCEMENTS
   ========================================================================== */

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

@media print {
  .site-sidebar,
  .site-mobile-header,
  .search-modal,
  .comments-area,
  .post-navigation,
  .site-footer,
  .reading-progress-bar {
    display: none !important;
  }

  .site-main {
    padding: 0 !important;
    max-width: 100% !important;
  }
}
