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

:root {
  --bg: #0d1117;
  --surface: #151b23;
  --surface-soft: #1c2430;
  --border: #2b3543;
  --text: #f0f4f8;
  --muted: #a8b3c2;
  --muted-strong: #c4cedb;
  --accent: #7dd3fc;
  --shadow: rgba(0, 0, 0, 0.34);
}

body {
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 20px 90px;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.12), transparent 35%),
    linear-gradient(180deg, #0d1117 0%, #111827 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: auto;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 22px;
  font-weight: 800;

  background: linear-gradient(180deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 0 40px rgba(99, 102, 241, 0.15);
}

.hero p {
  max-width: 760px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  color: #94a3b8;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 20px 65px;
  }

  .hero p {
    line-height: 1.7;
  }
}

.feed {
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 30px 16px 80px;
  display: flex;
  gap: 24px;
}

.posts-scroll-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

.trending-card-container {
  width: 320px;
  flex-shrink: 0;
}

.trending-card {
  position: sticky;
  top: 30px;
  height: fit-content;
}

.mobile-trending-btn {
  display: none;
}

.ad-section {
  min-height: 140px;
  margin: 28px 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg,
      rgba(28, 36, 48, 0.9),
      rgba(21, 27, 35, 0.95));
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
}

.ad-section-wide {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  min-height: 96px;
}

.ad-section-feed {
  min-height: 250px;
  margin: 0;
}

.adsbygoogle {
  width: 100%;
  min-height: 90px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
  box-shadow: 0 18px 38px var(--shadow);
  min-width: 0;
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.42);
}

.card-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.card-body {
  padding: 22px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.card-date {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.card-readtime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  background: rgba(125, 211, 252, 0.12);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.card-body h2 {
  margin: 10px 0 14px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.card-body p {
  color: var(--muted);
}

.trending-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-layout {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 18px 90px;
  display: grid;
  grid-template-columns: 230px minmax(0, 850px);
  gap: 28px;
  align-items: start;
  justify-content: center;
}

.post-layout.no-section-nav {
  grid-template-columns: minmax(0, 850px);
}

.section-nav {
  position: sticky;
  top: 24px;
  padding: 18px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 30px var(--shadow);
}

.section-nav-toggle {
  margin-bottom: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.section-nav-icon {
  display: none;
}

.section-nav nav {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.section-nav nav::-webkit-scrollbar {
  width: 6px;
}

.section-nav nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.section-nav nav::-webkit-scrollbar-track {
  background: transparent;
}

.section-nav a {
  padding: 7px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  border-left: 2px solid transparent;
}

.section-nav a:hover,
.section-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 10px;
}

.section-nav a.section-nav-sub {
  padding-left: 14px;
  font-size: 0.84rem;
}

.section-nav a.section-nav-sub:hover,
.section-nav a.section-nav-sub.active {
  padding-left: 22px;
}

.section-nav.is-empty {
  display: none;
}

/* Page Layout - For Static Pages (Legal, Guidelines, etc.) */
.page-layout {
  width: 100%;
  margin: 0 auto;
  padding: 24px 18px 90px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.page-content {
  width: 100%;
  max-width: 850px;
}

.page-header {

  margin-top: 48px;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

.page-body {
  color: var(--text);
  line-height: 1.8;
}

.page-body h2 {
  font-size: 1.6rem;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

.page-body h3 {
  font-size: 1.2rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-weight: 600;
}

.page-body p {
  margin-bottom: 16px;
  color: var(--muted-strong);
}

.page-body ul {
  margin-left: 24px;
  margin-bottom: 16px;
  list-style: disc;
}

.page-body li {
  margin-bottom: 8px;
  color: var(--muted-strong);
}

.page-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.page-body a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .page-layout {
    padding: 18px 16px 70px;
  }

  .page-header {

    margin-top: 0;
    margin-bottom: 32px;
  }

  .page-header h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .page-body h2 {
    font-size: 1.35rem;
    margin-top: 28px;
  }

  .page-body h3 {
    font-size: 1.05rem;
    margin-top: 18px;
  }

  .page-body ul {
    margin-left: 20px;
  }
}

/* Desktop Post Bar - Professional Design */
.desktop-post-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  /* Hidden by default, shown on desktop */
}

@media (min-width: 768px) {
  .desktop-post-bar {
    display: block;
  }
}

.desktop-post-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-post-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.desktop-post-title:hover {
  opacity: 0.8;
}

.brand-logo {
  color: var(--accent);
  font-weight: 800;
}

.brand-tagline {
  color: var(--muted-strong);
  font-weight: 400;
  font-size: 1.2rem;
}

.desktop-post-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-link {
  color: var(--muted-strong);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(240, 244, 248, 0.05);
  color: var(--text);
}

.nav-current {
  color: var(--accent);
  font-weight: 600;
}

.nav-separator {
  color: var(--border);
  font-weight: bold;
}

.desktop-post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(240, 244, 248, 0.05);
  border-radius: 10px;
  color: var(--muted-strong);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(240, 244, 248, 0.1);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
  transform: translateY(0);
}

/* Adjust post layout for fixed header */
@media (min-width: 768px) {
  .post-layout {
    padding-top: 88px;
    /* 64px header + 24px spacing */
  }

  .article-page {
    border-radius: 16px 0 0 16px;
    border-left: none;
  }
}

.mobile-post-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-post-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.9rem 1rem;
}

.mobile-post-title {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  text-decoration: none;
}

.mobile-post-title .brand-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.mobile-post-title .brand-tagline {
  font-size: 0.9rem;
  color: var(--muted-strong);
  font-weight: 500;
}

.mobile-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-drawer-trigger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-drawer-trigger:hover {
  background: rgba(240, 244, 248, 0.1);
}

.section-drawer-trigger span {
  width: 18px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  .mobile-post-bar {
    display: none;
  }
}

body.section-drawer-open {
  overflow: hidden;
}

.article-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 24px 18px 90px;
  background: var(--surface);
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.article-page .ad-section:first-of-type {
  margin-top: 0;
  margin-bottom: 24px;
}

.article-page .ad-section:last-of-type {
  margin-bottom: 0;
}

.back-btn {
  display: inline-block;
  margin-top: 22px;
  margin-bottom: 22px;
  color: var(--muted-strong);
  text-decoration: none;
  font-weight: 600;
}

.back-btn:hover {
  color: var(--accent);
}

.hero-image {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 28px;
  cursor: zoom-in;
  object-fit: cover;
  max-height: 520px;
  border: 1px solid var(--border);
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 12px 0 22px;
}

.article-date {
  color: var(--accent);
}

.article-content {
  font-size: 1.08rem;
  color: var(--muted-strong);
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.article-content>* {
  max-width: 100%;
}

.article-content pre {
  max-width: 100%;
  margin: 20px 0;
  padding: 16px;
  overflow-x: auto;
  background: #0a0f16;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted-strong);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.article-content code {
  max-width: 100%;
  padding: 0.08em 0.32em;
  background: rgba(10, 15, 22, 0.72);
  border: 1px solid rgba(43, 53, 67, 0.72);
  border-radius: 6px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.article-content pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  white-space: inherit;
}

.article-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

.article-content h2,
.article-content h3 {
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--text);
  scroll-margin-top: 28px;
}

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

.article-content ul {
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-content img {
  margin: 30px 0;
  border-radius: 18px;
  cursor: zoom-in;
  border: 1px solid var(--border);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(7, 10, 15, 0.96);
  padding: 20px;
}

.modal-image {
  width: auto;
  max-width: 95%;
  max-height: 90vh;
  margin: auto;
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 1000;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #0a0e14;
}

.footer-inner {
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 56px 16px 42px;
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(420px, 1.4fr);
  gap: 48px;
}

.footer-brand h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 420px;
  margin-bottom: 24px;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--accent);
  border-radius: 8px;
  color: #071019;
  text-decoration: none;
  font-weight: 800;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 28px;
}

.footer-links div {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h3 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a,
.footer-bottom {
  color: var(--muted-strong);
}

.footer-links a {
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 18px 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

@media (max-width: 768px) {

  .hero {
    padding: 50px 18px 34px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.7rem);
    line-height: 1.5;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .feed {
    display: block;
    padding: 22px 14px 100px;
    /* Extra bottom padding for floating button */
  }

  .posts-scroll-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .trending-card-container {
    display: none;
    /* Hide in normal flow */
  }

  /* Floating trending button for mobile */
  .mobile-trending-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 50%;
    box-shadow:
      0 4px 20px rgba(255, 107, 53, 0.4),
      0 2px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: trendingPulse 2s infinite ease-in-out;
    border: 2px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-trending-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow:
      0 8px 30px rgba(255, 107, 53, 0.6),
      0 4px 16px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation-play-state: paused;
  }

  .mobile-trending-btn:active {
    transform: scale(0.95) translateY(0);
    transition: all 0.1s ease;
  }

  .mobile-trending-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
  }

  .mobile-trending-btn:hover svg {
    transform: rotate(10deg) scale(1.1);
  }

  @keyframes trendingPulse {

    0%,
    100% {
      transform: scale(1);
      box-shadow:
        0 4px 20px rgba(255, 107, 53, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
      transform: scale(1.05);
      box-shadow:
        0 6px 25px rgba(255, 107, 53, 0.5),
        0 3px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
  }

  .ad-section {
    min-height: 96px;
    border-radius: 14px;
    margin: 18px 0;
    padding: 14px;
    width: 100%;
  }

  .ad-section-feed {
    min-height: 180px;
    margin: 0;
  }

  .ad-section-wide {
    min-height: 86px;
    margin-bottom: 2px;
  }

  .post-card {
    border-radius: 18px;
    box-shadow: 0 12px 26px var(--shadow);
  }

  .card-image img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .card-body {
    padding: 17px;
  }

  .card-body h2 {
    font-size: 1.22rem;
    line-height: 1.25;
    margin: 8px 0 10px;
  }

  .card-body p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .post-layout {
    display: block;
    padding: 66px 16px 70px;
  }

  .section-drawer-trigger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: rgba(240, 244, 248, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .section-drawer-trigger span {
    width: 22px;
    height: 2px;
    display: block;
    grid-area: 1 / 1;
    background: var(--text);
    border-radius: 999px;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .section-drawer-trigger span:nth-child(1) {
    transform: translateY(-7px);
  }

  .section-drawer-trigger span:nth-child(3) {
    transform: translateY(7px);
  }

  body.section-drawer-open .section-drawer-trigger span:nth-child(1) {
    transform: rotate(45deg);
  }

  body.section-drawer-open .section-drawer-trigger span:nth-child(2) {
    opacity: 0;
  }

  body.section-drawer-open .section-drawer-trigger span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .section-nav-toggle {
    display: none;
  }

  .section-nav-icon {
    display: none;
  }

  .section-nav-backdrop {
    position: fixed;
    inset: 52px 0 0;
    z-index: 1000;
    display: block;
    background: rgba(5, 9, 14, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, background 0.28s ease;
  }

  body.section-drawer-open .section-nav-backdrop {
    background: rgba(5, 9, 14, 0.58);
    opacity: 1;
    pointer-events: auto;
  }

  .section-nav {
    position: fixed;
    inset: 52px auto 0 0;
    z-index: 1002;
    width: min(86vw, 330px);
    height: calc(100dvh - 52px);
    max-height: none;
    margin: 0;
    padding: 12px 18px 18px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(21, 27, 35, 0.94), rgba(28, 36, 48, 0.88));
    border: 1px solid rgba(240, 244, 248, 0.12);
    border-top: 0;
    border-left: 0;
    border-radius: 0 0 22px 0;
    box-shadow: 28px 0 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px) saturate(130%);
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .section-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%);
  }

  .section-nav.is-open {
    transform: translateX(0);
  }

  .section-nav nav {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    padding: 0 8px 12px 0;
    scrollbar-width: thin;
  }

  .section-nav a,
  .section-nav a.section-nav-sub {
    display: block;
    width: 100%;
    min-height: auto;
    height: auto;
    max-width: none;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(28, 36, 48, 0.72);
    color: var(--muted-strong);
    font-size: 0.94rem;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }

  .section-nav a:hover,
  .section-nav a.active,
  .section-nav a.section-nav-sub:hover,
  .section-nav a.section-nav-sub.active {
    padding-left: 12px;
    border-color: rgba(125, 211, 252, 0.5);
    background: rgba(23, 34, 46, 0.95);
  }

  .article-page {
    padding: 0;
    border-left: 0;
    border-right: 0;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content pre {
    padding: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .article-content pre code {
    white-space: inherit;
    overflow-wrap: inherit;
    word-break: inherit;
  }

  .hero-image {
    border-radius: 18px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 16px 30px;
  }

  .footer-brand h2 {
    font-size: 2rem;
  }

  .footer-brand p {
    font-size: 0.96rem;
    margin-bottom: 18px;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .footer-links h3 {
    font-size: 0.72rem;
  }

  .footer-links a {
    font-size: 0.88rem;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 22px;
    font-size: 0.84rem;
  }
}

@media (max-width: 480px) {

  .hero {
    padding: 42px 16px 30px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 6vw, 3rem);
    line-height: 1.5;
  }

  .feed {
    padding-left: 12px;
    padding-right: 12px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-cta {
    width: 100%;
    justify-content: center;
  }
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.share-modal.active {
  display: flex;
}

.share-modal-content {
  width: min(92%, 420px);
  background: #151b23;
  border: 1px solid #2b3543;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.share-modal-header h3 {
  color: #f0f4f8;
  font-size: 1.2rem;
}

.share-close-btn {
  background: transparent;
  border: none;
  color: #a8b3c2;
  font-size: 2rem;
  cursor: pointer;
}

.share-links {
  display: grid;
  gap: 14px;
}

.share-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  color: white;
}

.share-item:hover {
  transform: translateY(-2px);
}

.twitter {
  background: #111827;
}

.linkedin {
  background: #0a66c2;
}

.facebook {
  background: #1877f2;
}

.whatsapp {
  background: #25d366;
}

.copy-link-btn {
  background: #374151;
}

.ad-fallback {
  text-align: center;
}

.ad-fallback-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-fallback p {
  margin-bottom: 10px;
  color: var(--muted);
}

.ad-fallback a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.ad-fallback a:hover {
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg,
      rgba(125, 211, 252, 0.95),
      rgba(59, 130, 246, 0.95));
  color: #071019;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 28px rgba(59, 130, 246, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 1200;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease,
    box-shadow 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 14px 34px rgba(59, 130, 246, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
  transform: scale(0.96);
}

.back-to-top svg {
  transition: transform 0.25s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    width: 54px;
    height: 54px;
    right: 18px;
    bottom: 18px;
  }
}

@media (max-width: 768px) {

  body {
    background: var(--surface);
  }

  .post-layout {
    background: var(--surface);
    min-height: 100vh;
  }

  .article-page {
    background: var(--surface);
    min-height: 100vh;
  }

}




/* Compact Glass Popup */

.ad-popup-overlay {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 1rem;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);

  z-index: 999999;
}

.ad-popup-box {
  width: 100%;
  max-width: 420px;

  border-radius: 24px;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(20px);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  position: relative;

  animation: popupIn 0.25s ease;
}

.ad-popup-content {
  padding: 1.6rem;
}

.popup-badge {
  display: inline-block;

  padding: 0.35rem 0.8rem;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);

  font-size: 0.72rem;
  letter-spacing: 0.08em;

  margin-bottom: 1rem;

  color: rgba(255, 255, 255, 0.75);
}

.ad-popup-content h2 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.ad-popup-content p {
  font-size: 0.95rem;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.82);

  margin-bottom: 1.2rem;
}

.ad-popup-btn {
  width: 100%;

  border: none;

  padding: 0.9rem;

  border-radius: 14px;

  font-size: 0.95rem;
  font-weight: 600;

  cursor: pointer;

  background: rgba(255, 255, 255, 0.12);
  color: white;

  transition: 0.2s ease;
}

.ad-popup-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ad-popup-close {
  position: absolute;

  top: 12px;
  right: 12px;

  width: 34px;
  height: 34px;

  border: none;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  color: white;

  cursor: pointer;

  font-size: 0.9rem;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 480px) {

  .ad-popup-content {
    padding: 1.3rem;
  }

  .ad-popup-content h2 {
    font-size: 1.2rem;
  }

  .ad-popup-content p {
    font-size: 0.9rem;
  }

}



.support-popup-overlay {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 1rem;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);

  z-index: 999999;
}

.support-popup-box {
  width: 100%;
  max-width: 360px;

  border-radius: 24px;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(18px);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.support-popup-content {
  padding: 1.5rem;
}

.popup-badge {
  display: inline-block;

  padding: 0.35rem 0.8rem;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);

  font-size: 0.72rem;

  margin-bottom: 1rem;
}

.support-popup-content h2 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

.support-popup-content p {
  line-height: 1.7;
  font-size: 0.95rem;

  color: rgba(255, 255, 255, 0.82);

  margin-bottom: 1rem;
}

.support-popup-btn {
  width: 100%;

  border: none;

  padding: 0.9rem;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.12);

  color: white;

  font-weight: 600;

  cursor: pointer;
}