* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #07070a;
  --bg-2: #0d0b11;
  --panel: rgba(13, 11, 22, 0.82);
  --panel-strong: rgba(22, 18, 34, 0.94);
  --border: rgba(155, 92, 255, 0.13);
  --border-strong: rgba(155, 92, 255, 0.28);
  --text: #f5f0fc;
  --muted: #a393b8;
  --dim: #716380;
  --accent: #9b5cff;
  --accent-2: #ff7df2;
  --accent-warm: #f2c86b;
  --accent-soft: rgba(155, 92, 255, 0.12);
  --accent-line: rgba(155, 92, 255, 0.35);
  --accent-muted: #cbb1ff;
  --good: #80e6ae;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(155, 92, 255, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 125, 242, 0.032) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 18% 14%, rgba(155, 92, 255, 0.14), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(255, 125, 242, 0.09), transparent 28%),
    linear-gradient(180deg, #0b0710 0%, var(--bg) 48%, #040305 100%);
  background-size: 74px 74px, 74px 74px, auto, auto, auto;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(155, 92, 255, 0.065), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  content: "";
  pointer-events: none;
}

.page-silhouette {
  position: fixed;
  z-index: -1;
  top: 96px;
  right: max(-70px, calc((100vw - 1220px) / 2 - 120px));
  width: min(44vw, 520px);
  opacity: 0.085;
  pointer-events: none;
}

.page-silhouette img {
  width: 100%;
  filter: drop-shadow(0 0 44px rgba(155, 92, 255, 0.35));
  transform: rotate(-10deg);
}

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 3, 6, 0.78);
  backdrop-filter: blur(16px);
}

.site-header.scrolled {
  background: rgba(4, 3, 6, 0.94);
}

.navbar {
  display: flex;
  width: min(1220px, 100%);
  min-height: 70px;
  margin: auto;
  padding: 0 28px;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
}

.logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(155, 92, 255, 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  display: inline-flex;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
  background: rgba(155, 92, 255, 0.08);
}

.nav-links .nav-cta {
  border: 0;
  color: var(--accent);
  background: transparent;
}

.menu-toggle {
  display: none;
}

section {
  position: relative;
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 92px 28px;
  scroll-margin-top: 72px;
}

.hero {
  padding-top: 160px;
  padding-bottom: 40px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  align-items: center;
  gap: 9px;
  color: var(--accent-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(155, 92, 255, 0.72);
}

h1 {
  max-width: 900px;
  margin: 0 auto 22px;
  font-size: clamp(42px, 8vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.gradient {
  color: var(--text);
  text-shadow: 0 0 28px rgba(155, 92, 255, 0.22);
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

/* Article Grid Section */
.blog-section {
  padding-top: 40px;
  padding-bottom: 120px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--panel-strong);
  box-shadow: 0 20px 48px rgba(155, 92, 255, 0.05);
}

.blog-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--dim);
}

.blog-card .meta .category {
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
}

.blog-card h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 14px;
  color: white;
  transition: color 0.2s ease;
}

.blog-card:hover h2 {
  color: var(--accent);
}

.blog-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.blog-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-muted);
  transition: gap 0.2s ease;
}

.blog-card:hover .read-more {
  color: white;
  gap: 12px;
}

/* Article Reading Page Layout */
.article-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 160px 28px 120px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.article-header {
  margin-bottom: 48px;
}

.article-header .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--muted);
}

.article-header .category {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

.article-header h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  margin-bottom: 24px;
  text-align: left;
}

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.article-content p {
  margin-bottom: 24px;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 44px 0 20px;
  color: white;
  font-family: "JetBrains Mono", monospace;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: white;
}

.article-content ul, 
.article-content ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 12px;
}

.article-content code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  background: rgba(155, 92, 255, 0.08);
  border: 1px solid rgba(155, 92, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-muted);
}

.article-content pre {
  margin: 28px 0;
  padding: 20px;
  background: rgba(4, 3, 6, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.article-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: #ebdffc;
  font-size: 13px;
  line-height: 1.6;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(155, 92, 255, 0.04);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}

.article-content blockquote p {
  margin-bottom: 0;
}

/* Footer & Decorative elements */
.footer {
  position: relative;
  width: min(1220px, 100%);
  margin: 80px auto 0;
  padding: 50px 28px 34px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  margin-bottom: 40px;
  justify-content: space-between;
  gap: 46px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand h2 {
  margin-bottom: 12px;
  font-size: 36px;
}

.footer-brand p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  gap: 58px;
  flex-wrap: wrap;
}

.footer-column h4 {
  margin-bottom: 14px;
  font-size: 13px;
}

.footer-column a {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 12px;
}

/* Responsiveness */
@media (max-width: 1080px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    background: rgba(13, 11, 22, 0.84);
  }

  .menu-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background: white;
    transition: 0.2s ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    visibility: hidden;
    top: 76px;
    right: 24px;
    left: 24px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    opacity: 0;
    background: rgba(5, 4, 8, 0.98);
    transform: translateY(-8px);
    transition: 0.2s ease;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links a {
    justify-content: flex-start;
  }

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

  .page-silhouette {
    top: 110px;
    right: -120px;
    width: 420px;
    opacity: 0.06;
  }
}

@media (max-width: 560px) {
  .navbar,
  section,
  .footer,
  .article-container {
    padding-inline: 16px;
  }
}

/* Ads Layout Elements */
.ads-sidebar-left,
.ads-sidebar-right {
  position: fixed;
  top: 100px;
  width: 160px;
  height: 600px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
}

.ads-sidebar-left {
  left: calc((100vw - 1220px) / 2 - 180px);
}

.ads-sidebar-right {
  right: calc((100vw - 1220px) / 2 - 180px);
}

@media (max-width: 1560px) {
  .ads-sidebar-left,
  .ads-sidebar-right {
    display: none;
  }
}

.ads-header-leaderboard {
  width: 100%;
  max-width: 728px;
  margin: 100px auto 20px;
  display: flex;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
}

.ads-footer-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  width: 100%;
  max-width: 320px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(4, 3, 6, 0.94);
  border-top: 1px solid var(--border-strong);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

.ads-content-banner {
  display: flex;
  justify-content: center;
  margin: 30px auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.native-ads-container {
  width: min(1220px, 100%);
  margin: 40px auto;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.smartlink-button-wrap {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.smartlink-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 36px;
  font-size: 18px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  color: #06100b;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: 2px solid #ffea70;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 140, 0, 0.4);
  animation: ad-pulse 1.5s infinite;
  transition: transform 0.2s ease;
}

.smartlink-button:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ffe033, #ffa500);
}

@keyframes ad-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 140, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
  }
}
