:root {
  --bg: #0b1220;
  --bg-soft: #111a2f;
  --surface: #141f36;
  --text: #e8eefc;
  --muted: #9eabc8;
  --accent: #82bcff;
  --accent-strong: #5ba6ff;
  --border: #2a3b5d;
  --card-shadow: 0 8px 20px rgba(2, 10, 24, 0.2);
  --badge-release-bg: rgba(59, 130, 246, 0.17);
  --badge-release-border: rgba(96, 165, 250, 0.4);
  --badge-release-text: #bed9ff;
  --badge-update-bg: rgba(16, 185, 129, 0.15);
  --badge-update-border: rgba(52, 211, 153, 0.35);
  --badge-update-text: #bef7e0;
  --badge-blog-bg: rgba(148, 163, 184, 0.18);
  --badge-blog-border: rgba(148, 163, 184, 0.38);
  --badge-blog-text: #d5dfef;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.45);
}

.section-narrow {
  max-width: 760px;
}

.download-card {
  margin: 1.2rem 0 1.6rem;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.download-card:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 188, 255, 0.35);
}

/* top meta row */
.download-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

/* project type badge (uses your existing design system) */
.download-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(130, 188, 255, 0.12);
  border: 1px solid rgba(130, 188, 255, 0.25);
  color: var(--accent);
}

/* date - subtle, not a “badge look” anymore */
.download-date {
  font-size: 0.8rem;
  color: var(--muted);
}

/* main layout */
.download-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
}

/* text section */
.download-info {
  flex: 1;
  min-width: 240px;
}

.download-info h3 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.download-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* button - now visually balanced with theme */
.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.55rem 1rem;
  border-radius: 999px;

  background: var(--accent-strong);
  color: #08121f;

  font-weight: 700;
  font-size: 0.9rem;

  transition: transform 0.18s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.download-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(91, 166, 255, 0.22);
}

.support-card {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}

.support-description {
  color: var(--muted);
  line-height: 1.7;
  margin: 1rem auto 1.5rem;
  max-width: 600px;
}

.support-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  z-index: 9999;
}

.support-modal.active {
  opacity: 1;
  visibility: visible;
}

.support-modal-content {
  position: relative;
  width: 800px;
  height: 90vh;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#kofiframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.support-close {
  position: absolute;
  top: 12px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  background: rgba(0,0,0,.25);
  color: white;
  z-index: 10;
}

.support-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.kofi-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.kofi-button img {
  display: block;
  height: 56px;
  width: auto;

  transition: transform 0.2s ease;
}

.kofi-button:hover img {
  transform: translateY(-2px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(6, 10, 20, 0.86);
}

.social-links {
    display: flex;
    gap: 14px;
    margin-top: 1rem;
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links img {
    width: 28px;
    height: 28px;
    filter: brightness(0) saturate(100%) invert(72%);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.social-links a:hover img {
    filter: brightness(0) saturate(100%) invert(100%);
    transform: translateY(-2px);
}

/* Footer Styles */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 3rem;
    align-items: stretch;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h2 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
}

.footer-description {
    flex-grow: 1;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.footer-divider {
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255,255,255,0.12),
        transparent
    );
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: #7a7a7a;
    font-size: 0.9rem;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 0.7rem;
  border: 1px solid rgba(130, 188, 255, 0.3);
  background: rgba(130, 188, 255, 0.08);
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
}

.hero {
  padding: 7.25rem 0 5.3rem;
  border-bottom: 1px solid var(--border);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  max-width: 18ch;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--muted);
  margin: 1.15rem 0 0;
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.74rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--accent-strong);
  color: #051122;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 80, 148, 0.28);
  color: #04101f;
}

.button-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button-ghost:hover {
  border-color: rgba(118, 194, 255, 0.45);
  box-shadow: none;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

h3 {
  font-size: 1.23rem;
}

p {
  margin: 0 0 1rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.card-grid {
  margin-top: 1.55rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  height: 100%;
  min-height: 308px;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(20, 31, 54, 0.95);
  box-shadow: 0 3px 12px rgba(3, 10, 23, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(118, 194, 255, 0.42);
  box-shadow: var(--card-shadow);
}

.card-tag {
  margin: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.18rem 0.58rem;
  line-height: 1.5;
}

.badge--releases {
  background: var(--badge-release-bg);
  border-color: var(--badge-release-border);
  color: var(--badge-release-text);
}

.badge--updates {
  background: var(--badge-update-bg);
  border-color: var(--badge-update-border);
  color: var(--badge-update-text);
}

.badge--blogs {
  background: var(--badge-blog-bg);
  border-color: var(--badge-blog-border);
  color: var(--badge-blog-text);
}

.category-filters {
  margin-top: 1.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  border: 1px solid var(--border);
  background: rgba(17, 27, 48, 0.55);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(130, 188, 255, 0.36);
}

.filter-chip.is-active {
  color: #08162d;
  border-color: transparent;
  background: var(--accent);
}

.card h2,
.card h3 {
  margin: 0;
  line-height: 1.3;
  font-size: 1.24rem;
}

.card-description {
  margin: 0;
  color: var(--muted);
  min-height: 4.8rem;
}

.card-meta {
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(37, 55, 85, 0.75);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.card time {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-link {
  font-weight: 700;
  color: var(--accent);
}

.archive-link-wrap {
  margin: 1.6rem 0 0;
}

.archive-link {
  min-width: 182px;
}

.focus-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.focus-list li + li {
  margin-top: 0.6rem;
}

.post-wrap {
  max-width: 860px;
}

.back-link {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.post-meta {
  margin: 0;
  color: var(--muted);
}

.post-content {
  margin-top: 1.8rem;
}

.post-content > *:first-child {
  margin-top: 0;
}

.post-content > *:last-child {
  margin-bottom: 0;
}

.post-content h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.95rem, 3.8vw, 2.8rem);
}

.post-content h2 {
  margin-top: 2.35rem;
  margin-bottom: 0.8rem;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.post-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
}

.post-content p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.3rem;
  padding-left: 1.4rem;
  color: var(--muted);
}

.post-content li + li {
  margin-top: 0.45rem;
}

.post-content blockquote {
  margin: 1.45rem 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(17, 27, 48, 0.52);
  color: #d5e3ff;
  border-radius: 0.4rem;
}

.post-content a {
  color: var(--accent);
}

.post-content pre {
  margin: 1.45rem 0;
  padding: 0.9rem 1rem;
  background: #0b1322;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  overflow-x: auto;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.post-content p code,
.post-content li code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(17, 27, 48, 0.82);
  border: 1px solid rgba(37, 55, 85, 0.78);
}

.post-content img,
.post-content video,
.post-content iframe {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.7rem auto;
  border-radius: 0.8rem;
}

.post-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* ================================
   POST PAGE NEW 2-COLUMN LAYOUT
================================ */

.post-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* LEFT CONTENT */
.post-main {
  flex: 1;
  min-width: 0;
  max-width: 820px;
}

/* RIGHT SIDEBAR */
.post-sidebar {
  width: 300px;
  height: fit-content;
}

/* SIDEBAR CARDS */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--card-shadow);
}

.sidebar-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-card h3::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: rgba(255,255,255,0.06);
}

/* LATEST POSTS */
.latest-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.latest-posts li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.latest-posts li:hover {
  background: rgba(130, 188, 255, 0.06);
  border-left: 2px solid var(--accent);
  transform: translateX(3px);
}

.latest-posts a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.latest-posts a:hover {
  color: var(--accent);
}

.latest-posts span {
  font-size: 0.75rem;
  color: var(--muted);
}

.latest-post-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.latest-post-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.latest-post-title:hover {
  color: var(--accent);
}

.latest-post-date {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 2px;
}

.latest-post-bottom {
  margin-top: 0.4rem;
  display: flex;
}

.latest-post-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
}

/* SOCIAL LINKS IN SIDEBAR (override existing spacing) */
.post-sidebar .social-links {
  margin-top: 0.5rem;
}

/* =========================
   SIDEBAR ENHANCEMENTS
========================= */

/* Latest posts upgrade */
.sidebar-card--latest {
  padding-bottom: 0.8rem;
}

.sidebar-card--latest h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-card--latest h3::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: rgba(255,255,255,0.08);
}

.sidebar-view-all {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.sidebar-view-all:hover {
  text-decoration: underline;
}

/* Latest posts stronger UI */
.latest-posts li {
  transition: background 0.2s ease;
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
}

.latest-posts li:hover {
  background: rgba(130, 188, 255, 0.06);
}

/* CONNECT CARD IMPROVED */
.sidebar-card--connect {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(130, 188, 255, 0.12);
}

.sidebar-card--connect::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(130,188,255,0.10), transparent 75%);
  opacity: 0.6;
  pointer-events: none;
}

.sidebar-muted {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* SOCIAL LINKS IMPROVED */
.social-links--sidebar {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.social-links--sidebar a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s ease;
}

.social-links--sidebar a:hover {
  background: rgba(130, 188, 255, 0.08);
  border-color: rgba(130, 188, 255, 0.25);
  transform: translateX(2px);
}

.social-links--sidebar img {
  width: 20px;
  height: 20px;
}

.social-links--sidebar span {
  font-size: 0.85rem;
  color: var(--muted);
}

.social-links--sidebar a:hover span {
  color: var(--text);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .post-layout {
    flex-direction: column;
  }

  .post-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 1040px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-divider {
    display: none;
  }

  .footer-bottom {
    margin-top: 2rem;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 4rem 0;
  }

  .hero {
    padding: 5.8rem 0 4.4rem;
  }

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

  .card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }
}

#openSupportSection {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(130, 188, 255, 0.35);
  background: rgba(130, 188, 255, 0.08);
  color: var(--text);
  transition: 0.2s ease;
}

#openSupportModal:hover {
  background: rgba(130, 188, 255, 0.15);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Only center PayPal modal */
#paypalModal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* centers vertically */
}

#paypalModal.active {
  display: flex; /* flexbox centers the content */
}

#paypalModal .support-modal-content {
  padding: 30px 20px !important;
  border-radius: 8px !important;
  max-width: 500px !important;
  width: 90% !important;
  height: auto !important;   /* prevent stretching */
  transform: translateX(25px) !important;
}

#support {
  scroll-margin-top: 50px; /* adjust px to how much space you want */
}

.paypal-button {
    display: inline-flex;       /* same as Ko-fi */
    align-items: center;        /* vertically center the image */
    justify-content: center;
    padding: 0;                 /* remove default button padding */
    margin: 0;                  /* remove default margin */
    border: none;               /* remove default border */
    background: none;           /* remove default background */
    vertical-align: middle;
    cursor: pointer;
    margin-top: -45px !important;
}

.paypal-button img {
    display: block;             /* removes inline gap */
    height: 56px;               /* match Ko-fi image size */
    width: auto;
}





