/* --------------------------------------------------
   GLOBAL RESET + BASE
-------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 1.5rem 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

/* --------------------------------------------------
   CYBERSECURITY THEME VARIABLES
-------------------------------------------------- */
:root {
  --bg: #05070a;
  --bg-elevated: #0b0f14;
  --bg-hover: #0f141b;

  --text: #e8f1f8;
  --text-muted: #7f8b99;

  --border: #0f1a24;
  --border-soft: #14212e;

  --accent: #2ee6c8;
  --accent-soft: #1aa38c;
  --accent-hover: #4fffe2;

  --radius: 8px;
  --max-width: 860px;

  --card-bg: #0b0f14;
  --hover-bg: #111821;

  --shadow-soft: 0 18px 45px rgba(0, 255, 200, 0.05);

  --gradient-main:
    radial-gradient(circle at top left, rgba(46, 230, 200, 0.18), transparent 55%),
    radial-gradient(circle at top right, rgba(0, 255, 170, 0.18), transparent 55%);

  --gradient-card:
    linear-gradient(135deg, rgba(46, 230, 200, 0.22), rgba(0, 255, 170, 0.22));
}

[data-theme="light"] {
  --bg: #f4f7f9;
  --bg-elevated: #ffffff;
  --bg-hover: #e9f4f4;

  --text: #0e1a22;
  --text-muted: #4f5c66;

  --border: #d5e2e8;
  --border-soft: #e3edf2;

  --card-bg: #ffffff;
  --hover-bg: #eef7f7;

  --shadow-soft: 0 16px 40px rgba(0, 80, 60, 0.12);

  --gradient-main:
    radial-gradient(circle at top left, rgba(46, 230, 200, 0.12), transparent 55%),
    radial-gradient(circle at top right, rgba(0, 255, 170, 0.12), transparent 55%);

  --gradient-card:
    linear-gradient(135deg, rgba(46, 230, 200, 0.18), rgba(0, 255, 170, 0.18));
}

/* --------------------------------------------------
   PAGE WRAPPER
-------------------------------------------------- */
.page-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --------------------------------------------------
   GLOBAL NAVIGATION
-------------------------------------------------- */
.global-nav {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 2rem auto;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
}

.global-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.global-nav a:hover {
  color: #ffffff;
  border-color: rgba(46, 230, 200, 0.7);
  background: radial-gradient(circle at top left, rgba(46, 230, 200, 0.25), transparent 60%);
  box-shadow: 0 0 0 1px rgba(0, 255, 170, 0.35);
}

.theme-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: rgba(46, 230, 200, 0.6);
}

/* --------------------------------------------------
   SITE HEADER / FOOTER
-------------------------------------------------- */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem auto;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}

.site-header .logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.site-header .nav a {
  margin-left: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-header .nav a:hover {
  color: #ffffff;
  border-color: rgba(46, 230, 200, 0.6);
  background: rgba(15, 20, 27, 0.9);
}

.site-footer {
  max-width: var(--max-width);
  margin: 3rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* --------------------------------------------------
   HOMEPAGE HERO
-------------------------------------------------- */
.home-hero {
  text-align: center;
  margin: 2.5rem auto 2.75rem auto;
  max-width: var(--max-width);
  position: relative;
  padding: 2.25rem 1.25rem 2.5rem;
  border-radius: 1.5rem;
  background: var(--gradient-main), linear-gradient(145deg, #05070a, #0b0f14);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(46, 230, 200, 0.25);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 750;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* --------------------------------------------------
   SEARCH BAR + TYPING OVERLAY
-------------------------------------------------- */
.search-container {
  margin: 1.9rem auto 1.1rem auto;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 200, 0.55);
  background: rgba(5, 7, 10, 0.9);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 255, 170, 0.25);
  position: relative;
  z-index: 2;
}

.search-input:focus {
  border-color: rgba(46, 230, 200, 0.95);
  box-shadow:
    0 0 0 1px rgba(46, 230, 200, 0.65),
    0 0 22px rgba(0, 255, 170, 0.35),
    0 0 45px rgba(0, 255, 170, 0.15);
}

/* CYBER GLOW TYPING TEXT */
.typing-overlay {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.98rem;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  text-shadow:
    0 0 6px rgba(46, 230, 200, 0.55),
    0 0 12px rgba(0, 255, 170, 0.45),
    0 0 18px rgba(0, 255, 170, 0.35);
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow:
    0 0 6px rgba(46, 230, 200, 0.55),
    0 0 12px rgba(0, 255, 170, 0.45),
    0 0 18px rgba(0, 255, 170, 0.35);
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* --------------------------------------------------
   RANDOM BUTTON
-------------------------------------------------- */
.random-wrapper {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
}

.random-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background-image: var(--gradient-card);
  color: #ffffff;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(46, 230, 200, 0.7);
  box-shadow: 0 10px 30px rgba(0, 255, 170, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.random-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 40px rgba(0, 255, 170, 0.25);
}

/* --------------------------------------------------
   TRUST SECTION
-------------------------------------------------- */
.trust-section {
  max-width: var(--max-width);
  margin: 2.75rem auto 2.5rem auto;
  padding: 1.75rem 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #0a0f14, #0d141b);
  border: 1px solid rgba(46, 230, 200, 0.25);
  box-shadow: var(--shadow-soft);
}

.trust-section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.trust-section p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.1rem;
}

.trust-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.trust-links a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 200, 0.4);
  background: rgba(5, 7, 10, 0.9);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.trust-links a:hover {
  background: rgba(0, 255, 170, 0.12);
  border-color: rgba(0, 255, 170, 0.8);
  color: #ffffff;
}

/* --------------------------------------------------
   FEATURED CATEGORIES
-------------------------------------------------- */
.featured-categories {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem auto;
}

.featured-categories h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.category-card {
  flex: 1 1 160px;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(46, 230, 200, 0.25), transparent 60%),
              linear-gradient(145deg, #0a0f14, #0d141b);
  border: 1px solid rgba(46, 230, 200, 0.4);
  color: #ffffff;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 255, 170, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 170, 0.9);
  box-shadow: 0 14px 40px rgba(0, 255, 170, 0.25);
}

/* --------------------------------------------------
   LATEST GRID
-------------------------------------------------- */
.latest-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: 2.5rem;
}

.latest-grid h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-card {
  padding: 1.25rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgba(46, 230, 200, 0.18), transparent 60%),
              linear-gradient(145deg, #0a0f14, #0d141b);
  border: 1px solid rgba(15, 26, 36, 0.9);
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 12px 32px rgba(0, 255, 170, 0.15);
}

.article-card:hover {
  background: radial-gradient(circle at top left, rgba(0, 255, 170, 0.25), transparent 60%),
              linear-gradient(145deg, #0b1016, #0f161e);
  border-color: rgba(0, 255, 170, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 255, 170, 0.25);
}

.article-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.updated {
  opacity: 0.7;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------
   ARTICLE PAGE
-------------------------------------------------- */
.article-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

.article {
  max-width: var(--max-width);
  margin: 0 auto;
  background: linear-gradient(145deg, #0a0f14, #0d141b);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.1rem 1.75rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.article h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: left;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* Sections inside article */
.highlights {
  margin-top: 1.5rem;
}

.highlights h2 {
  margin-bottom: 0.75rem;
}

.human,
.technical,
.affiliate {
  margin-top: 2rem;
}

/* --------------------------------------------------
   TYPOGRAPHY
-------------------------------------------------- */
h1, h2, h3 {
  font-weight: 600;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.article p,
.article li {
  max-width: 700px;
}

/* --------------------------------------------------
   LINKS
-------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* --------------------------------------------------
   LISTS
-------------------------------------------------- */
ul {
  margin: 1rem 0 1.5rem 1.25rem;
}

li {
  margin-bottom: 0.6rem;
}

/* --------------------------------------------------
   RELATED + EXPLORE MORE
-------------------------------------------------- */
.related,
.explore-more {
  margin-top: 2.5rem;
}

.related h2,
.explore-more h2 {
  margin-bottom: 0.75rem;
}

.related ul,
.explore-more ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related li,
.explore-more li {
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------
   HOMEPAGE INTERNAL LINKS (BOTTOM)
-------------------------------------------------- */
.homepage-internal-links {
  max-width: var(--max-width);
  margin: 2.75rem auto 0 auto;
}

.homepage-internal-links h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.link-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #0a0f14, #151f28);
  border: 1px solid rgba(46, 230, 200, 0.6);
  color: #ffffff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 10px 26px rgba(0, 255, 170, 0.18);
}

.link-btn:hover {
  background: linear-gradient(145deg, #151f28, #1b2833);
  border-color: rgba(0, 255, 170, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 255, 170, 0.25);
}

/* --------------------------------------------------
   IMAGES
-------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* --------------------------------------------------
   CLUSTER / CATEGORY / TOPIC WRAPPERS
-------------------------------------------------- */
.cluster-wrapper,
.category-wrapper,
.topic-wrapper {
  max-width: var(--max-width);
  margin: 1.5rem auto 0 auto;
  background: linear-gradient(145deg, #0a0f14, #0d141b);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
}

.cluster-content,
.category-content,
.topic-content {
  font-size: 1.02rem;
}

/* --------------------------------------------------
   CLUSTER PAGE (LEGACY CLASS)
-------------------------------------------------- */
.cluster-page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1rem;
}

.cluster-header {
  margin-bottom: 1.5rem;
}

.cluster-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cluster-header p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.cluster-nav {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cluster-nav a {
  color: var(--text-muted);
}

.cluster-nav a:hover {
  color: var(--accent);
}

.cluster-list {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0;
}

.cluster-article {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cluster-article:last-child {
  border-bottom: none;
}

.cluster-article-title {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.cluster-article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cluster-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.25rem;
}

.cluster-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------
   GLOBAL FOOTER (FIXED)
-------------------------------------------------- */
.global-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 3rem auto 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);

  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;

  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-hover);
}

.footer-bottom {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
