/* ============================================================
   Network Security Journal — Revamped Stylesheet
   Aesthetic: Editorial / Security Intelligence / Clean Precision
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --red: #b5000f;
  --red-dark: #8a000b;
  --red-light: #f5e6e8;
  --navy: #0d1b2a;
  --slate: #1e2d3d;
  --mid: #3c5573;
  --steel: #6b87a3;
  --mist: #c8d8e8;
  --offwhite: #f5f5f2;
  --white: #ffffff;
  --ink: #1a1a1a;
  --grey-light: #e8eaed;
  --grey-mid: #9aa5b1;
  --border: #d0d8e0;

  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --sidebar-w: 200px;
  --content-max: 980px;
  --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--offwhite);
  min-height: 100vh;
}
img { border: 0; max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); text-decoration: underline; }
h1,h2,h3,h4,h5 { font-family: var(--font-sans); font-weight: 600; line-height: 1.2; }
p { margin-bottom: 0.9em; }
ul, ol { margin: 0 0 1em 1.4em; }

/* ---- Layout Shell ---- */
#page-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(13,27,42,0.12);
  position: relative;
}

/* ---- Top Banner (ad placeholder) ---- */
#top-banner {
  background: var(--navy);
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0%, var(--navy) 40%, var(--mid) 100%);
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--navy);
  min-height: 70px;
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}

#brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
#brand-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#brand-icon svg { width: 18px; height: 18px; fill: white; }
#brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
#brand-text .brand-main {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
}
#brand-text .brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--steel);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Search form in header */
#header-search {
  display: flex;
  align-items: center;
  gap: 6px;
}
#header-search form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--transition);
}
#header-search form:focus-within {
  border-color: var(--red);
}
#header-search input[type="text"] {
  background: transparent;
  border: 0;
  padding: 7px 12px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 13px;
  width: 200px;
  outline: none;
}
#header-search input[type="text"]::placeholder { color: var(--steel); }
#header-search input[type="submit"] {
  background: var(--red);
  border: 0;
  color: white;
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background var(--transition);
}
#header-search input[type="submit"]:hover { background: var(--red-dark); }

/* ============================================================
   NAV BAR (secondary horizontal nav below header)
   ============================================================ */
#main-nav {
  background: var(--slate);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}
#main-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.03em;
}
#main-nav a:hover, #main-nav a.active {
  color: var(--white);
  border-bottom-color: var(--red);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}
#main-nav .nav-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0;
}
#main-nav .nav-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--steel);
  padding: 0 10px;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ============================================================
   BODY LAYOUT: sidebar + content
   ============================================================ */
#body-wrap {
  display: flex;
  align-items: flex-start;
  min-height: 600px;
}

/* ---- LEFT SIDEBAR ---- */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--offwhite);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  min-height: 600px;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 6px; }
.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 16px 4px;
}
.sidebar-section ul { list-style: none; margin: 0; padding: 0; }
.sidebar-section ul li a {
  display: block;
  padding: 6px 16px;
  font-size: 12.5px;
  color: var(--slate);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  font-weight: 400;
}
.sidebar-section ul li a:hover,
.sidebar-section ul li a.active {
  color: var(--red);
  border-left-color: var(--red);
  background: var(--red-light);
  text-decoration: none;
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

/* ---- MAIN CONTENT ---- */
#main-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}

/* ============================================================
   PAGE HERO (section headers)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
  padding: 30px 28px 24px;
  border-bottom: 3px solid var(--red);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 200px;
  height: 200px;
  border: 40px solid rgba(255,255,255,0.03);
  border-radius: 50%;
}
.page-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 8px;
}
.page-hero .hero-desc {
  font-size: 13px;
  color: var(--mist);
  max-width: 500px;
  line-height: 1.55;
}

/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */
#home-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  padding: 0;
}
#home-main { border-right: 1px solid var(--border); }
#home-sidebar-right { background: #f9f9f7; }

/* Section headers within content */
.content-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.content-section-hdr h2 {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--navy);
}
.content-section-hdr a.more-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.content-section-hdr a.more-link:hover { color: var(--red); }

/* ---- Article Cards ---- */
.article-card {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-light);
  transition: background var(--transition);
}
.article-card:hover { background: #fafaf8; }
.article-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--grey-light);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.article-card-icon svg { width: 28px; height: 28px; }
.article-card-body { flex: 1; min-width: 0; }
.article-card-body a.art-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--mid);
  line-height: 1.35;
  display: block;
  margin-bottom: 4px;
}
.article-card-body a.art-title:hover { color: var(--red); text-decoration: none; }
.article-card-body .art-desc {
  font-size: 12.5px;
  color: #555;
  line-height: 1.5;
}
.article-card-body .art-tag {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--steel);
  background: var(--grey-light);
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Small article list (no icon) */
.art-list-item {
  padding: 11px 20px;
  border-bottom: 1px solid var(--grey-light);
  transition: background var(--transition);
}
.art-list-item:hover { background: #fafaf8; }
.art-list-item a {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  display: block;
  margin-bottom: 3px;
}
.art-list-item a:hover { color: var(--red); text-decoration: none; }
.art-list-item p { font-size: 12px; color: #666; margin: 0; }

/* ---- Tabs ---- */
.tabs-hdr {
  display: flex;
  background: var(--navy);
  border-bottom: 2px solid var(--red);
}
.tabs-hdr button {
  background: transparent;
  border: 0;
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.tabs-hdr button:hover { color: var(--white); }
.tabs-hdr button.active {
  color: var(--white);
  border-bottom-color: var(--red);
  background: rgba(255,255,255,0.06);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Right sidebar boxes ---- */
.rsb-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.rsb-box-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Resource center promo box */
.rc-promo {
  background: linear-gradient(135deg, var(--navy), var(--slate));
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 10px;
  color: var(--mist);
  font-size: 12.5px;
  line-height: 1.5;
}
.rc-promo a {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mist);
  letter-spacing: 0.06em;
}
.rc-promo a:hover { color: white; text-decoration: none; }

/* Spotlight items */
.spotlight-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-light);
}
.spotlight-item:last-child { border-bottom: 0; }
.spotlight-item a {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  display: block;
  margin-bottom: 3px;
}
.spotlight-item a:hover { color: var(--red); text-decoration: none; }
.spotlight-item p { font-size: 11.5px; color: #666; margin: 0; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.quick-links a {
  font-size: 11.5px;
  color: var(--mid);
  padding: 4px 0;
  display: block;
}
.quick-links a:hover { color: var(--red); }

/* ============================================================
   RESOURCE CENTER PAGES
   ============================================================ */
.rc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
}
.rc-main { border-right: 1px solid var(--border); }
.rc-right { background: #f9f9f7; }

/* Featured article big box */
.featured-article-box {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13,27,42,0.03) 0%, white 100%);
}
.featured-article-box .feature-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--mid) 100%);
  border-radius: 4px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.featured-article-box .feature-img-placeholder svg { width: 48px; height: 48px; opacity: 0.3; fill: white; }
.featured-article-box h2 { font-family: var(--font-serif); font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.featured-article-box h2 a { color: inherit; }
.featured-article-box h2 a:hover { color: var(--red); text-decoration: none; }
.featured-article-box p { font-size: 13px; color: #555; }
.featured-article-box .read-more {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-top: 6px;
}

/* Section heading inside content */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  border-bottom: 2px solid var(--red);
  margin-bottom: 0;
}
.section-heading h3 {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--red);
  font-weight: 600;
}
.section-heading a.more-link {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   ARTICLE / CONTENT PAGES
   ============================================================ */
.article-body-wrap {
  padding: 24px 28px;
  max-width: 680px;
}
.article-body-wrap h1 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.25;
}
.article-body-wrap .article-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--steel);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-body-wrap .article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-body-wrap p { font-size: 14px; color: #333; line-height: 1.7; }
.article-body-wrap h2 { font-family: var(--font-serif); font-size: 18px; color: var(--navy); margin: 20px 0 10px; }
.article-body-wrap h3 { font-size: 15px; color: var(--slate); margin: 16px 0 8px; }
.article-body-wrap ul, .article-body-wrap ol {
  margin: 0 0 1em 1.4em;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* ============================================================
   ALL LISTINGS PAGE
   ============================================================ */
.listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.listing-grid .art-list-item { padding: 14px 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--navy);
  color: var(--mist);
  padding: 30px 28px 20px;
  border-top: 3px solid var(--red);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col a {
  display: block;
  font-size: 12px;
  color: var(--mist);
  padding: 3px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--steel);
  margin: 0;
}
.footer-bottom a { color: var(--steel); font-size: 10px; }
.footer-bottom a:hover { color: var(--mist); }

/* ============================================================
   UTILITY
   ============================================================ */
.clearfix::after { content: ''; display: block; clear: both; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }

/* Status badge */
.badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}
.badge-new { background: #1a7a3c; }
.badge-wp { background: var(--mid); }

/* ============================================================
   RESPONSIVE BASICS
   ============================================================ */
@media (max-width: 768px) {
  #body-wrap { flex-direction: column; }
  #sidebar { width: 100%; position: static; max-height: none; min-height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  #home-layout { grid-template-columns: 1fr; }
  .rc-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  #brand-text .brand-main { font-size: 15px; }
  #header-search input[type="text"] { width: 130px; }
}

/* ============================================================
   SVG ICON SYSTEM (inline)
   ============================================================ */
.icon { display: inline-block; vertical-align: middle; }

/* Placeholder icon backgrounds per category */
.icon-bg-firewall { background: linear-gradient(135deg, #b5000f, #3c5573); }
.icon-bg-ids { background: linear-gradient(135deg, #0d1b2a, #3c5573); }
.icon-bg-ips { background: linear-gradient(135deg, #1e2d3d, #b5000f); }
.icon-bg-nac { background: linear-gradient(135deg, #3c5573, #0d1b2a); }
.icon-bg-wp { background: linear-gradient(135deg, #4a6080, #3c5573); }
.icon-bg-news { background: linear-gradient(135deg, #555, #222); }
