/* ═══════════════════════════════════════
   D4z Dark v3 — Main CSS
   Matches tools.d4z.me design exactly
═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Variables ── */
:root {
  --bg:        #060a12;
  --bg2:       #080d18;
  --surface:   #0c1526;
  --surface2:  #101e35;
  --surface3:  #162340;
  --border:    #1a2e4a;
  --border2:   #243d5e;
  --accent:    #00d4ff;
  --accent-r:  0; --accent-g: 212; --accent-b: 255;
  --purple:    #8b5cf6;
  --purple-r:  139; --purple-g: 92; --purple-b: 246;
  --green:     #10b981;
  --red:       #f43f5e;
  --yellow:    #f59e0b;
  --text:      #e2e8f0;
  --text2:     #94a3b8;
  --text3:     #4b6582;
  --mono:      'JetBrains Mono', 'Courier New', monospace;
  --sans:      'IBM Plex Sans Arabic', 'Tahoma', 'Arial', sans-serif;
  --nav-h:     64px;
  --sidebar-w: 280px;
  --max-w:     1200px;
  --r:         10px;
  --rl:        16px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.75;
  min-height: 100vh;
  padding-top: var(--nav-h);
  overflow-x: hidden;
}

/* Grid pattern — same as tools */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none; z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--sans); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ════════════════════════════════════
   HEADER / NAV — Exact match to tools
════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(6,10,18,.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex; align-items: center;
}

.nav-inner {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex; align-items: center;
  gap: .75rem;
  direction: rtl;
  min-width: 0;
}

/* ── Logo ── */
.site-branding {
  flex-shrink: 0;
  display: flex; align-items: center;
}
.site-logo-img {
  height: 36px; width: auto;
  display: block;
}
.site-logo-text {
  font-family: var(--mono);
  font-size: 1.2rem; font-weight: 700;
  text-decoration: none;
  display: flex; align-items: center; gap: 0;
  white-space: nowrap;
}
.site-logo-text .lc { color: var(--accent); }
.site-logo-text .ld { color: var(--purple); }
.site-logo-text .lm { color: var(--text); opacity: .55; }

/* ── Primary Nav Links ── */
.nav-links-wrap {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.nav-links-wrap::-webkit-scrollbar { display: none; }

.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
  list-style: none;
  display: flex; align-items: center;
  gap: .1rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding: 0;
}
.main-navigation li { position: relative; flex-shrink: 0; }
.main-navigation a {
  display: block;
  color: var(--text3);
  padding: .4rem .65rem;
  border-radius: 7px;
  font-size: .82rem; font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--sans);
  text-decoration: none;
}
.main-navigation a:hover,
.main-navigation li.current-menu-item > a,
.main-navigation li.current_page_item > a {
  color: var(--accent);
  background: rgba(0,212,255,.1);
}

/* Dropdown */
.main-navigation ul ul {
  position: absolute; top: calc(100% + .4rem);
  right: 0; min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: .4rem; display: none;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  z-index: 200; white-space: nowrap;
}
.main-navigation li:hover > ul { display: flex; }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul a {
  width: 100%; padding: .5rem .75rem;
  border-radius: 7px;
  font-size: .82rem;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Tools Bar ── */
.tools-bar {
  display: flex; align-items: center; gap: .1rem;
  border-right: 1px solid var(--border);
  padding-right: .75rem;
  flex-shrink: 0;
}
.tools-bar a {
  display: flex; align-items: center; gap: .3rem;
  color: var(--text3);
  padding: .35rem .6rem;
  border-radius: 7px;
  font-size: .78rem; font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s;
}
.tools-bar a:hover { color: var(--accent); background: rgba(0,212,255,.08); }
.tools-bar .tool-icon { font-size: .85rem; }

/* ── Nav Right Actions ── */
.nav-actions {
  display: flex; align-items: center;
  gap: .4rem; flex-shrink: 0;
}
.nav-search-btn {
  width: 34px; height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: .9rem;
  transition: all .2s;
}
.nav-search-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-dash-btn {
  font-family: var(--mono); font-size: .75rem;
  color: var(--purple); text-decoration: none;
  border: 1px solid rgba(139,92,246,.35);
  padding: .3rem .75rem; border-radius: 7px;
  transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: .3rem;
}
.nav-dash-btn:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.nav-site-btn {
  font-family: var(--mono); font-size: .75rem;
  color: var(--accent); text-decoration: none;
  border: 1px solid rgba(0,212,255,.3);
  padding: .3rem .75rem; border-radius: 7px;
  transition: all .2s; white-space: nowrap;
}
.nav-site-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.menu-toggle {
  display: none; width: 34px; height: 34px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; align-items: center; justify-content: center;
  color: var(--text2); font-size: 1.1rem;
}

/* ── Search Overlay ── */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(6,10,18,.95);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 8rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-overlay-inner { width: 100%; max-width: 620px; padding: 0 1.5rem; position: relative; }
.search-form .search-field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text); padding: 1rem 1.25rem;
  border-radius: var(--rl);
  font-family: var(--sans); font-size: 1.1rem; outline: none;
  direction: rtl;
}
.search-form .search-field:focus { border-color: var(--accent); }
.search-form .search-field::placeholder { color: var(--text3); }
.search-form .search-submit {
  background: var(--accent); color: var(--bg);
  border: none; padding: .9rem 1.5rem;
  font-family: var(--sans); font-weight: 700; font-size: .95rem;
  border-radius: var(--rl); margin-top: .75rem;
  transition: filter .2s; width: 100%;
}
.search-form .search-submit:hover { filter: brightness(1.1); }
.search-overlay-close {
  position: absolute; top: -5rem; left: 0;
  width: 38px; height: 38px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all .2s;
}
.search-overlay-close:hover { background: rgba(244,63,94,.1); color: var(--red); }

/* ════════════════════════════════════
   PAGE LAYOUT
════════════════════════════════════ */
.site-main { position: relative; z-index: 1; }

.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 1.75rem;
  align-items: start;
}
.content-wrap.full-width {
  grid-template-columns: 1fr;
  max-width: 820px;
}
.content-wrap.no-sidebar { grid-template-columns: 1fr; }

/* ── Breadcrumbs ── */
.breadcrumbs-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}
.breadcrumbs-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: .6rem 1.25rem;
  display: flex; align-items: center; gap: .35rem;
  flex-wrap: wrap;
  font-family: var(--mono); font-size: .73rem; color: var(--text3);
  direction: rtl;
}
.breadcrumbs-inner a { color: var(--text3); }
.breadcrumbs-inner a:hover { color: var(--accent); }
.breadcrumbs-inner .bc-sep { color: var(--border2); margin: 0 .1rem; }
.breadcrumbs-inner .bc-current { color: var(--text2); }

/* ════════════════════════════════════
   SIDEBAR
════════════════════════════════════ */
.sidebar-area {
  position: sticky;
  top: calc(var(--nav-h) + 1.25rem);
}
.widget-area { display: flex; flex-direction: column; gap: 1rem; }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
}
.widgettitle {
  font-size: .73rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text3);
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--sans);
}
.widgettitle::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  flex-shrink: 0;
}
.widget-body { padding: 1rem 1.1rem; }

/* Sidebar links — fix text overflow */
.widget ul { list-style: none; }
.widget ul li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  /* Fix text overflow */
  display: flex; align-items: center;
  min-width: 0;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  color: var(--text2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block; flex: 1;
  transition: color .2s;
}
.widget ul li a:hover { color: var(--accent); }
.widget ul li .count {
  font-family: var(--mono); font-size: .7rem;
  color: var(--text3); flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: .1rem .45rem;
  margin-right: .4rem;
}

/* Search widget */
.widget .search-form { display: flex; gap: .4rem; }
.widget .search-field {
  flex: 1; min-width: 0;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); padding: .55rem .8rem;
  border-radius: 8px; font-family: var(--sans); font-size: .83rem;
  outline: none; direction: rtl;
}
.widget .search-field:focus { border-color: var(--accent); }
.widget .search-submit {
  background: rgba(0,212,255,.1); color: var(--accent);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 8px; padding: .55rem .8rem;
  font-size: .85rem; transition: all .2s;
}
.widget .search-submit:hover { background: var(--accent); color: var(--bg); }

/* Tag cloud */
.wp-tag-cloud, .tagcloud {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding: 1rem 1.1rem;
}
.wp-tag-cloud a, .tagcloud a {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); padding: .2rem .65rem;
  border-radius: 99px; font-size: .75rem !important;
  transition: all .2s;
}
.wp-tag-cloud a:hover, .tagcloud a:hover {
  border-color: var(--accent); color: var(--accent);
}

/* ════════════════════════════════════
   POST CARD
════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .25s;
  text-decoration: none; color: inherit;
}
.post-card:hover {
  border-color: rgba(0,212,255,.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.post-card-thumb {
  overflow: hidden; aspect-ratio: 16/9;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text3);
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .65rem; }

.post-meta-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.post-cat-badge {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--accent);
  padding: .15rem .6rem; border-radius: 99px;
  font-size: .7rem; font-weight: 600;
  font-family: var(--mono); white-space: nowrap;
}
.post-date-txt {
  font-size: .72rem; color: var(--text3);
  font-family: var(--mono); white-space: nowrap;
}
.post-rt { font-size: .7rem; color: var(--text3); margin-right: auto; white-space: nowrap; }

.post-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.45;
  color: var(--text);
  /* Prevent overflow */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-excerpt {
  font-size: .855rem; color: var(--text2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-read-more {
  margin-top: auto; padding-top: .5rem;
  font-size: .8rem; font-weight: 600; color: var(--accent);
  display: flex; align-items: center; gap: .3rem;
  transition: gap .2s;
}
.post-card:hover .post-read-more { gap: .6rem; }
.post-author-row {
  display: flex; align-items: center; gap: .5rem;
  padding-top: .65rem; border-top: 1px solid var(--border);
}
.post-author-row img { border-radius: 50%; }
.post-author-row span { font-size: .75rem; color: var(--text2); }

/* ════════════════════════════════════
   SINGLE POST
════════════════════════════════════ */
.single-wrap {
  max-width: 820px; margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  position: relative; z-index: 1;
}
.single-cats { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.single-cats a {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--accent); padding: .2rem .7rem;
  border-radius: 99px; font-size: .73rem; font-weight: 600;
}
.single-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 1.1rem;
}
.single-meta-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: .85rem 1.1rem;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.75rem;
  font-size: .8rem; color: var(--text3);
  font-family: var(--mono);
}
.single-meta-bar a { color: var(--text2); }
.single-meta-bar a:hover { color: var(--accent); }
.single-featured { border-radius: var(--rl); overflow: hidden; margin-bottom: 2rem; border: 1px solid var(--border); }
.single-featured img { width: 100%; }

/* ── Typography ── */
.entry-content {
  font-size: .975rem; line-height: 1.85; color: var(--text);
}
.entry-content > * { margin-bottom: 1.4rem; }
.entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5 {
  font-weight: 700; line-height: 1.3; margin: 2rem 0 .85rem;
}
.entry-content h2 { font-size: 1.45rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.entry-content h3 { font-size: 1.2rem; }
.entry-content h4 { font-size: 1.05rem; color: var(--text2); }
.entry-content a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(0,212,255,.3); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content ul, .entry-content ol { padding-right: 1.5rem; }
.entry-content li { margin-bottom: .35rem; }
.entry-content blockquote {
  background: var(--surface2);
  border-right: 4px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.1rem 1.4rem; color: var(--text2);
  font-style: italic; margin: 1.75rem 0;
}
.entry-content code {
  font-family: var(--mono);
  background: var(--surface2); border: 1px solid var(--border);
  padding: .15rem .45rem; border-radius: 5px;
  font-size: .87em; color: var(--accent);
  word-break: break-all;
}
.entry-content pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.25rem;
  overflow-x: auto; font-family: var(--mono);
  font-size: .85rem; line-height: 1.65;
  position: relative;
}
.entry-content pre code {
  background: none; border: none; padding: 0;
  color: var(--text); word-break: normal;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.entry-content th, .entry-content td { padding: .65rem .9rem; border: 1px solid var(--border); text-align: right; }
.entry-content th { background: var(--surface2); font-weight: 600; color: var(--text2); }
.entry-content img { border-radius: var(--r); border: 1px solid var(--border); margin: 1.25rem auto; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.entry-content .wp-block-code { border-radius: var(--rl); }
.entry-content .wp-block-quote { border-right: 4px solid var(--accent); }

/* Tags */
.post-tags-wrap {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); margin: 2rem 0;
}
.post-tags-wrap a {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); padding: .25rem .75rem;
  border-radius: 99px; font-size: .78rem; transition: all .2s;
}
.post-tags-wrap a:hover { border-color: var(--accent); color: var(--accent); }

/* Author box */
.author-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.5rem;
  display: flex; gap: 1.1rem; margin: 2rem 0;
}
.author-box-avatar img { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--border2); }
.author-name-link { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; display: block; }
.author-bio { font-size: .855rem; color: var(--text2); line-height: 1.65; }

/* Post nav */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0;
}
.post-nav-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.1rem;
  transition: border-color .2s;
}
.post-nav-item:hover { border-color: rgba(0,212,255,.35); }
.post-nav-item a { color: var(--text); }
.pn-label { font-size: .7rem; color: var(--text3); font-family: var(--mono); margin-bottom: .3rem; }
.pn-title { font-size: .875rem; font-weight: 600; line-height: 1.4; }

/* ════════════════════════════════════
   PAGINATION
════════════════════════════════════ */
.d4z-pagination {
  display: flex; justify-content: center;
  gap: .35rem; margin: 2.5rem 0;
  flex-wrap: wrap;
}
.d4z-pagination .page-numbers {
  min-width: 38px; height: 38px; padding: 0 .6rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; font-family: var(--mono); font-size: .82rem;
  color: var(--text2); transition: all .2s;
}
.d4z-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.d4z-pagination .page-numbers.current {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.4); color: var(--accent); font-weight: 700;
}
.d4z-pagination .page-numbers.dots { border-color: transparent; background: none; color: var(--text3); }

/* ════════════════════════════════════
   ARCHIVE / SEARCH HEADERS
════════════════════════════════════ */
.arch-header {
  position: relative; z-index: 1;
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: var(--max-w); margin: 0 auto;
}
.arch-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.25);
  color: var(--purple); padding: .25rem .8rem;
  border-radius: 99px; font-family: var(--mono);
  font-size: .72rem; margin-bottom: .85rem;
}
.arch-title { font-size: 1.65rem; font-weight: 700; margin-bottom: .4rem; }
.arch-desc { color: var(--text2); font-size: .875rem; }

/* Search form large */
.search-form-hero {
  display: flex; gap: .65rem; max-width: 560px; margin-top: 1.25rem;
}
.search-form-hero .search-field {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: .75rem 1.1rem; border-radius: var(--r);
  font-family: var(--sans); font-size: .95rem; outline: none; direction: rtl;
}
.search-form-hero .search-field:focus { border-color: var(--accent); }
.search-form-hero .search-submit {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: var(--r); padding: .75rem 1.5rem;
  font-family: var(--sans); font-weight: 700; font-size: .9rem; transition: filter .2s;
}
.search-form-hero .search-submit:hover { filter: brightness(1.1); }

/* 404 */
.e404-section {
  text-align: center; padding: 5rem 1.5rem;
  position: relative; z-index: 1;
}
.e404-code {
  font-family: var(--mono); font-size: 7rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1.25rem;
}
.e404-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .6rem; }
.e404-desc { color: var(--text2); margin-bottom: 2rem; }
.btn-home {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: var(--bg);
  padding: .8rem 1.75rem; border-radius: var(--rl);
  font-weight: 700; font-size: .9rem; transition: all .2s;
}
.btn-home:hover { filter: brightness(1.1); color: var(--bg); transform: translateY(-2px); }

/* ════════════════════════════════════
   COMMENTS
════════════════════════════════════ */
.comments-area { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; display: flex; align-items: center; gap: .4rem; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.comment-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.1rem;
}
.comment-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; }
.comment-head img { border-radius: 50%; }
.comment-author-name { font-size: .82rem; font-weight: 600; }
.comment-date { font-size: .73rem; color: var(--text3); font-family: var(--mono); }
.comment-text { font-size: .875rem; line-height: 1.7; }
.comment-text a { color: var(--accent); }
.comment-reply { margin-top: .5rem; }
.comment-reply a {
  font-size: .75rem; color: var(--accent);
  background: rgba(0,212,255,.07); border: 1px solid rgba(0,212,255,.2);
  padding: .2rem .65rem; border-radius: 99px; display: inline-block;
}
.children { list-style: none; margin-top: .75rem; padding-right: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }

/* Comment form */
.comment-respond {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.5rem; margin-top: 1.5rem;
}
.comment-respond h3 { font-size: .95rem; font-weight: 700; margin-bottom: 1.25rem; }
.comment-form p { margin-bottom: .85rem; }
.comment-form label { display: block; font-size: .78rem; color: var(--text2); margin-bottom: .35rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%; background: var(--bg2);
  border: 1px solid var(--border); color: var(--text);
  padding: .65rem .9rem; border-radius: 8px;
  font-family: var(--sans); font-size: .875rem; outline: none; direction: rtl;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .form-submit input {
  background: var(--accent); color: var(--bg);
  font-weight: 700; border: none; cursor: pointer;
  padding: .7rem 1.75rem; border-radius: 8px;
  font-family: var(--sans); font-size: .9rem; transition: filter .2s;
}
.comment-form .form-submit input:hover { filter: brightness(1.1); }

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
  margin-top: auto;
}

.footer-top {
  max-width: var(--max-w); margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand {}
.footer-brand-logo { margin-bottom: .75rem; }
.footer-brand-desc { font-size: .83rem; color: var(--text3); line-height: 1.7; }

/* Social Icons */
.social-links {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem;
}
.social-link {
  width: 34px; height: 34px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all .2s; flex-shrink: 0;
  text-decoration: none;
}
.social-link:hover { color: #fff; border-color: var(--social-color, var(--accent)); background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),.1); }
.social-link svg { width: 15px; height: 15px; fill: currentColor; }

/* Social colors */
.social-link.twitter:hover    { --social-color: #1DA1F2; color: #1DA1F2; background: rgba(29,161,242,.1); }
.social-link.github:hover     { --social-color: #e2e8f0; color: var(--text); background: rgba(255,255,255,.08); }
.social-link.linkedin:hover   { --social-color: #0A66C2; color: #0A66C2; background: rgba(10,102,194,.1); }
.social-link.instagram:hover  { --social-color: #E4405F; color: #E4405F; background: rgba(228,64,95,.1); }
.social-link.youtube:hover    { --social-color: #FF0000; color: #FF0000; background: rgba(255,0,0,.1); }
.social-link.telegram:hover   { --social-color: #26A5E4; color: #26A5E4; background: rgba(38,165,228,.1); }
.social-link.tiktok:hover     { --social-color: #69C9D0; color: #69C9D0; background: rgba(105,201,208,.1); }
.social-link.facebook:hover   { --social-color: #1877F2; color: #1877F2; background: rgba(24,119,242,.1); }
.social-link.snapchat:hover   { --social-color: #FFFC00; color: #FFFC00; background: rgba(255,252,0,.1); }
.social-link.whatsapp:hover   { --social-color: #25D366; color: #25D366; background: rgba(37,211,102,.1); }

/* Footer nav widgets */
.footer-col-title {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text3); margin-bottom: .9rem;
  padding-bottom: .55rem; border-bottom: 1px solid var(--border);
}
.footer-nav-list { list-style: none; }
.footer-nav-list li { margin-bottom: .45rem; }
.footer-nav-list a { font-size: .83rem; color: var(--text3); transition: color .2s; }
.footer-nav-list a:hover { color: var(--accent); }

/* Footer bottom bar */
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem; direction: rtl;
}
.footer-copy { font-size: .78rem; color: var(--text3); }
.footer-copy a { color: var(--accent); }
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a { font-size: .76rem; color: var(--text3); transition: color .2s; }
.footer-bottom-links a:hover { color: var(--accent); }
.footer-version { font-family: var(--mono); font-size: .68rem; color: var(--text3); opacity: .4; }

/* ════════════════════════════════════
   BACK TO TOP + READING BAR
════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  width: 40px; height: 40px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text2); font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s; z-index: 100;
  opacity: 0; pointer-events: none;
}
.back-to-top.show { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.reading-bar {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  height: 2px; background: var(--border); z-index: 999;
}
.reading-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width .1s;
}

/* ════════════════════════════════════
   HERO — Front page
════════════════════════════════════ */
.hero-section {
  text-align: center;
  padding: 4.5rem 1.25rem 2.5rem;
  position: relative; z-index: 1;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,212,255,.07) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(0,212,255,.07); border: 1px solid rgba(0,212,255,.2);
  border-radius: 99px; padding: .28rem .9rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.2; margin-bottom: .9rem;
}
.hero-title .hl {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { color: var(--text2); font-size: 1rem; max-width: 500px; margin: 0 auto 2.5rem; }

/* ════════════════════════════════════
   WORDPRESS GUTENBERG / ALIGNMENT
════════════════════════════════════ */
.alignleft   { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.alignright  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 0 auto; }
.alignwide   { margin-left: -2rem; margin-right: -2rem; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: .75rem; color: var(--text3); text-align: center; margin-top: .4rem; }
.wp-block-quote { border-right: 4px solid var(--accent); background: var(--surface2); padding: 1.1rem 1.4rem; }
.wp-block-code { border-radius: var(--rl); overflow: auto; background: var(--surface); border: 1px solid var(--border); }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1024px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar-area { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links-wrap { display: none; }
  .nav-links-wrap.open {
    display: flex; position: absolute; top: var(--nav-h); right: 0; left: 0;
    background: rgba(6,10,18,.98); border-bottom: 1px solid var(--border);
    padding: .75rem 1rem; direction: rtl;
  }
  .nav-links-wrap.open .main-navigation { width: 100%; }
  .nav-links-wrap.open .main-navigation ul { flex-direction: column; width: 100%; white-space: normal; }
  .nav-links-wrap.open .main-navigation ul li { width: 100%; }
  .nav-links-wrap.open .main-navigation ul a { padding: .6rem .75rem; width: 100%; word-break: break-word; white-space: normal; }
  .tools-bar { display: none; }
  .menu-toggle { display: flex; }
  .nav-dash-btn span, .nav-site-btn { display: none; }
  .nav-dash-btn { padding: .3rem .6rem; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .post-nav { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
}
@media (max-width: 500px) {
  .posts-grid { grid-template-columns: 1fr; }
  :root { --nav-h: 56px; }
  .hero-section { padding: 3rem 1rem 1.75rem; }
  .single-wrap, .content-wrap { padding-left: 1rem; padding-right: 1rem; }
}
