/*
Theme Name: artificialic Blog
Theme URI: https://artificialic.com/blog
Author: Artificialic, Inc.
Author URI: https://artificialic.com
Description: Tema oficial del blog de artificialic. Diseño coherente con la plataforma principal: dark/light mode, fuente Outfit, colores green-primary sobre navy-dark.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: artificialic-blog
Tags: blog, dark-mode, custom-menu, translation-ready, one-column, two-columns, grid-layout
*/

/* ==========================================================================
   0. CSS CUSTOM PROPERTIES — idénticas a globals.css de la web
   ========================================================================== */

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 142.1 70.6% 45.3%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 142.1 76.2% 36.3%;
  --radius: 0.5rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 142.1 70.6% 45.3%;
  --primary-foreground: 144.9 80.4% 10%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 142.1 76.2% 36.3%;
}

/* ==========================================================================
   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: 'Outfit', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

*,
*::before,
*::after {
  border-color: hsl(var(--border));
}

::selection {
  background-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--foreground));
}

/* ==========================================================================
   2. LAYOUT
   ========================================================================== */

.container {
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.container-prose {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 640px) {
  .container-prose {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* ==========================================================================
   3. NAVBAR / SITE HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

@media (min-width: 640px) {
  .site-header {
    background-color: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: hsl(var(--foreground));
}

.site-brand img {
  width: 28px;
  height: 28px;
}

.site-brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  display: none;
}

@media (min-width: 640px) {
  .site-brand-name {
    display: inline;
  }
}

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a,
.nav-desktop .menu-item a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
  transition: color 0.15s ease;
}

.nav-desktop a:hover,
.nav-desktop .menu-item a:hover {
  color: hsl(var(--foreground));
}

.nav-desktop .current-menu-item a,
.nav-desktop .current_page_item a {
  color: hsl(var(--foreground));
}

/* Nav desktop — flatten WP menu structure */
.nav-desktop .menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

/* Hamburger button */
.hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  color: hsl(var(--foreground));
  transition: background-color 0.15s;
}

.hamburger-btn:hover {
  background-color: hsl(var(--accent));
}

@media (min-width: 768px) {
  .hamburger-btn {
    display: none;
  }
}

.hamburger-btn .icon-menu,
.hamburger-btn .icon-x {
  width: 1.25rem;
  height: 1.25rem;
}

.hamburger-btn .icon-x {
  display: none;
}

.hamburger-btn.active .icon-menu {
  display: none;
}

.hamburger-btn.active .icon-x {
  display: block;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  background-color: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.mobile-nav.open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a,
.mobile-nav .menu-item a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  transition: color 0.15s;
}

.mobile-nav a:hover,
.mobile-nav .menu-item a:hover {
  color: hsl(var(--foreground));
}

.mobile-nav .menu-item:last-child a {
  border-bottom: none;
}

/* Dark mode toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.theme-toggle .icon-sun {
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

.dark .theme-toggle .icon-sun {
  display: none;
}

.dark .theme-toggle .icon-moon {
  display: block;
}

/* Skip to content — body offset */
.site-content {
  padding-top: 4rem;
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  height: 2.5rem;
  padding: 0 1rem;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.btn-sm {
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 2rem;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-pill {
  border-radius: 9999px;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ==========================================================================
   5. CARDS
   ========================================================================== */

.card {
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 640px) {
  .card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  }
}

.card-thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: hsl(var(--muted));
  flex-shrink: 0;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.card-title a {
  color: hsl(var(--card-foreground));
  transition: color 0.15s;
}

.card-title a:hover {
  color: hsl(var(--primary));
}

.card-excerpt {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.card-meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-meta-author img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  object-fit: cover;
}

.card-meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background-color: hsl(var(--muted-foreground) / 0.4);
}

/* ==========================================================================
   6. BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
}

.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

/* ==========================================================================
   7. BLOG HERO
   ========================================================================== */

.blog-hero {
  position: relative;
  padding: 4rem 0 3rem;
  text-align: center;
  background: radial-gradient(ellipse at top, hsl(var(--primary) / 0.08), transparent 60%);
  overflow: hidden;
}

/* Green dot pattern — identical to landing page */
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, hsl(142.1 70.6% 45.3%) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.9;
  mask-image: radial-gradient(circle 400px at 50% 0%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 400px at 50% 0%, black 0%, transparent 100%);
  pointer-events: none;
}

.dark .blog-hero::before {
  opacity: 0.4;
}

@media (max-width: 639px) {
  .blog-hero::before {
    display: none;
  }
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .blog-hero {
    padding: 4.5rem 0 3rem;
  }
}

.blog-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .blog-hero h1 {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .blog-hero h1 {
    font-size: 3.5rem;
  }
}

.blog-hero p {
  font-size: 1.0625rem;
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.625;
}

/* ==========================================================================
   8. POST FEED (Instagram / Medium style)
   ========================================================================== */

.feed-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

@media (min-width: 640px) {
  .feed-container {
    padding: 0 1.5rem;
  }
}

.post-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Feed item */
.feed-item {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid hsl(var(--border));
}

.feed-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Header: avatar + author + date */
.feed-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.feed-item-header .card-meta-author {
  gap: 0.5rem;
}

.feed-item-header .card-meta-author a {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.feed-item-header .card-meta-author img {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
}

/* Image */
.feed-item-image {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: hsl(var(--muted));
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .feed-item-image {
    border-radius: calc(var(--radius) * 1.5);
  }
}

.feed-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.feed-item:hover .feed-item-image img {
  transform: scale(1.03);
}

/* Placeholder when no featured image */
.feed-item-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--muted)));
  color: hsl(var(--muted-foreground) / 0.4);
}

/* Content */
.feed-item-content {
  padding: 0;
}

/* Actions row */
.feed-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.feed-item-actions .badge {
  margin-bottom: 0;
}

.feed-item-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Title */
.feed-item-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .feed-item-title {
    font-size: 1.625rem;
  }
}

.feed-item-title a {
  color: hsl(var(--foreground));
  transition: color 0.15s;
}

.feed-item-title a:hover {
  color: hsl(var(--primary));
}

/* Excerpt */
.feed-item-excerpt {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.feed-item-excerpt p {
  margin: 0;
}

/* Read more link */
.feed-item-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--primary));
  transition: gap 0.2s ease;
}

.feed-item-readmore:hover {
  gap: 0.625rem;
}

/* Infinite scroll loader */
.feed-loader {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.feed-loader.done {
  display: none;
}

.feed-spinner svg {
  color: hsl(var(--primary));
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Feed end message */
.feed-end {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

/* POST GRID — kept for archive/search pages */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Layout con sidebar */
.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .content-area.has-sidebar {
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }
}

/* ==========================================================================
   9. PAGINATION
   ========================================================================== */

.pagination,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 3rem;
}

.pagination .page-numbers,
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  transition: background-color 0.15s, color 0.15s;
}

.pagination .page-numbers:hover,
.nav-links .page-numbers:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.pagination .page-numbers.current,
.nav-links .page-numbers.current {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.pagination .page-numbers.dots {
  pointer-events: none;
}

/* ==========================================================================
   10. SINGLE POST
   ========================================================================== */

.single-hero {
  margin-bottom: 2rem;
}

.single-hero img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.single-header {
  margin-bottom: 2rem;
}

.single-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .single-header h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .single-header h1 {
    font-size: 2.75rem;
  }
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.single-meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.single-meta-author img {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
}

.single-meta-author span {
  font-weight: 500;
  color: hsl(var(--foreground));
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.single-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.15s, color 0.15s;
}

.single-tags a:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: background-color 0.15s;
}

.post-navigation a:hover {
  background-color: hsl(var(--accent));
}

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

.post-navigation .nav-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Author box */
.author-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-top: 2.5rem;
  background-color: hsl(var(--card));
}

.author-box img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-box-content p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* Related posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}

.related-posts h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   11. PROSE / ENTRY CONTENT
   ========================================================================== */

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: hsl(var(--foreground));
}

.entry-content > * + * {
  margin-top: 1.25em;
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

.entry-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.entry-content h5,
.entry-content h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.entry-content p {
  margin-top: 1.25em;
  margin-bottom: 0;
}

.entry-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.15s;
}

.entry-content a:hover {
  color: hsl(var(--primary) / 0.8);
}

.entry-content strong {
  font-weight: 600;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-top: 1.25em;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-top: 0.5em;
  padding-left: 0.375em;
}

.entry-content li::marker {
  color: hsl(var(--muted-foreground));
}

.entry-content blockquote {
  padding-left: 1.25rem;
  border-left: 3px solid hsl(var(--primary));
  font-style: italic;
  color: hsl(var(--muted-foreground));
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content blockquote p {
  margin-top: 0;
}

.entry-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
  background-color: hsl(var(--muted));
  padding: 0.2em 0.4em;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
}

.entry-content pre {
  background-color: hsl(var(--muted));
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid hsl(var(--border));
}

.dark .entry-content pre {
  background-color: hsl(217.2 32.6% 12%);
}

.entry-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.entry-content img {
  border-radius: var(--radius);
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content figure {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content figcaption {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-top: 0.5rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-size: 0.9375rem;
}

.entry-content th {
  background-color: hsl(var(--muted));
  font-weight: 600;
  text-align: left;
  padding: 0.625rem 0.75rem;
  border: 1px solid hsl(var(--border));
}

.entry-content td {
  padding: 0.625rem 0.75rem;
  border: 1px solid hsl(var(--border));
}

.entry-content hr {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 2em 0;
}

/* WP specific content classes */
.entry-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content .alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content .wp-caption {
  max-width: 100%;
}

.entry-content .wp-caption-text {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-top: 0.5rem;
}

.entry-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content .gallery-item {
  margin: 0;
}

.entry-content .gallery-item img {
  margin: 0;
  border-radius: calc(var(--radius) - 2px);
}

/* ==========================================================================
   12. SIDEBAR / WIDGETS
   ========================================================================== */

.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
  }
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

/* Search widget */
.widget_search .search-form {
  display: flex;
  gap: 0.5rem;
}

/* Recent posts widget */
.widget_recent_entries ul {
  list-style: none;
}

.widget_recent_entries li {
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
}

.widget_recent_entries li:last-child {
  border-bottom: none;
}

.widget_recent_entries a {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: color 0.15s;
}

.widget_recent_entries a:hover {
  color: hsl(var(--primary));
}

.widget_recent_entries .post-date {
  display: block;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}

/* Categories widget */
.widget_categories ul {
  list-style: none;
}

.widget_categories li {
  margin-bottom: 0.375rem;
}

.widget_categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  padding: 0.375rem 0;
  transition: color 0.15s;
}

.widget_categories a:hover {
  color: hsl(var(--foreground));
}

/* Tag cloud widget */
.widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.widget_tag_cloud .tagcloud a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem !important;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.15s, color 0.15s;
}

.widget_tag_cloud .tagcloud a:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}

/* ==========================================================================
   13. COMMENTS
   ========================================================================== */

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

.comments-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
}

.comment {
  margin-bottom: 1.5rem;
}

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

.comment-body {
  padding: 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-meta .avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
}

.comment-author {
  font-size: 0.875rem;
  font-weight: 600;
}

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

.comment-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
}

.comment-content p {
  margin-bottom: 0.5rem;
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--primary));
  margin-top: 0.5rem;
  transition: color 0.15s;
}

.comment-reply-link:hover {
  color: hsl(var(--primary) / 0.8);
}

/* Comment form */
.comment-respond {
  margin-top: 2rem;
}

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

.comment-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: hsl(var(--foreground));
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: 'Outfit', sans-serif;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: border-color 0.15s, box-shadow 0.15s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.comment-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.comment-form .form-submit {
  margin-top: 1rem;
}

.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  font-family: 'Outfit', sans-serif;
}

.comment-form .submit:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.comment-form p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   14. SEARCH FORM
   ========================================================================== */

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: 'Outfit', sans-serif;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-form .search-field:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.search-form .search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: background-color 0.15s;
}

.search-form .search-submit:hover {
  background-color: hsl(var(--primary) / 0.9);
}

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.5);
}

.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.footer-channel-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.footer-channel-icons a {
  display: inline-flex;
}

.footer-channel-icons svg {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.footer-channel-icons a:hover svg {
  opacity: 0.8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--foreground));
}

.footer-brand-link img {
  width: 28px;
  height: 28px;
}

.footer-brand-link span {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.footer-brand p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s;
}

.footer-col a:hover {
  color: hsl(var(--foreground));
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.footer-social a {
  color: hsl(var(--muted-foreground) / 0.6);
  transition: color 0.15s;
}

.footer-social a:hover {
  color: hsl(var(--foreground));
}

.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid hsl(var(--border));
  padding-top: 1.5rem;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground) / 0.6);
}

/* ==========================================================================
   16. 404 PAGE
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 6rem 1.5rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-404 .error-code {
  font-size: 6rem;
  font-weight: 900;
  color: hsl(var(--primary));
  line-height: 1;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .error-404 .error-code {
    font-size: 8rem;
  }
}

.error-404 h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .error-404 h1 {
    font-size: 1.875rem;
  }
}

.error-404 p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  max-width: 28rem;
}

.error-404 .search-form {
  max-width: 24rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   17. ARCHIVE / SEARCH RESULTS HEADER
   ========================================================================== */

.archive-header,
.search-header {
  position: relative;
  padding: 3rem 0 2rem;
  text-align: center;
  background: radial-gradient(ellipse at top, hsl(var(--primary) / 0.05), transparent 60%);
  overflow: hidden;
}

.archive-header::before,
.search-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, hsl(142.1 70.6% 45.3%) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  mask-image: radial-gradient(circle 300px at 50% 0%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 300px at 50% 0%, black 0%, transparent 100%);
  pointer-events: none;
}

.dark .archive-header::before,
.dark .search-header::before {
  opacity: 0.25;
}

@media (max-width: 639px) {
  .archive-header::before,
  .search-header::before {
    display: none;
  }
}

.archive-header .container,
.search-header .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .archive-header,
  .search-header {
    padding: 4rem 0 3rem;
  }
}

.archive-header h1,
.search-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .archive-header h1,
  .search-header h1 {
    font-size: 2rem;
  }
}

.archive-header p,
.search-header p {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
}

.no-results {
  text-align: center;
  padding: 4rem 1.5rem;
}

.no-results h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.no-results p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.no-results .search-form {
  max-width: 24rem;
  margin: 0 auto;
}

/* ==========================================================================
   18. ACCESSIBILITY
   ========================================================================== */

.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;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: hsl(var(--background));
  clip: auto !important;
  clip-path: none;
  color: hsl(var(--primary));
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
  box-shadow: 0 0 0 2px hsl(var(--ring));
  border-radius: var(--radius);
}

/* ==========================================================================
   19. ANIMATIONS
   ========================================================================== */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   20. WORDPRESS CORE CLASSES
   ========================================================================== */

/* Sticky post */
.sticky .card {
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.1);
}

/* WordPress embeds */
.wp-block-embed {
  margin: 1.5em 0;
}

.wp-block-embed iframe {
  max-width: 100%;
}

/* Page links (wp_link_pages) */
.page-links {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.page-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.375rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.page-links .page-numbers.current {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ==========================================================================
   21. UTILITY CLASSES
   ========================================================================== */

.text-muted {
  color: hsl(var(--muted-foreground));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
