/* ============================================================
   DetectionCode Dark Theme — Main Stylesheet
   ============================================================ */

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Barlow+Condensed:wght@400;500;600;700;800&family=Barlow:wght@300;400;500&display=swap');

/* --- CSS CUSTOM PROPERTIES --- */
:root {
  --bg:        #07101e;
  --surface:   #0c1a2e;
  --surface2:  #112035;
  --surface3:  #162845;
  --border:    #1c3356;
  --border2:   #274a7a;
  --accent:    #38bdf8;
  --accent2:   #0ea5e9;
  --green:     #22c55e;
  --red:       #ef4444;
  --amber:     #f59e0b;
  --purple:    #a78bfa;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --muted2:    #94a3b8;
  --mono:      'Fira Code', 'Courier New', monospace;
  --head:      'Barlow Condensed', 'Impact', sans-serif;
  --body:      'Barlow', system-ui, sans-serif;
  --radius:    6px;
  --radius-lg: 10px;
  --transition: 0.18s ease;
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(56,189,248,0.07) 0%, transparent 70%),
    linear-gradient(180deg, rgba(12,26,46,0.4) 0%, transparent 30%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scanline texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #7dd3fc; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--text);
}

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted2);
}

code, pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  color: var(--accent);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.6;
  color: var(--text);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}
th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border2);
  background: var(--surface2);
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted2);
}
tr:hover td { background: rgba(255,255,255,0.02); }

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

/* --- LAYOUT WRAPPERS --- */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.site-content { flex: 1; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Two-column layout */
.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 4rem;
}
.content-area.full-width {
  grid-template-columns: 1fr;
}

.main-content { min-width: 0; }
.sidebar-area { position: sticky; top: 80px; }

/* --- SITE HEADER --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7,16,30,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

/* Logo */
.site-branding a {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-branding a:hover { color: var(--text); }
.logo-bracket { color: var(--accent); }
.logo-signal {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* Primary navigation */
.primary-navigation { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: color var(--transition), background var(--transition);
  display: block;
}
.nav-menu a:hover,
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
  color: var(--accent);
  background: var(--surface2);
}

/* Dropdown */
.nav-menu .menu-item-has-children { position: relative; }
.nav-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  list-style: none;
  padding: 0.5rem;
  display: none;
  z-index: 300;
}
.nav-menu .menu-item-has-children:hover .sub-menu { display: block; }
.nav-menu .sub-menu a {
  font-size: 0.75rem;
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 3px;
  color: var(--muted2);
}
.nav-menu .sub-menu a:hover { color: var(--accent); background: var(--surface2); }

/* Header search */
.header-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.75rem;
}
.header-search-form input[type="search"] {
  background: none;
  border: none;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 0.75rem;
  width: 140px;
  outline: none;
}
.header-search-form input[type="search"]::placeholder { color: var(--muted); }
.header-search-form button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.header-search-form button:hover { color: var(--accent); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted2);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}
.menu-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* --- THREAT TICKER --- */
.threat-ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: stretch;
}
.ticker-label {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.ticker-scroll-wrap { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  will-change: transform;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.ticker-item::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.6rem;
}

/* --- HERO (front page only) --- */
.hero-section {
  padding: 5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 500px;
  background: radial-gradient(ellipse at right center, rgba(56,189,248,0.05), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.hero-eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.hero-eyebrow span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-title {
  font-family: var(--head);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-desc {
  font-size: 1rem;
  color: var(--muted2);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.hero-stat-num {
  font-family: var(--head);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.hero-stat-num span { color: var(--accent); }
.hero-stat-label {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-art {
  opacity: 0.3;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.45;
  color: var(--accent);
  user-select: none;
  width: 215px;
}

/* --- SECTION HEADERS --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition);
}
.section-link:hover { gap: 0.55rem; color: var(--accent); }

/* --- TAGS / BADGES --- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity var(--transition);
}
.tag:hover { opacity: 0.75; }

.tag-apt     { color: #f87171; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
.tag-ransom  { color: #fb923c; border-color: rgba(251,146,60,0.35);  background: rgba(251,146,60,0.08); }
.tag-rootkit { color: #a78bfa; border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.08); }
.tag-botnet  { color: #34d399; border-color: rgba(52,211,153,0.35);  background: rgba(52,211,153,0.08); }
.tag-uefi    { color: #38bdf8; border-color: rgba(56,189,248,0.35);  background: rgba(56,189,248,0.08); }
.tag-detect  { color: #22c55e; border-color: rgba(34,197,94,0.35);   background: rgba(34,197,94,0.08); }
.tag-kernel  { color: #c084fc; border-color: rgba(192,132,252,0.35); background: rgba(192,132,252,0.08); }
.tag-default { color: var(--muted2); border-color: var(--border2); background: var(--surface2); }

/* Category color mapping */
.cat-apt     .tag-default, a.cat-link-apt    { color: #f87171; }
.cat-ransom  .tag-default, a.cat-link-ransom { color: #fb923c; }

.post-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.6rem; }

/* --- FEATURED GRID (homepage) --- */
.featured-section { padding: 0 0 3rem; }
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Main featured card */
.card-featured-main {
  grid-row: 1 / 3;
  background: var(--surface);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.card-featured-main:hover { background: var(--surface2); }
.card-featured-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(56,189,248,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.card-corner-tl {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 40px; height: 40px;
  border-top: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  border-top-right-radius: var(--radius);
  opacity: 0.5;
}
.card-report-id {
  position: absolute;
  top: 1.5rem; left: 2.25rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--border2);
  letter-spacing: 0.08em;
}
.card-featured-main .card-title {
  font-family: var(--head);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.card-featured-main .card-excerpt {
  font-size: 0.88rem;
  color: var(--muted2);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Side cards */
.card-featured-side {
  background: var(--surface);
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.card-featured-side:hover { background: var(--surface2); }
.card-featured-side .card-title {
  font-family: var(--head);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
}
.card-featured-side .card-excerpt {
  font-size: 0.82rem;
  color: var(--muted2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Card meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.card-meta-dot { color: var(--border2); }

/* Read link */
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: auto;
  transition: gap var(--transition);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  width: 100%;
}
.read-link:hover { gap: 0.6rem; color: #7dd3fc; }
.read-link::after { content: '→'; }

/* --- POST LIST (archive / index) --- */
.post-list { display: flex; flex-direction: column; }

.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.post-card:first-child { border-top: 1px solid var(--border); }
.post-card:hover .post-card-title { color: var(--accent); }

.post-card-left { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }

.post-card-title {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
  transition: color var(--transition);
}

.post-card-excerpt {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  padding-top: 0.1rem;
  flex-shrink: 0;
}
.post-card-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}
.post-card-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--border2);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2.5rem 0;
  font-family: var(--mono);
}
.pagination a,
.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--muted2);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
  text-decoration: none;
}
.pagination a:hover { color: var(--accent); border-color: var(--accent); background: var(--surface2); }
.pagination .current { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.pagination .dots { border: none; background: none; }

/* --- SINGLE POST --- */
.single-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.single-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.post-index-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--border2);
  letter-spacing: 0.08em;
}
.single-title {
  font-family: var(--head);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.single-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.single-meta-sep { color: var(--border); }
.single-meta .author-name { color: var(--muted2); }

/* Featured image */
.post-thumbnail {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-thumbnail img { width: 100%; }

/* Post content */
.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted2);
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.entry-content h2 {
  font-size: 1.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.05rem; color: var(--accent); }
.entry-content p   { margin-bottom: 1.35rem; }
.entry-content ul,
.entry-content ol  { margin-bottom: 1.35rem; }
.entry-content li  { margin-bottom: 0.4rem; }
.entry-content a   { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}
.entry-content .wp-block-image figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Post footer */
.entry-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.entry-footer-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.entry-footer-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 0.25rem;
}

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 3rem 0;
}
.nav-previous, .nav-next {
  background: var(--surface);
  padding: 1.5rem;
  transition: background var(--transition);
}
.nav-next { text-align: right; }
.nav-previous:hover, .nav-next:hover { background: var(--surface2); }
.nav-direction {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.nav-title {
  font-family: var(--head);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
  text-decoration: none;
  display: block;
  transition: color var(--transition);
}
.nav-title:hover { color: var(--accent); }

/* --- SIDEBAR WIDGETS --- */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  margin: 0;
}
.widget-body { padding: 1.25rem; }

/* Recent posts widget */
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0; margin: 0; }
.widget .recent-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.widget .recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.widget .recent-post-item a {
  font-family: var(--head);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  transition: color var(--transition);
}
.widget .recent-post-item a:hover { color: var(--accent); }
.widget .post-date {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--muted);
}

/* Categories widget */
.widget .category-list { display: flex; flex-direction: column; gap: 0.3rem; }
.widget .category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.widget .category-item:hover { background: var(--surface2); }
.widget .category-name {
  font-size: 0.84rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.widget .cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.widget .cat-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--surface3);
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
}

/* Tag cloud widget */
.widget .tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Search widget */
.widget-search .search-form {
  display: flex;
  gap: 0.4rem;
}
.widget-search .search-field {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color var(--transition);
}
.widget-search .search-field::placeholder { color: var(--muted); }
.widget-search .search-field:focus { border-color: var(--accent); }
.widget-search .search-submit {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: opacity var(--transition);
}
.widget-search .search-submit:hover { opacity: 0.85; }

/* --- COMMENTS --- */
.comments-area {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.comments-title {
  font-family: var(--head);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.75rem;
}
.comment-list { list-style: none; padding: 0; }
.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-body { display: flex; gap: 1rem; }
.comment-avatar img {
  border-radius: 50%;
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
}
.comment-meta { margin-bottom: 0.5rem; }
.comment-author { font-family: var(--head); font-size: 0.95rem; text-transform: uppercase; color: var(--text); }
.comment-time { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); margin-top: 0.15rem; }
.comment-content { font-size: 0.9rem; color: var(--muted2); }
.reply a {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.5rem;
  display: inline-block;
}

/* Comment form */
.comment-respond { margin-top: 2rem; }
.comment-respond .comment-reply-title {
  font-family: var(--head);
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.comment-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.9rem;
  padding: 0.65rem 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .form-submit { margin-top: 1.25rem; }
.comment-form .submit {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.7rem 1.75rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity var(--transition);
}
.comment-form .submit:hover { opacity: 0.85; }

/* --- PAGE TEMPLATE --- */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-title {
  font-family: var(--head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
}

/* --- 404 PAGE --- */
.error-404 { text-align: center; padding: 6rem 0; }
.error-code {
  font-family: var(--mono);
  font-size: 8rem;
  font-weight: 700;
  color: var(--border2);
  line-height: 1;
  margin-bottom: 1.5rem;
  display: block;
}
.error-title {
  font-family: var(--head);
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}
.error-desc { font-size: 0.95rem; color: var(--muted2); margin-bottom: 2rem; }

/* --- SEARCH RESULTS --- */
.search-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.search-header-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.search-header-title {
  font-family: var(--head);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
}
.search-header-title span { color: var(--accent); }

/* --- SITE FOOTER --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}
.footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.875rem; }
.footer-logo-link {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.footer-tagline { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.footer-disclaimer {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--border2);
  line-height: 1.5;
}
.footer-col-title {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.875rem;
}
.footer-nav-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-nav-list a {
  font-size: 0.83rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav-list a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy, .footer-credit {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}
.footer-credit { color: var(--border2); }

/* --- UTILITY CLASSES --- */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--muted2); }
.text-mono    { font-family: var(--mono); }
.flex-center  { display: flex; align-items: center; }
.gap-sm       { gap: 0.5rem; }
.gap-md       { gap: 1rem; }
.mt-auto      { margin-top: auto; }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease both; }
.delay-1    { animation-delay: 0.1s; }
.delay-2    { animation-delay: 0.2s; }
.delay-3    { animation-delay: 0.3s; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* No-posts message */
.no-results {
  text-align: center;
  padding: 4rem 0;
}
.no-results-title {
  font-family: var(--head);
  font-size: 1.6rem;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.no-results-desc { color: var(--muted2); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .card-featured-main { grid-row: auto; min-height: 300px; }
  .content-area { grid-template-columns: 1fr; }
  .sidebar-area { position: static; }
  .footer-widgets { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .menu-toggle { display: block; }
  .primary-navigation,
  .header-search-form { display: none; }
  .primary-navigation.is-open { display: flex; }
  .nav-menu {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(7,16,30,0.97);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .nav-menu a { width: 100%; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .footer-widgets { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 1.5rem; }
  .featured-section { padding: 0 0 2rem; }
}

@media (max-width: 480px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card-right { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-title { font-size: 2.8rem; }
  .single-title { font-size: 2rem; }
}
