/*
Theme Name: Flavor
Theme URI: https://bilgiveriyor.com
Author: BilgiVeriyor
Author URI: https://bilgiveriyor.com
Description: Modern, SEO uyumlu, hızlı WordPress blog teması.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor
Tags: blog, seo, responsive, dark-mode, turkish
*/

/* ==========================================================================
   1. CSS Custom Properties — Design Tokens
   ========================================================================== */

:root {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f6;
  --text-primary: #1a1b2e;
  --text-secondary: #5c5d7a;
  --text-muted: #8b8ca8;
  --accent: #6C63FF;
  --accent-hover: #5b53e0;
  --accent-light: rgba(108, 99, 255, 0.08);
  --accent-secondary: #4ECDC4;
  --accent-gradient: linear-gradient(135deg, #6C63FF, #4ECDC4);
  --border: #e2e4ee;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-height: 70px;
  --sidebar-width: 340px;
  --max-width: 1200px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme='dark'] {
  --bg-primary: #0c0c16;
  --bg-secondary: #14141f;
  --bg-tertiary: #1c1c2a;
  --text-primary: #e6e7f0;
  --text-secondary: #9ea0b8;
  --text-muted: #686888;
  --accent: #7d75ff;
  --accent-hover: #908aff;
  --accent-light: rgba(124, 116, 255, 0.12);
  --accent-secondary: #5ee0d6;
  --border: #28283c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

/* ==========================================================================
   2. CSS Reset / Base
   ========================================================================== */

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

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

button {
  font-family: var(--font-primary);
}

::selection {
  background-color: var(--accent);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--accent);
  color: #ffffff;
}

/* Scrollbar Styling (WebKit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-primary);
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
  font-weight: 700;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

pre {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.9rem;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

em {
  font-style: italic;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: calc(var(--header-height) + 32px) 24px 40px;
  width: 100%;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.site-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

/* ==========================================================================
   5. Header (.site-header)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

[data-theme='dark'] .site-header {
  background: rgba(20, 20, 31, 0.85);
}

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

.site-header.scrolled .header-inner {
  height: 60px;
}

.site-header.scrolled .site-logo img {
  height: 32px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 24px;
  transition: height var(--transition);
}

.site-branding {
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
  transition: height var(--transition);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.site-title a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

/* Primary Navigation */
.nav-primary {
  display: flex;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-item.current-menu-item > .nav-link {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-item.has-children > .nav-link::after {
  content: '▾';
  margin-left: 4px;
  font-size: 0.75em;
}

/* Sub-menu (Dropdown) */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.nav-item:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu .nav-link {
  padding: 8px 12px;
  font-size: 0.85rem;
}

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

.search-toggle,
.theme-toggle,
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.search-toggle:hover,
.theme-toggle:hover,
.hamburger:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.hamburger {
  display: none;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
}

.search-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.search-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
}

.search-form input[type='search'] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.search-form input[type='search']:focus {
  border-color: var(--accent);
  outline: none;
}

.search-form button {
  padding: 14px 24px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  margin-left: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition);
}

.search-form button:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   6. Mobile Menu Overlay
   ========================================================================== */

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 80vw;
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--transition);
  padding: 80px 24px 24px;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu .nav-menu {
  flex-direction: column;
  gap: 4px;
}

.mobile-menu .nav-link {
  padding: 12px 16px;
  font-size: 1rem;
}

.mobile-menu .sub-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  padding-left: 16px;
  background: transparent;
}

.mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.mobile-close:hover {
  background: var(--accent-light);
}

/* ==========================================================================
   7. Hero Post (.hero-post)
   ========================================================================== */

.hero-post {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.hero-post__image {
  position: absolute;
  inset: 0;
}

.hero-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-post__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1));
}

.hero-post__content {
  position: relative;
  z-index: 2;
  padding: 40px;
  color: #ffffff;
  max-width: 700px;
}

.hero-post__category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-decoration: none;
  transition: background var(--transition);
}

.hero-post__category:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.hero-post__title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-post__title a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity var(--transition);
}

.hero-post__title a:hover {
  opacity: 0.9;
}

.hero-post__excerpt {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 16px;
}

.hero-post__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.hero-post__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   8. Post Grid (.post-grid)
   ========================================================================== */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ==========================================================================
   9. Post Card (.post-card)
   ========================================================================== */

.post-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.post-card.animate-fadeInUp {
  opacity: 1;
  transform: translateY(0);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 99, 255, 0.3);
}

[data-theme='dark'] .post-card:hover {
  border-color: rgba(124, 116, 255, 0.3);
}

.post-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.post-card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 2;
  transition: background var(--transition);
}

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

.post-card__content {
  padding: 20px;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-card__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card__read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), color var(--transition);
}

.post-card__read-more:hover {
  gap: 8px;
  color: var(--accent-hover);
}

.post-card__read-more::after {
  content: '→';
}

/* ==========================================================================
   10. Single Post (.single-post)
   ========================================================================== */

.single-post__header {
  margin-bottom: 32px;
}

.single-post__category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-decoration: none;
  transition: background var(--transition);
}

.single-post__category:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.single-post__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.single-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.single-post__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-post__featured {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.single-post__featured img {
  width: 100%;
  height: auto;
  display: block;
}

/* Single Post Content */
.single-post__content {
  line-height: 1.8;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.single-post__content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.single-post__content h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.single-post__content p {
  margin-bottom: 20px;
}

.single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.single-post__content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.single-post__content pre {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.9rem;
}

.single-post__content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-post__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

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

.single-post__content ul,
.single-post__content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.single-post__content li {
  margin-bottom: 8px;
}

.single-post__footer {
  margin-top: 40px;
}

/* ==========================================================================
   11. Breadcrumbs
   ========================================================================== */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

.breadcrumbs__separator {
  color: var(--border);
}

/* ==========================================================================
   12. Reading Time
   ========================================================================== */

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   13. Table of Contents (.toc)
   ========================================================================== */

.toc {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.toc__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  transition: color var(--transition);
  user-select: none;
}

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

.toc__title::after {
  content: '▾';
  font-size: 0.8em;
  transition: transform var(--transition);
}

.toc__title.collapsed::after {
  transform: rotate(-90deg);
}

.toc__list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  transition: max-height var(--transition), opacity var(--transition);
  overflow: hidden;
}

.toc__list.collapsed {
  max-height: 0;
  opacity: 0;
}

.toc__list li {
  margin-bottom: 6px;
}

.toc__list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  display: block;
  transition: all var(--transition);
  padding-left: 12px;
  border-left: 2px solid transparent;
}

.toc__list a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc__list .toc-h3 {
  padding-left: 28px;
  font-size: 0.85rem;
}

/* ==========================================================================
   14. Author Box
   ========================================================================== */

.author-box {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin: 40px 0;
  border: 1px solid var(--border);
}

.author-box__avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box__info {
  flex: 1;
}

.author-box__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.author-box__name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

.author-box__bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   15. Related Posts
   ========================================================================== */

.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-posts__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* ==========================================================================
   16. Post Navigation
   ========================================================================== */

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-navigation__prev,
.post-navigation__next {
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.post-navigation__prev:hover,
.post-navigation__next:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.post-navigation__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-navigation__title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.post-navigation__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

.post-navigation__next {
  text-align: right;
}

/* ==========================================================================
   17. Sidebar Widgets
   ========================================================================== */

.widget {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.widget__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text-primary);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  margin-bottom: 8px;
}

.widget li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.widget li a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.widget li .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Widget Search */
.widget-search .search-form {
  display: flex;
}

.widget-search input[type='search'] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  transition: border-color var(--transition);
}

.widget-search input[type='search']:focus {
  border-color: var(--accent);
  outline: none;
}

/* Widget Tags */
.widget-tags .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-tags .tagcloud a {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.widget-tags .tagcloud a:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* Widget Recent Posts */
.widget-recent-posts .recent-post {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.widget-recent-posts .recent-post:last-child {
  border-bottom: none;
}

.widget-recent-posts .recent-post img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.widget-recent-posts .recent-post__title a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.3;
  display: block;
  transition: color var(--transition);
}

.widget-recent-posts .recent-post__title a:hover {
  color: var(--accent);
}

.widget-recent-posts .recent-post__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Ad Slot */
.ad-slot {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   18. Footer (.site-footer)
   ========================================================================== */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-widget p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget li {
  margin-bottom: 8px;
}

.footer-widget li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ==========================================================================
   19. Back to Top
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   20. Pagination
   ========================================================================== */

.pagination {
  margin-top: 40px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.page-numbers:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.page-numbers.current {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
}

.page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

.page-numbers.dots:hover {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

/* ==========================================================================
   21. Comments
   ========================================================================== */

.comments-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

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

.comment {
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.comment .children {
  list-style: none;
  padding-left: 24px;
  margin-top: 16px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-author .fn a {
  color: var(--text-primary);
  text-decoration: none;
}

.comment-author .fn a:hover {
  color: var(--accent);
}

.comment-metadata {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-metadata a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.comment-content p {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.reply a {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Comment Form */
.comment-respond {
  margin-top: 32px;
}

.comment-reply-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.comment-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  margin-bottom: 16px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form .submit {
  padding: 12px 32px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.comment-form .submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   22. 404 Page
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404__title {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1;
}

.error-404__subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.error-404__description {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.error-404 .search-form {
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   23. Archive Header
   ========================================================================== */

.archive-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.archive-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

.archive-description {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================================================================
   24. Utility & Animations
   ========================================================================== */

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

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease forwards;
}

/* Stagger animations for post-grid children */
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.15s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.25s; }
.post-card:nth-child(5) { animation-delay: 0.3s; }
.post-card:nth-child(6) { animation-delay: 0.35s; }

/* Pulse animation for loading */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   25. Responsive Design
   ========================================================================== */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-content {
    gap: 30px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-sidebar {
    width: 300px;
  }

  .hero-post__title {
    font-size: 1.8rem;
  }

  .single-post__title {
    font-size: 2rem;
  }

  .related-posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --sidebar-width: 100%;
  }

  .site-content {
    flex-direction: column;
    gap: 32px;
    padding-top: calc(var(--header-height) + 20px);
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-sidebar {
    width: 100%;
  }

  .nav-primary {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-post {
    min-height: 300px;
  }

  .hero-post__title {
    font-size: 1.5rem;
  }

  .hero-post__content {
    padding: 24px;
  }

  .hero-post__excerpt {
    display: none;
  }

  .single-post__title {
    font-size: 1.75rem;
  }

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

  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .related-posts__grid {
    grid-template-columns: 1fr;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .error-404__title {
    font-size: 4rem;
  }

  .error-404__subtitle {
    font-size: 1.2rem;
  }

  .archive-title {
    font-size: 1.5rem;
  }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
  .site-content {
    padding-left: 12px;
    padding-right: 12px;
    gap: 24px;
  }

  .header-inner {
    padding: 0 12px;
  }

  .post-card__content {
    padding: 16px;
  }

  .widget {
    padding: 20px;
  }

  .hero-post {
    min-height: 250px;
    border-radius: var(--radius-md);
  }

  .hero-post__content {
    padding: 16px;
  }

  .hero-post__title {
    font-size: 1.25rem;
  }

  .hero-post__meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .single-post__title {
    font-size: 1.5rem;
  }

  .single-post__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-inner {
    padding: 32px 12px 16px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    margin-left: 0;
    margin-top: 8px;
  }

  .error-404__title {
    font-size: 3rem;
  }

  .pagination {
    flex-wrap: wrap;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
}

/* ==========================================================================
   26. Print Styles
   ========================================================================== */

@media print {
  .site-header,
  .site-sidebar,
  .site-footer,
  .back-to-top,
  .search-overlay,
  .mobile-menu-overlay,
  .mobile-menu,
  .post-navigation,
  .comments-area,
  .related-posts,
  .toc {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-content {
    max-width: 100%;
    padding: 0;
  }

  .content-area {
    width: 100%;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .single-post__title {
    font-size: 24pt;
  }
}
