/* ========== PARANOID BLOG — Shared Stylesheet ========== */

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

:root {
  --bg-deep: #06060c;
  --bg-primary: #0a0a12;
  --bg-card: #10101c;
  --bg-card-hover: #161628;
  --bg-section-alt: #0c0c16;
  --accent: #00D2FF;
  --accent-blue: #3A7BD5;
  --accent-gradient: linear-gradient(135deg, #00D2FF, #3A7BD5);
  --accent-glow: rgba(0, 210, 255, 0.15);
  --green: #00E676;
  --red: #FF5252;
  --orange: #FFD740;
  --purple: #B388FF;
  --text-primary: #E8E8F0;
  --text-secondary: #8888A0;
  --text-muted: #555570;
  --border: rgba(255,255,255,0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ========== NAVIGATION ========== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(6,6,12,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
nav.scrolled { background: rgba(6,6,12,0.95); }
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 32px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 20px; font-weight: 800; letter-spacing: 3px;
  background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-logo a {
  background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); opacity: 1; }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--accent-gradient); color: #000; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: 0.3s; border-radius: 2px; }

/* ========== CRT OVERLAY ========== */
.crt-overlay {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  opacity: 0.4;
}

/* ========== BLOG HERO ========== */
.blog-hero {
  padding: 140px 32px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,210,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,210,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.6;
}
.blog-hero-prefix {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
}
.blog-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
  background: var(--accent-gradient);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  position: relative;
}
.blog-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ========== BLOG LISTING GRID ========== */
.blog-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.blog-card > *:not(.blog-card-thumb-wrap) {
  padding-left: 28px;
  padding-right: 28px;
}
.blog-card > .blog-card-tag { padding-top: 24px; }
.blog-card > .blog-card-meta { padding-bottom: 28px; }
.blog-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.blog-card:hover {
  border-color: rgba(0,210,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.blog-card:hover::before { transform: scaleX(1); }

.blog-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.tag-guide { background: rgba(0,210,255,0.1); color: var(--accent); }
.tag-comparison { background: rgba(58,123,213,0.1); color: var(--accent-blue); }
.tag-tutorial { background: rgba(0,230,118,0.1); color: var(--green); }
.tag-security { background: rgba(255,82,82,0.1); color: var(--red); }

.blog-card-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-card-title a:hover { color: var(--accent); }

.blog-card-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== BLOG CTA SECTION ========== */
.blog-cta-section {
  text-align: center;
  padding: 80px 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,210,255,0.03), rgba(58,123,213,0.03));
}
.blog-cta-section h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.blog-cta-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent-gradient);
  color: #000;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  color: #000;
  opacity: 1;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  background: transparent;
  border: 2px solid rgba(0,210,255,0.3);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: rgba(0,210,255,0.6);
  color: var(--accent);
  opacity: 1;
}

/* ========== COVER IMAGE (Article) ========== */
.article-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
  display: block;
}

/* ========== CARD THUMBNAIL (Blog Index) ========== */
.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  margin: 0;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.85) saturate(1.1);
}
.blog-card:hover .blog-card-thumb {
  transform: scale(1.03);
  filter: brightness(1) saturate(1.2);
}
.blog-card-thumb-wrap {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 0;
  line-height: 0;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .separator { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); }

/* ========== ARTICLE CONTAINER ========== */
.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 100px 32px 64px;
}

/* ========== ARTICLE HEADER ========== */
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-header .blog-card-tag { margin-bottom: 20px; }
.article-header h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== TABLE OF CONTENTS ========== */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 48px;
}
.toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.toc ul {
  list-style: none;
  padding: 0;
}
.toc li {
  margin-bottom: 8px;
}
.toc a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}
.toc a:hover { color: var(--accent); opacity: 1; }
.toc a:hover::before { background: var(--accent); }
.toc a.active { color: var(--accent); }
.toc a.active::before { background: var(--accent); }

/* ========== ARTICLE BODY TYPOGRAPHY ========== */
.article-body h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 56px 0 20px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  padding-top: 16px;
}
.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-primary);
}
.article-body h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-primary);
}
.article-body p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,210,255,0.3);
}
.article-body a:hover {
  text-decoration-color: var(--accent);
  opacity: 1;
}
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}
.article-body li {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-body code {
  font-family: var(--mono);
  background: rgba(0,210,255,0.08);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 15px;
  color: var(--accent);
}
.article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 28px;
  line-height: 1.6;
}
.article-body pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 28px 0;
  background: rgba(0,210,255,0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body blockquote p {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 24px 0;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ========== ARTICLE TABLES ========== */
.table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.article-body thead {
  background: var(--bg-card);
}
.article-body th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: rgba(0,210,255,0.02); }

.check { color: var(--green); font-weight: 700; }
.cross { color: var(--red); font-weight: 700; }
.partial { color: var(--orange); font-weight: 700; }

/* ========== ARTICLE INLINE CTA ========== */
.article-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(0,210,255,0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 40px 0;
}
.article-cta-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.article-cta-text {
  flex: 1;
}
.article-cta-text strong {
  display: block;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.article-cta-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent-gradient);
  color: #000;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
  color: #000;
  opacity: 1;
}

/* ========== ARTICLE END CTA ========== */
.article-cta-final {
  text-align: center;
  padding: 48px 32px;
  margin: 56px 0 40px;
  background: linear-gradient(135deg, rgba(0,210,255,0.04), rgba(58,123,213,0.04));
  border: 1px solid rgba(0,210,255,0.12);
  border-radius: var(--radius);
}
.article-cta-final h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.article-cta-final p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.article-cta-final .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== RELATED ARTICLES ========== */
.related-articles {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.related-articles h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
}
.related-card:hover {
  border-color: rgba(0,210,255,0.15);
  transform: translateY(-2px);
  opacity: 1;
}
.related-card .blog-card-tag { margin-bottom: 12px; }
.related-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 12px;
}
.related-card .blog-card-meta {
  font-size: 12px;
}

/* ========== SCAN LINE ANIMATION ========== */
@keyframes scanLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scan-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.15; animation: scanLine 6s linear infinite;
  pointer-events: none;
}

/* ========== NEON PULSE ========== */
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0,210,255,0.3), 0 0 10px rgba(0,210,255,0.1); }
  50% { box-shadow: 0 0 10px rgba(0,210,255,0.5), 0 0 20px rgba(0,210,255,0.2); }
}
.neon-pulse { animation: neonPulse 3s ease-in-out infinite; }

/* ========== FADE IN ========== */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== FOOTER ========== */
footer {
  padding: 64px 32px; text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.footer-logo {
  font-size: 24px; font-weight: 900; letter-spacing: 4px;
  background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; font-style: italic; }
.footer-links { display: flex; gap: 32px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ========== COOKIE CONSENT ========== */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 1200;
  background: rgba(16, 16, 28, 0.98);
  border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner h4 { margin: 0 0 8px; font-size: 16px; }
.cookie-banner p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cookie-btn {
  border-radius: 9px; border: 1px solid var(--border); background: transparent;
  color: var(--text-primary); padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cookie-btn.primary { background: var(--accent-gradient); color: #000; border: none; }
.cookie-btn:hover { opacity: 0.92; }

.cookie-modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  z-index: 1300; padding: 20px; background: rgba(0, 0, 0, 0.6);
}
.cookie-modal.show { display: flex; }
.cookie-modal-panel {
  width: min(680px, 100%); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
}
.cookie-modal-panel h4 { margin: 0 0 10px; font-size: 20px; }
.cookie-modal-panel p { margin: 0 0 14px; color: var(--text-secondary); font-size: 14px; }
.cookie-row {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.cookie-row h5 { margin: 0 0 4px; font-size: 14px; }
.cookie-row .cookie-meta { color: var(--text-muted); font-size: 12px; }
.cookie-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.cookie-switch input { accent-color: var(--accent-blue); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  nav .nav-links { display: none; }
  nav .nav-cta { display: none; }
  .hamburger { display: block; }

  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: rgba(6,6,12,0.98);
    padding: 24px 32px; gap: 16px; border-bottom: 1px solid var(--border);
  }

  .blog-grid { grid-template-columns: 1fr; padding: 40px 20px; }
  .blog-hero { padding: 120px 20px 48px; }

  .article-container { padding: 80px 20px 48px; }
  .article-header h1 { font-size: 32px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 20px; }

  .article-cta { flex-direction: column; text-align: center; }
  .article-cta-final { padding: 32px 20px; }

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

  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}

@media (max-width: 480px) {
  .blog-hero h1 { font-size: 32px; }
  .blog-card > *:not(.blog-card-thumb-wrap) { padding-left: 20px; padding-right: 20px; }
  .blog-card-title { font-size: 19px; }

  .article-header h1 { font-size: 28px; }
  .article-body p, .article-body li { font-size: 16px; }

  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .crt-overlay { display: none; }
  .scan-line { animation: none; }
  .neon-pulse { animation: none; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .blog-card { transition: none; }
  .blog-card::before { transition: none; }
}
