:root {
  --bg: #05060F;
  --bg-2: #0A0C1B;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --iris: #6C63FF;
  --violet: #8B5CF6;
  --cyan: #06B6D4;
  --amber: #F59E0B;
  --emerald: #10B981;
  --rose: #F43F5E;
  --text: #EDEFFB;
  --dim: #9AA0C3;
  --faint: #5A6080;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(108, 99, 255, 0.35);
  --grad: linear-gradient(120deg, #6C63FF, #8B5CF6 45%, #06B6D4 95%);
  --grad-warm: linear-gradient(120deg, #F59E0B, #EC4899 50%, #8B5CF6);
  --disp: 'Space Grotesk', sans-serif;
  --body: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow accents */
.ambient-glow {
  position: absolute;
  top: -100px;
  left: 25%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ---------- Header & Navbar ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 6, 15, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(108, 99, 255, 0.4);
}
.brand-name {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand-badge {
  font-size: 10px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: #FFFFFF;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-nav-cta {
  background: var(--grad);
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.35);
  transition: transform 0.2s;
}
.btn-nav-cta:hover {
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-actions .btn-nav-cta { display: none; }
}

/* Mobile Dropdown Nav */
.mobile-nav-panel {
  display: none;
  background: #0A0C1B;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.mobile-nav-panel.open {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile-nav-panel a {
  color: var(--dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 0;
}
.mobile-nav-panel a:hover { color: #fff; }

/* ---------- Homepage Layout ---------- */
.hero-featured {
  padding: 40px 0 20px;
}
.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: border-color 0.3s;
}
.featured-card:hover {
  border-color: var(--cyan);
}
@media (max-width: 860px) {
  .featured-card { grid-template-columns: 1fr; }
}
.featured-img-wrap {
  position: relative;
  min-height: 320px;
  background: #111827;
}
.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tag-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(108, 99, 255, 0.15);
  color: #C7D2FE;
  border: 1px solid rgba(108, 99, 255, 0.35);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.featured-title {
  font-family: var(--disp);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  color: #FFFFFF;
}
.featured-title a:hover {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.featured-desc {
  color: var(--dim);
  font-size: 15px;
  margin-bottom: 20px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--faint);
}
.meta-row i { color: var(--cyan); }

/* ---------- Articles Grid ---------- */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 50px 0 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.section-title-row h2 {
  font-family: var(--disp);
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--dim);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
  background: rgba(108, 99, 255, 0.2);
  border-color: var(--iris);
  color: #fff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 60px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.card-thumb {
  height: 190px;
  background: #111827;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.news-card:hover .card-thumb img {
  transform: scale(1.05);
}
.card-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-content h3 {
  font-family: var(--disp);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: #FFFFFF;
}
.card-content p {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* ---------- Single Article Page ---------- */
.article-container {
  max-width: 840px;
  margin: 40px auto 80px;
  padding: 0 16px;
}
.article-header {
  margin-bottom: 30px;
}
.article-header h1 {
  font-family: var(--disp);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 14px 0 18px;
  color: #FFFFFF;
}
.article-lead {
  font-size: 1.15rem;
  color: #CBD5E1;
  line-height: 1.6;
  margin-bottom: 24px;
}
.article-meta-box {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-size: 13px;
  color: var(--dim);
  flex-wrap: wrap;
}

.article-hero-media {
  border-radius: 20px;
  overflow: hidden;
  margin: 28px 0 36px;
  border: 1px solid var(--border);
}
.article-hero-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* Article Body Typography */
.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: #E2E8F0;
}
.article-body p {
  margin-bottom: 22px;
}
.article-body h2 {
  font-family: var(--disp);
  font-size: 1.65rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 36px 0 16px;
}
.article-body h3 {
  font-family: var(--disp);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 28px 0 12px;
}
.article-body ul, .article-body ol {
  padding-left: 28px;
  margin-bottom: 22px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body blockquote {
  border-left: 4px solid var(--iris);
  background: rgba(108, 99, 255, 0.08);
  padding: 16px 22px;
  border-radius: 0 14px 14px 0;
  font-style: italic;
  margin: 26px 0;
  color: #CBD5E1;
}

/* ---------- 🌟 SMART CODE BOX WITH COPY BUTTON ---------- */
.code-box {
  background: #080A16;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  margin: 28px 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.code-box-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.code-lang-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.copy-code-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--dim);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}
.copy-code-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
  color: #34D399;
}
.code-box pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: #F8FAFC;
}

/* ---------- RESPONSIVE VIDEO WRAPPER ---------- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: 28px 0;
  background: #000;
}
.video-wrapper iframe, .video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ---------- DOWNLOADABLE DOCUMENT CARD ---------- */
.doc-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.doc-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.doc-card-icon {
  font-size: 28px;
  color: var(--amber);
}
.doc-card-title {
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
}
.doc-card-size {
  font-size: 12px;
  color: var(--dim);
}
.btn-doc-download {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--amber);
  color: #FEF3C7;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-doc-download:hover {
  background: var(--amber);
  color: #0A0A0A;
}

/* ---------- HIGH-CPM AD SLOTS ---------- */
.ad-slot-header {
  margin: 24px auto;
  text-align: center;
  min-height: 90px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ad-slot-inarticle {
  margin: 36px auto;
  text-align: center;
  min-height: 250px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

/* ---------- Footer ---------- */
footer {
  background: #020308;
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  color: var(--dim);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--cyan);
}
.footer-copy {
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
}
