/*
Theme Name: Recap Marketing
Theme URI: https://vendasagrob2b.com.br
Author: Maxuel Sousa
Author URI: https://vendasagrob2b.com.br
Description: Tema editorial moderno para blog de Marketing e Negócios, inspirado no layout Recap — tipografia limpa, grid clássico, modo escuro nativo.
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: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: recap-marketing
Tags: blog, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =====================================================
   DESIGN SYSTEM — CSS VARIABLES
   ===================================================== */

:root {
  /* Colors - Light Mode */
  --color-bg:           #ffffff;
  --color-bg-alt:       #f7f7f5;
  --color-bg-subtle:    #f0efe9;
  --color-surface:      #ffffff;
  --color-border:       #e8e8e2;
  --color-border-dark:  #d0cfc8;
  --color-text:         #111110;
  --color-text-muted:   #6b6b65;
  --color-text-light:   #9a9a92;
  --color-accent:       #111110;
  --color-accent-hover: #333330;
  --color-tag-bg:       #111110;
  --color-tag-text:     #ffffff;
  --color-link:         #111110;
  --color-link-hover:   #555550;

  /* Typography */
  --font-display:  'Playfair Display', 'Georgia', serif;
  --font-sans:     'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;

  /* Layout */
  --container-max:  1240px;
  --content-max:    740px;
  --sidebar-width:  300px;
  --grid-gap:       24px;
  --border-radius:  4px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg:           #0f0f0e;
  --color-bg-alt:       #161615;
  --color-bg-subtle:    #1d1d1b;
  --color-surface:      #1a1a18;
  --color-border:       #2a2a27;
  --color-border-dark:  #3a3a36;
  --color-text:         #f5f5f0;
  --color-text-muted:   #999992;
  --color-text-light:   #666660;
  --color-accent:       #f5f5f0;
  --color-accent-hover: #ccccC4;
  --color-tag-bg:       #f5f5f0;
  --color-tag-text:     #0f0f0e;
  --color-link:         #f5f5f0;
  --color-link-hover:   #ccccC4;
}

/* =====================================================
   RESET & BASE
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover { color: var(--color-link-hover); }

ul, ol { list-style: none; }

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =====================================================
   TOPBAR — CATEGORIES STRIP
   ===================================================== */

.site-topbar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-inner::-webkit-scrollbar { display: none; }

.topbar-label {
  color: var(--color-text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-cats {
  display: flex;
  gap: var(--space-md);
}

.topbar-cats a {
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.topbar-cats a:hover { color: var(--color-text); }

/* =====================================================
   SITE HEADER
   ===================================================== */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--space-md) 0;
  gap: var(--space-md);
}

/* Logo */
.site-branding { display: flex; align-items: center; }

.site-logo img {
  height: 36px;
  width: auto;
}

.site-title-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}
.site-title-text:hover { color: var(--color-text-muted); }

/* Navigation */
.main-nav { justify-self: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-menu > li > a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.01em;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  border-bottom-color: var(--color-text);
}

/* Dropdown */
.nav-menu li { position: relative; }

.nav-menu li ul {
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 200;
}
.nav-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu li ul li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.nav-menu li ul li:last-child a { border-bottom: none; }
.nav-menu li ul li a:hover { color: var(--color-text); background: var(--color-bg-alt); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-self: end;
}

.btn-search,
.btn-theme {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.btn-search:hover,
.btn-theme:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

/* Mobile nav toggle */
.btn-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-xs);
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .btn-menu { display: flex; }
  .main-nav.open {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 999;
    padding: var(--space-2xl) var(--space-xl);
    overflow-y: auto;
  }
  .main-nav.open .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  .main-nav.open .nav-menu > li > a {
    font-size: 1.5rem;
    font-family: var(--font-display);
  }
  .nav-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-xl);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
  }
}

/* =====================================================
   SEARCH OVERLAY
   ===================================================== */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}
.search-form-wrap {
  width: 100%;
  max-width: 600px;
  padding: var(--space-xl);
}
.search-form-wrap form {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #fff;
  gap: var(--space-md);
}
.search-form-wrap input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  padding: var(--space-md) 0;
}
.search-form-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.search-form-wrap button[type="submit"] {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}
.search-form-wrap button:hover { opacity: 1; }
.search-close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}
.search-close:hover { opacity: 1; }

/* =====================================================
   HERO / FEATURED BANNER
   ===================================================== */

.hero-section {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  align-items: start;
}

.hero-main .post-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
}
.hero-main .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.hero-main:hover .post-thumbnail img { transform: scale(1.02); }

.hero-main .post-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.hero-main .post-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.hero-main .post-excerpt {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.hero-sidebar { display: flex; flex-direction: column; gap: 0; }

.hero-sidebar-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}
.hero-sidebar-item:first-child { border-top: 1px solid var(--color-border); }

.hero-sidebar-item .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--border-radius);
}
.hero-sidebar-item .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}
.hero-sidebar-item:hover .thumb img { transform: scale(1.05); }

.hero-sidebar-item .post-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: var(--space-xs);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* =====================================================
   CATEGORY PILLS / TAGS
   ===================================================== */

.post-cat a,
.cat-pill {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px var(--space-sm);
  border-radius: 2px;
  transition: opacity var(--transition-fast);
}
.post-cat a:hover { opacity: 0.75; }

/* =====================================================
   POST META
   ===================================================== */

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-light);
  flex-wrap: wrap;
}
.post-meta .sep { opacity: 0.4; }
.post-meta a { color: var(--color-text-muted); }
.post-meta a:hover { color: var(--color-text); }

.author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================
   MAIN LAYOUT (Content + Sidebar)
   ===================================================== */

.site-main {
  padding: var(--space-2xl) 0;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-3xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* =====================================================
   POSTS GRID — CLASSIC LAYOUT
   ===================================================== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl) var(--grid-gap);
}

@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* Post Card */
.post-card { display: flex; flex-direction: column; }

.post-card .card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  background: var(--color-bg-subtle);
}
.post-card .card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.post-card:hover .card-thumb img { transform: scale(1.04); }

.post-card .card-cats { margin-bottom: var(--space-sm); }

.post-card .card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}
.post-card .card-title a { color: var(--color-text); }
.post-card .card-title a:hover { color: var(--color-text-muted); }

.post-card .card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  flex: 1;
}

.post-card .card-meta { margin-top: auto; }

/* No Thumbnail Variant */
.post-card.no-thumb {
  border-top: 2px solid var(--color-text);
  padding-top: var(--space-md);
}

/* =====================================================
   SECTION HEADINGS
   ===================================================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-text);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}

.section-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.section-link:hover { color: var(--color-text); }

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.widget { }

.widget-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-text);
  margin-bottom: var(--space-md);
}

/* Recent Posts Widget */
.widget-recent-posts { display: flex; flex-direction: column; gap: 0; }

.recent-post-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.recent-post-item:last-child { border-bottom: none; }

.recent-post-item .rp-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--border-radius);
}
.recent-post-item .rp-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}
.recent-post-item:hover .rp-thumb img { transform: scale(1.06); }

.rp-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3px;
  color: var(--color-text);
}
.rp-title:hover { color: var(--color-text-muted); }

.rp-date {
  font-size: 0.72rem;
  color: var(--color-text-light);
}

/* Search Widget */
.widget-search .search-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.widget-search .search-input-wrap:focus-within {
  border-color: var(--color-text);
}
.widget-search input[type="search"] {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--color-text);
  font-family: var(--font-sans);
}
.widget-search button {
  background: none;
  border: none;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.widget-search button:hover { color: var(--color-text); }

/* Categories Widget */
.widget-categories ul { display: flex; flex-direction: column; gap: 0; }
.widget-categories li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.widget-categories li:last-child a { border-bottom: none; }
.widget-categories li a:hover { color: var(--color-text); }
.widget-categories .cat-count {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

/* About Widget */
.widget-about {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  text-align: center;
}
.widget-about .about-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
}
.widget-about .about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.widget-about .about-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.widget-about .about-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =====================================================
   PAGINATION
   ===================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  justify-content: center;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.page-numbers:hover,
.page-numbers.current {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}
.page-numbers.dots { border: none; cursor: default; }

/* =====================================================
   SINGLE POST
   ===================================================== */

.single-post-header {
  max-width: var(--content-max);
  margin: 0 auto var(--space-xl);
  padding-top: var(--space-2xl);
}

.single-post-header .post-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: var(--space-md) 0;
}

.single-hero-img {
  max-width: var(--container-max);
  margin: 0 auto var(--space-2xl);
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 21/9;
}
.single-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.post-content {
  max-width: var(--content-max);
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
}

.post-content p { margin-bottom: var(--space-lg); }

.post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--font-display);
  margin: var(--space-xl) 0 var(--space-md);
  letter-spacing: -0.02em;
}
.post-content h2 { font-size: 1.7rem; }
.post-content h3 { font-size: 1.35rem; }
.post-content h4 { font-size: 1.1rem; }

.post-content ul, .post-content ol {
  list-style: initial;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-lg);
}
.post-content li { margin-bottom: var(--space-sm); }

.post-content blockquote {
  border-left: 3px solid var(--color-text);
  margin: var(--space-xl) 0;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text-muted);
}

.post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content figure { margin: var(--space-xl) 0; }
.post-content figcaption {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Post Tags */
.post-tags {
  max-width: var(--content-max);
  margin: var(--space-xl) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.tag-pill {
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border-dark);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.tag-pill:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Author Box */
.author-box {
  max-width: var(--content-max);
  margin: var(--space-2xl) auto;
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}
.author-box-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.author-box-bio {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* Comments */
.comments-area {
  max-width: var(--content-max);
  margin: var(--space-2xl) auto;
}
.comments-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-text);
}
.comment {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.comment-avatar { border-radius: 50%; overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author-name { font-weight: 600; font-size: 0.9rem; margin-bottom: var(--space-xs); }
.comment-date { font-size: 0.75rem; color: var(--color-text-light); margin-bottom: var(--space-sm); }
.comment-content { font-size: 0.9rem; line-height: 1.65; color: var(--color-text-muted); }

.comment-respond .comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}
.comment-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-fast);
  outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-text); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input[type="submit"] {
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.comment-form input[type="submit"]:hover { opacity: 0.75; }

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .site-title-text { font-size: 1.25rem; display: block; margin-bottom: var(--space-md); }
.footer-brand .tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--color-text); }

.footer-search .search-input-wrap {
  display: flex;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
}
.footer-search input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--color-text);
  font-family: var(--font-sans);
}
.footer-search button {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}
.footer-search button:hover { opacity: 0.8; }

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-copy { font-size: 0.8rem; color: var(--color-text-light); }
.footer-bottom-links { display: flex; gap: var(--space-lg); }
.footer-bottom-links a { font-size: 0.8rem; color: var(--color-text-light); }
.footer-bottom-links a:hover { color: var(--color-text); }

/* =====================================================
   ARCHIVE / CATEGORY PAGE
   ===================================================== */

.archive-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}
.archive-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}
.archive-desc { color: var(--color-text-muted); font-size: 1rem; }
.archive-count { font-size: 0.75rem; color: var(--color-text-light); margin-top: var(--space-sm); }

/* =====================================================
   404 PAGE
   ===================================================== */

.error-404-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  min-height: 60vh;
}
.error-404-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--color-bg-subtle);
  line-height: 1;
  margin-bottom: var(--space-xl);
}
.error-404-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.error-404-desc {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}
.btn-primary {
  display: inline-block;
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity var(--transition-fast);
}
.btn-primary:hover { opacity: 0.75; color: var(--color-bg); }

/* =====================================================
   SCROLL TO TOP
   ===================================================== */

#scroll-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-base);
  z-index: 300;
}
#scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#scroll-top:hover { opacity: 0.75; }

/* =====================================================
   READING PROGRESS BAR
   ===================================================== */

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--color-text);
  width: 0%;
  z-index: 999;
  transition: width 0.1s linear;
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeUp 0.5s ease both;
}

.posts-grid .post-card:nth-child(1) { animation-delay: 0s; }
.posts-grid .post-card:nth-child(2) { animation-delay: 0.08s; }
.posts-grid .post-card:nth-child(3) { animation-delay: 0.16s; }
.posts-grid .post-card:nth-child(4) { animation-delay: 0.24s; }
.posts-grid .post-card:nth-child(5) { animation-delay: 0.32s; }
.posts-grid .post-card:nth-child(6) { animation-delay: 0.40s; }

/* =====================================================
   RESPONSIVE TWEAKS
   ===================================================== */

@media (max-width: 768px) {
  .hero-section { padding: var(--space-lg) 0; }
  .site-main { padding: var(--space-xl) 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header, .site-footer, .sidebar, #scroll-top, #reading-progress { display: none !important; }
  .content-area { grid-template-columns: 1fr; }
}
