/*
Theme Name: AppeKit Blog
Theme URI: https://appekit.com
Author: AppeKit
Author URI: https://appekit.com
Description: Custom WordPress blog theme matching AppeKit.com — dark navy, blue accent, full SEO, social sharing.
Version: 2.1.0
License: GNU General Public License v2 or later
Text Domain: appekit-blog
*/

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0d1117;
  --bg2:         #13181f;
  --bg3:         #1a2030;
  --bg4:         #1e2535;
  --blue:        #2563eb;
  --blue-hover:  #1d4ed8;
  --blue-dim:    rgba(37,99,235,0.14);
  --blue-glow:   rgba(37,99,235,0.35);
  --white:       #ffffff;
  --t1:          #f1f5f9;
  --t2:          #94a3b8;
  --t3:          #64748b;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --font:        'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:        'DM Mono', 'Fira Code', 'Consolas', monospace;
  --r:           12px;
  --r-sm:        8px;
  --ease:        0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--t1); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.site-content { min-height: 60vh; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: rgba(19,24,31,0.92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.site-logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; color: var(--white); }
.logo-icon { width: 36px; height: 36px; background: var(--blue); border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-icon svg { width: 18px; height: 18px; fill: white; }
.logo-text { color: var(--white); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a { color: var(--t2); font-size: 0.875rem; font-weight: 500; padding: 7px 13px; border-radius: var(--r-sm); transition: all var(--ease); }
.main-nav a:hover { color: var(--white); background: var(--bg4); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-ghost { color: var(--t2); font-size: 0.875rem; font-weight: 500; padding: 8px 16px; border-radius: var(--r-sm); transition: all var(--ease); background: transparent; border: none; cursor: pointer; }
.btn-ghost:hover { color: var(--white); background: var(--bg4); }
.btn-primary { background: var(--blue); color: #fff !important; font-size: 0.875rem; font-weight: 600; padding: 9px 20px; border-radius: var(--r-sm); border: none; cursor: pointer; transition: background var(--ease); display: inline-block; }
.btn-primary:hover { background: var(--blue-hover); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; border-radius: 2px; transition: all 0.3s; }

.mobile-nav { display: none; flex-direction: column; background: var(--bg2); border-top: 1px solid var(--border); padding: 12px 0 20px; }
.mobile-nav a { display: block; color: var(--t2); font-size: 1rem; font-weight: 500; padding: 13px 24px; transition: all var(--ease); }
.mobile-nav a:hover { color: var(--white); background: var(--bg4); }
.mobile-nav .btn-primary { margin: 12px 24px 0; text-align: center; display: block; padding: 13px; border-radius: var(--r-sm); }
.mobile-nav.is-open { display: flex; }

/* ── Blog hero ─────────────────────────────────────────────── */
.blog-hero { background: linear-gradient(135deg, var(--bg2) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding: 72px 0 52px; text-align: center; }
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.blog-hero h1 span { color: var(--blue); }
.blog-hero p { color: var(--t2); font-size: 1.05rem; margin-top: 14px; max-width: 500px; margin-inline: auto; }

/* ── Blog section & layout ─────────────────────────────────── */
.blog-section { padding: 48px 0 72px; }

/* Desktop: posts | sidebar */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 40px;
  align-items: start;
}

/* ── Blog grid — always shows all posts ────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* ── Post cards ────────────────────────────────────────────── */
.post-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--ease);
}
.post-card:hover {
  border-color: var(--blue-glow);
  transform: translateY(-3px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.4);
}

.post-card-thumbnail { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg4); }
.post-card-thumbnail-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg4) 0%, #1a2545 100%);
  display: flex; align-items: center; justify-content: center;
}
.post-card-thumbnail-placeholder svg { width: 36px; height: 36px; fill: var(--blue); opacity: 0.4; }

.post-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-category { background: var(--blue-dim); color: var(--blue); font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.06em; }
.post-date { color: var(--t3); font-size: 0.78rem; }

.post-card-title { font-size: 1.05rem; font-weight: 700; color: var(--white); line-height: 1.4; margin-bottom: 8px; letter-spacing: -0.01em; flex: 1; }
.post-card-title a:hover { color: var(--blue); }
.post-card-excerpt { color: var(--t2); font-size: 0.85rem; line-height: 1.65; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.post-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto; }
.post-author { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--t2); }
.post-author img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.post-author-avatar-placeholder { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: white; flex-shrink: 0; }

.read-more-link { color: var(--blue); font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; gap: 4px; transition: gap var(--ease); white-space: nowrap; }
.read-more-link:hover { gap: 8px; }

/* No posts */
.no-posts { text-align: center; padding: 80px 24px; color: var(--t2); }
.no-posts svg { margin: 0 auto 16px; color: var(--t3); }
.no-posts h2 { font-size: 1.4rem; color: var(--white); margin-bottom: 8px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--r-sm); font-size: 0.875rem; font-weight: 600; border: 1px solid var(--border); color: var(--t2); background: var(--bg3); transition: all var(--ease); }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .current { background: var(--blue); border-color: var(--blue); color: white; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 88px; }
.widget { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 18px; }
.widget-title { font-size: 0.72rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--t2); transition: color var(--ease); }
.widget ul li a:hover { color: var(--blue); }
.search-form { display: flex; gap: 8px; }
.search-input { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; color: var(--white); font-size: 0.875rem; outline: none; transition: border-color var(--ease); font-family: var(--font); }
.search-input:focus { border-color: var(--blue); }
.search-input::placeholder { color: var(--t3); }
.search-btn { background: var(--blue); border: none; border-radius: var(--r-sm); padding: 10px 12px; color: white; cursor: pointer; transition: background var(--ease); display: flex; align-items: center; justify-content: center; }
.search-btn:hover { background: var(--blue-hover); }
.search-btn svg { stroke: white; fill: none; }

/* ── Single post hero ──────────────────────────────────────── */
.post-hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; overflow: hidden; }
.post-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.35); transition: transform 6s ease; }
.post-hero:hover .post-hero-bg { transform: scale(1.03); }
.post-hero-gradient { background: linear-gradient(135deg, #0d1f45 0%, #0d1117 60%, #1a0d2e 100%); filter: none; }
.post-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,17,23,0.97) 0%, rgba(13,17,23,0.5) 60%, rgba(13,17,23,0.2) 100%); }
.post-hero-content { position: relative; z-index: 2; padding-bottom: 48px; padding-top: 48px; max-width: 780px; }
.post-hero-cat { display: inline-block; background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue-glow); font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; transition: all var(--ease); }
.post-hero-cat:hover { background: var(--blue); color: white; }
.post-hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--white); margin-bottom: 24px; }
.post-hero-meta { display: flex; align-items: center; }
.post-hero-author { display: flex; align-items: center; gap: 12px; }
.hero-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--blue-glow); }
.hero-avatar-placeholder { width: 42px; height: 42px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; color: white; border: 2px solid var(--blue-glow); }
.hero-author-name { font-weight: 600; color: var(--white); font-size: 0.9rem; }
.hero-meta-sep { color: var(--t3); margin: 0 4px; }
.hero-date { color: var(--t2); font-size: 0.85rem; }
.hero-read-time { color: var(--t2); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px; }
.hero-read-time svg { stroke: var(--t3); fill: none; }

/* ── Article layout ─────────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 64px 1fr 220px; gap: 0 40px; padding: 48px 0 80px; align-items: start; }

/* ── Share sidebar ───────────────────────────────────────────── */
.share-sidebar { position: sticky; top: 88px; }
.share-sidebar-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.share-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--t3); margin-bottom: 4px; }
.share-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--t2); cursor: pointer; transition: all var(--ease); text-decoration: none; }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.share-btn:hover { transform: scale(1.1); }
.share-twitter:hover  { background: #000; border-color: #333; color: white; }
.share-linkedin:hover { background: #0077b5; border-color: #0077b5; color: white; }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; color: white; }
.share-whatsapp:hover { background: #25d366; border-color: #25d366; color: white; }
.share-copy:hover     { background: var(--blue); border-color: var(--blue); color: white; }
.share-copy .icon-check { stroke: currentColor; fill: none; }
.share-scroll-top:hover { background: var(--bg4); color: var(--white); }
.share-divider { width: 1px; height: 20px; background: var(--border); margin: 4px 0; }

/* ── Post article ───────────────────────────────────────────── */
.post-article { min-width: 0; }
.back-to-blog { display: inline-flex; align-items: center; gap: 6px; color: var(--t3); font-size: 0.825rem; font-weight: 500; margin-bottom: 32px; transition: color var(--ease); }
.back-to-blog:hover { color: var(--blue); }
.back-to-blog svg { stroke: currentColor; fill: none; }

/* ── Mobile share bar ────────────────────────────────────────── */
.mobile-share-bar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 28px; }
.share-label-inline { font-size: 0.78rem; font-weight: 700; color: var(--t3); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 4px; }
.share-btn-sm { width: 36px; height: 36px; border-radius: 50%; background: var(--bg4); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--t2); cursor: pointer; transition: all var(--ease); text-decoration: none; }
.share-btn-sm svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.share-btn-sm.share-copy .icon-check { stroke: currentColor; fill: none; }
.share-btn-sm.share-twitter:hover  { background: #000; color: white; border-color: #333; }
.share-btn-sm.share-linkedin:hover { background: #0077b5; color: white; border-color: #0077b5; }
.share-btn-sm.share-whatsapp:hover { background: #25d366; color: white; border-color: #25d366; }
.share-btn-sm.share-copy:hover     { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Post content ───────────────────────────────────────────── */
.post-content { color: var(--t2); font-size: 1.05rem; line-height: 1.85; }
.post-content h2 { font-size: 1.55rem; font-weight: 800; color: var(--white); margin: 52px 0 16px; letter-spacing: -0.025em; line-height: 1.25; }
.post-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--white); margin: 40px 0 12px; }
.post-content h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin: 32px 0 10px; }
.post-content p { margin-bottom: 24px; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--blue-hover); }
.post-content ul, .post-content ol { margin: 4px 0 24px 24px; list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; padding-left: 4px; }
.post-content strong { color: var(--white); font-weight: 700; }
.post-content blockquote { border-left: 3px solid var(--blue); background: var(--bg3); padding: 20px 24px 20px 28px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 36px 0; color: var(--t1); font-style: italic; font-size: 1.1rem; line-height: 1.7; }
.post-content code { font-family: var(--mono); background: var(--bg3); color: #7dd3fc; padding: 2px 7px; border-radius: 5px; font-size: 0.875em; border: 1px solid var(--border); }
.post-content pre { background: #0a0e14; border: 1px solid var(--border2); border-radius: var(--r); padding: 24px; overflow-x: auto; margin: 32px 0; position: relative; }
.post-content pre::before { content: ''; position: absolute; top: 12px; left: 16px; width: 8px; height: 8px; border-radius: 50%; background: #ff5f56; box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f; }
.post-content pre code { background: none; border: none; padding: 0; color: #e2e8f0; font-size: 0.9rem; line-height: 1.75; display: block; padding-top: 8px; }
.post-content img { border-radius: var(--r); margin: 32px 0; border: 1px solid var(--border); }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.9rem; }
.post-content th { background: var(--bg3); color: var(--white); font-weight: 700; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border2); }
.post-content td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--t2); }

/* ── Tags ───────────────────────────────────────────────────── */
.post-tags { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-tags > span { color: var(--t3); font-size: 0.825rem; font-weight: 600; }
.tag-pill { background: var(--bg3); border: 1px solid var(--border); color: var(--t2); font-size: 0.78rem; padding: 4px 12px; border-radius: 20px; transition: all var(--ease); font-family: var(--mono); }
.tag-pill:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

/* ── Share panel ─────────────────────────────────────────────── */
.share-panel { margin-top: 48px; background: linear-gradient(135deg, var(--bg3) 0%, #1a1f35 100%); border: 1px solid var(--border2); border-radius: var(--r); overflow: hidden; }
.share-panel-inner { padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.share-panel-text { display: flex; align-items: center; gap: 16px; }
.share-panel-icon { font-size: 2rem; flex-shrink: 0; }
.share-panel-text strong { color: var(--white); font-size: 1rem; font-weight: 700; display: block; }
.share-panel-text p { color: var(--t2); font-size: 0.875rem; margin: 0; }
.share-panel-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 50px; font-size: 0.82rem; font-weight: 600; border: 1px solid var(--border); background: var(--bg4); color: var(--t2); cursor: pointer; transition: all var(--ease); text-decoration: none; font-family: var(--font); }
.share-pill svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.share-pill .icon-check { stroke: currentColor; fill: none; }
.share-pill-twitter:hover  { background: #000; border-color: #333; color: white; }
.share-pill-linkedin:hover { background: #0077b5; border-color: #0077b5; color: white; }
.share-pill-whatsapp:hover { background: #25d366; border-color: #25d366; color: white; }
.share-pill-copy:hover     { background: var(--blue); border-color: var(--blue); color: white; }

/* ── Author box ──────────────────────────────────────────────── */
.author-box { margin-top: 48px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; display: flex; gap: 20px; align-items: flex-start; }
.author-box-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--blue-glow); }
.author-box-avatar-placeholder { width: 68px; height: 68px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: white; flex-shrink: 0; }
.author-box-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t3); display: block; margin-bottom: 4px; }
.author-box-info h4 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.author-box-info p { font-size: 0.875rem; color: var(--t2); line-height: 1.65; margin-bottom: 12px; }
.author-posts-link { color: var(--blue); font-size: 0.825rem; font-weight: 600; }
.author-posts-link:hover { color: var(--blue-hover); }

/* ── Post nav ────────────────────────────────────────────────── */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.post-nav-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 8px; transition: all var(--ease); }
.post-nav-item:hover { border-color: var(--blue-glow); transform: translateY(-2px); }
.post-nav-next { text-align: right; }
.post-nav-dir { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); display: flex; align-items: center; gap: 4px; }
.post-nav-next .post-nav-dir { justify-content: flex-end; }
.post-nav-dir svg { stroke: currentColor; fill: none; flex-shrink: 0; }
.post-nav-title { font-size: 0.9rem; font-weight: 600; color: var(--white); line-height: 1.4; }

/* ── TOC sidebar ─────────────────────────────────────────────── */
.toc-sidebar { position: sticky; top: 88px; }
.toc-inner { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.toc-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t3); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
#toc-nav a { display: block; font-size: 0.82rem; color: var(--t3); padding: 5px 0 5px 12px; border-left: 2px solid var(--border); margin-bottom: 2px; line-height: 1.4; transition: all var(--ease); }
#toc-nav a:hover, #toc-nav a.active { color: var(--blue); border-left-color: var(--blue); }
#toc-nav .toc-h3 { padding-left: 22px; font-size: 0.78rem; }

/* ── Related posts ───────────────────────────────────────────── */
.related-section { background: var(--bg2); border-top: 1px solid var(--border); padding: 64px 0; }
.related-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.related-header h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.related-all { color: var(--blue); font-size: 0.875rem; font-weight: 600; }
.related-all:hover { color: var(--blue-hover); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 64px 0 0; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  align-items: start;
}

.footer-brand .site-logo { margin-bottom: 14px; display: inline-flex; }
.footer-brand p { color: var(--t3); font-size: 0.875rem; line-height: 1.7; max-width: 280px; margin-bottom: 20px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; color: var(--t3); font-size: 0.875rem; margin-bottom: 10px; transition: color var(--ease); }
.footer-contact-item:hover { color: var(--t2); }
.footer-contact-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; color: var(--white); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--t3); font-size: 0.875rem; transition: color var(--ease); }
.footer-col ul li a:hover { color: var(--t2); }

.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; }
.footer-bottom p { color: var(--t3); font-size: 0.8rem; }

/* ── Reading progress ─────────────────────────────────────────── */
#reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--blue), #60a5fa); z-index: 9999; width: 0%; pointer-events: none; transition: width 0.1s linear; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* ── Tablet: 1024px ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr 200px; }
  .share-sidebar { display: none; }
  .mobile-share-bar { display: flex; }

  .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── Tablet: 900px ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }

  /* Blog: posts take full width, sidebar goes below */
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
}

/* ── Mobile: 768px ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav, .header-actions { display: none; }
  .menu-toggle { display: block; }

  /* 2 columns on mobile for blog grid */
  .blog-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Footer: override desktop grid entirely */
  .footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 24px !important;
  }

  /* Brand row spans full width */
  .footer-brand {
    grid-column: 1 / -1 !important;
  }

  /* Each link column sits naturally in the 2-col grid */
  .footer-col {
    min-width: 0;
  }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .post-nav-next .post-nav-dir { justify-content: flex-start; }
  .share-panel-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Small mobile: 480px ─────────────────────────────────────── */
@media (max-width: 480px) {
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }

  .post-hero { min-height: 320px; }
  .post-hero-title { font-size: 1.6rem; }
  .blog-hero { padding: 48px 0 32px; }

  /* Keep 2-col footer even on small phones */
  .footer-top {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px 16px !important;
  }
  .footer-brand { grid-column: 1 / -1 !important; }

  .author-box { flex-direction: column; }
  .share-panel-inner { padding: 20px; }
}
