/* =======================================================
   DESIGN TOKENS
   ======================================================= */
:root {
  --bg-dark:            #000000;
  --bg-gradient-start:  #000508;
  --bg-gradient-end:    #011e29;
  --bg-card:            #08121a;
  --accent-sage:        #b6bd97;
  --accent-glow:        rgba(182, 189, 151, 0.15);
}

/* =======================================================
   BASE
   ======================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

* {
  font-family: 'Poppins', sans-serif;
}

code, pre, code * {
  font-family: 'Fira Code', 'Courier New', monospace !important;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(
    to bottom,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-end) 100%
  );
  background-attachment: fixed;
  color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
}

.font-poppins {
  font-family: 'Poppins', sans-serif;
}

/* =======================================================
   LAYOUT HELPERS
   ======================================================= */
.grid-lines {
  background-image: linear-gradient(
    to right,
    rgba(182, 189, 151, 0.03) 1px,
    transparent 1px
  );
  background-size: 16.66% 100%;
}

/* =======================================================
   ANIMATIONS
   ======================================================= */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

.animate-on-scroll {
  animation-play-state: paused !important;
}
.animate-on-scroll.animate {
  animation-play-state: running !important;
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-on-scroll.animate {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .animate-marquee,
  .animate-shimmer-glow {
    animation: none !important;
  }
}

/* =======================================================
   SHIMMER GLOW TEXT
   ======================================================= */
.animate-shimmer-glow {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 40%,
    #b6bd97 50%,
    #ffffff 60%,
    #ffffff 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shine-glow 3.5s linear infinite;
}

@keyframes shine-glow {
  to { background-position: 200% center; }
}

/* =======================================================
   CTA BUTTON (animated gradient border)
   ======================================================= */
.cta-outline-button {
  padding: 14px 28px;
  background: linear-gradient(0deg, #000508, #08121a);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  position: relative;
  transition-duration: 0.2s;
}

.cta-outline-button::before,
.cta-outline-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  background: linear-gradient(45deg, #011e29, #b6bd97, #ffffff, #08121a, #011e29, #b6bd97, #ffffff, #08121a, #011e29);
  background-size: 400%;
  z-index: -1;
  animation: theme-steam 15s linear infinite;
  pointer-events: none;
}

.cta-outline-button::after {
  opacity: 0.6;
  filter: blur(20px);
}

@keyframes theme-steam {
  0%   { background-position: 0 0;    }
  50%  { background-position: 400% 0; }
  100% { background-position: 0 0;    }
}

/* =======================================================
   ARTICLE PROSE
   Styles Markdown-rendered body content on article pages
   ======================================================= */

.article-prose {
  color: #374151;
  font-size: 1rem;
  line-height: 1.8;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4,
.article-prose h5,
.article-prose h6 {
  color: #0f172a !important;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.article-prose h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.article-prose h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-prose p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: #374151;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-weight: 400;
}

.article-prose > p:first-of-type {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: #374151;
  line-height: 1.8;
}

.article-prose a {
  color: #023D54;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.article-prose a:hover {
  color: #b6bd97;
}

.article-prose ul,
.article-prose ol {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #374151;
  font-weight: 400;
  line-height: 1.8;
}

.article-prose ul {
  list-style-type: disc;
}

.article-prose ol {
  list-style-type: decimal;
}

.article-prose li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.article-prose li strong {
  color: #0f172a;
  font-weight: 600;
}

.article-prose blockquote {
  border-left: 4px solid #b6bd97;
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  background: rgba(182, 189, 151, 0.05);
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: #1e293b;
  font-weight: 400;
  line-height: 1.7;
}

.article-prose blockquote p {
  margin-bottom: 0;
  color: #1e293b;
  font-size: inherit;
}

.article-prose img {
  border-radius: 12px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.article-prose hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}

.article-prose strong {
  color: #0f172a;
  font-weight: 500;
}

.article-prose li strong {
  color: #0f172a;
  font-weight: 500;
}

/* =======================================================
   CODE BLOCK FILENAME HEADER
   Write `filename.js` immediately before code block
   with no blank line between them
   ======================================================= */
.article-prose p > code:only-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #08121a;
  border: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
  border-radius: 1rem 1rem 0 0;
  padding: 0.75rem 1.25rem;
  color: #94a3b8;
  font-size: 0.75rem;
  margin-bottom: 0;
  width: 100%;
  font-family: 'Fira Code', 'Courier New', monospace;
  line-height: 1;
}

.article-prose p > code:only-child::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 12.5 8 15l2 2.5'%3E%3C/path%3E%3Cpath d='m14 12.5 2 2.5-2 2.5'%3E%3C/path%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'%3E%3C/path%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.7;
  flex-shrink: 0;
}

.article-prose p:has(> code:only-child) {
  margin-bottom: 0;
}

.article-prose p:has(> code:only-child) + pre {
  border-top: 1px solid #1e293b;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
  padding-top: 1rem;
}

.article-prose pre {
  background: #08121a;
  border-radius: 1rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid #1e293b;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.2);
}

.article-prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #cbd5e1;
  font-family: 'Fira Code', 'Courier New', monospace;
  line-height: 1.7;
  letter-spacing: -0.01em;
}
/* =======================================================
   PAGINATION  (insights cards grid)
   ======================================================= */

/* Shared base for First / Prev / Next / Last buttons */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  color: #1e293b;
  border-radius: 0.5rem;
  text-decoration: none;
  background: none;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.pagination-btn:hover {
  color: #011E29;
  background-color: #e8edf2;
  border-color: #94a3b8;
}

/* Numbered page button */
.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #1e293b;
  border-radius: 0.5rem;
  text-decoration: none;
  background: none;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.pagination-num:hover {
  color: #011E29;
  background-color: #e8edf2;
  border-color: #94a3b8;
}

/* Active / current page */
.pagination-num--active {
  background-color: #08121A;
  color: #B6BD97;
  border: 1px solid rgba(182, 189, 151, 0.3);
  box-shadow: 0 0 10px rgba(182, 189, 151, 0.15);
  pointer-events: none;
  cursor: default;
}
