/* QuantumPhones — Blog Article Page Styling (dark theme) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --void: #0A0612;
  --void-2: #0E0818;
  --surface-1: #120A1F;
  --surface-2: #1C1230;
  --surface-3: #271943;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --line-accent: rgba(176,112,255,0.35);
  --fg-1: rgba(255,255,255,0.96);
  --fg-2: rgba(255,255,255,0.75);
  --fg-3: rgba(255,255,255,0.50);
  --fg-4: rgba(255,255,255,0.22);
  --violet-300: #B070FF;
  --violet-500: #7B3DFF;
  --violet-600: #612AD9;
  --iris: #FF5FE2;
  --link: #B070FF;
  --link-hover: #D4AFFF;
  --grad-spine: linear-gradient(135deg, #7B3DFF 0%, #B070FF 50%, #FF5FE2 100%);
  --grad-aurora: radial-gradient(120% 80% at 85% -10%, rgba(123,61,255,0.18) 0%, transparent 55%), radial-gradient(90% 70% at 10% 110%, rgba(255,95,226,0.12) 0%, transparent 55%);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {box-sizing: border-box;}
html, body {margin: 0; padding: 0;}
body {
  font-family: var(--font-sans);
  background: var(--void);
  color: var(--fg-1);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: var(--grad-aurora);
  background-attachment: fixed;
  font-size: 17px;
}

/* ====== TOP NAV ====== */
.qp-topnav {
  border-bottom: 1px solid var(--line);
  background: rgba(10,6,18,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.qp-topnav-inner {max-width: 1200px; margin: 0 auto; display: flex; gap: 1.75rem; align-items: center;}
.qp-topnav a {color: var(--fg-2); font-weight: 500; font-size: 0.92rem; text-decoration: none; transition: color 0.15s;}
.qp-topnav a:hover {color: var(--fg-1);}
.qp-lockup {display: inline-flex; align-items: center; gap: 10px; color: var(--fg-1); font-weight: 600; letter-spacing: -.01em; text-decoration: none !important;}
.qp-lockup:hover {opacity: 0.85;}
.qp-word {font-family: var(--font-mono); font-size: 15px; line-height: 1; color: var(--fg-1);}
.qp-word b {color: var(--violet-300); font-weight: 600;}
.qp-topnav .spacer {flex: 1;}
.qp-topnav a.qp-cta {
  background: var(--grad-spine);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.qp-topnav a.qp-cta:hover {transform: translateY(-1px); box-shadow: 0 8px 24px rgba(123,61,255,0.35); color: #fff !important;}
.qp-topnav a.qp-cta svg {width: 16px; height: 16px;}

/* ====== ARTICLE LAYOUT ====== */
.post {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
.post .breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.post .breadcrumb a {color: var(--fg-3); text-decoration: none;}
.post .breadcrumb a:hover {color: var(--violet-300);}
.post .breadcrumb .sep {color: var(--fg-4);}

/* H1: hero title */
.post h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--fg-1);
}

/* Meta row (the "By Filip... | Last updated... | X min read") */
.post > em:first-of-type, .post em.post-meta {
  display: block;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: normal;
  margin: 0 0 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

/* HR after meta */
.post hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

/* Headings */
.post h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 3.5rem 0 1.25rem;
  color: var(--fg-1);
  padding-bottom: 0;
  border-bottom: none;
}
.post h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--grad-spine);
  border-radius: 2px;
  vertical-align: -0.18em;
  margin-right: 0.7rem;
}
.post h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.85rem;
  color: var(--fg-1);
}
.post h4 {font-size: 1.05rem; font-weight: 600; color: var(--fg-1); margin: 2rem 0 0.65rem;}

/* Body text */
.post p {
  color: var(--fg-2);
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}
.post p strong, .post li strong {color: var(--fg-1); font-weight: 600;}

/* Lists */
.post ul, .post ol {color: var(--fg-2); padding-left: 1.5rem; margin: 0 0 1.5rem;}
.post li {margin-bottom: 0.55rem; line-height: 1.7;}
.post ul li::marker {color: var(--violet-300);}
.post ol li::marker {color: var(--violet-300); font-weight: 600;}

/* Links */
.post a {color: var(--link); text-decoration: none; border-bottom: 1px solid rgba(176,112,255,0.3); transition: all 0.15s;}
.post a:hover {color: var(--link-hover); border-bottom-color: var(--link-hover);}

/* Blockquote */
.post blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface-1);
  border-left: 3px solid var(--violet-300);
  border-radius: 0 10px 10px 0;
  color: var(--fg-1);
  font-style: italic;
}
.post blockquote p:last-child {margin-bottom: 0;}

/* Code */
.post code {
  background: var(--surface-2);
  color: var(--violet-300);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  border: 1px solid var(--line);
}
.post pre {
  background: var(--void-2);
  color: var(--fg-1);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.post pre code {background: transparent; color: inherit; padding: 0; border: none;}

/* Tables */
.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  background: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.post th, .post td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
}
.post th {
  background: var(--surface-2);
  color: var(--fg-1);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post tr:last-child td {border-bottom: none;}
.post tbody tr:hover {background: var(--surface-2);}

/* Images */
.post img {max-width: 100%; height: auto; border-radius: 10px; margin: 1.5rem 0;}

/* TL;DR / FAQ — markdown converts these to <h2>TL;DR / <p> blocks */

/* Final author bio block (the trailing em paragraph) */
.post em:last-of-type, .post p > em:only-child {
  display: block;
  padding: 1.5rem;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg-2);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.65;
  margin: 2rem 0;
}

/* ====== FOOTER ====== */
.qp-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 1.75rem;
  color: var(--fg-3);
  font-size: 0.85rem;
}
.qp-footer-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.qp-footer-nav {display: flex; gap: 2.25rem;}
.qp-footer-nav a {color: var(--fg-2); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: color 0.15s; border: none;}
.qp-footer-nav a:hover {color: var(--fg-1);}
.qp-footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--grad-spine);
  color: #fff !important;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  border: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
.qp-footer-telegram:hover {transform: translateY(-1px); box-shadow: 0 10px 28px rgba(123,61,255,0.4); color: #fff !important;}
.qp-footer-telegram svg {width: 18px; height: 18px;}
.qp-footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--fg-3);
  font-size: 0.82rem;
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {
  body {font-size: 16px;}
  .post {padding: 2rem 1.25rem 3rem;}
  .post h1 {font-size: 1.85rem;}
  .post h2 {font-size: 1.4rem;}
  .post h3 {font-size: 1.15rem;}
  .qp-topnav-inner {gap: 1rem; flex-wrap: wrap;}
  .qp-footer-main {flex-direction: column; gap: 1.5rem; text-align: center;}
  .qp-footer-nav {flex-wrap: wrap; justify-content: center; gap: 1.25rem;}
  .post table {font-size: 0.85rem; display: block; overflow-x: auto;}
}

/* ====== 2-COLUMN ARTICLE LAYOUT ====== */
.post-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  /* sidebar on left, article on right */
  gap: 3.5rem;
  align-items: start;
}
.post {
  max-width: 760px;
  width: 100%;
  margin: 0;
  padding: 0;
}
.post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.88rem;
}
.sidebar-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.1rem;
}
.sidebar-card h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin: 0 0 1rem;
  font-weight: 600;
}
.toc-list {list-style: none; padding: 0; margin: 0;}
.toc-list li {margin: 0 0 0.5rem; padding: 0;}
.toc-list a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--fg-2);
  text-decoration: none;
  border-radius: 8px;
  border-left: 2px solid transparent;
  font-size: 0.87rem;
  line-height: 1.4;
  border-bottom: none !important;
  transition: all 0.15s;
}
.toc-list a:hover {color: var(--fg-1); background: var(--surface-2);}
.toc-list a.active {color: var(--violet-300); border-left-color: var(--violet-300); background: rgba(123,61,255,0.08);}

.author-card .author-name {color: var(--fg-1); font-weight: 600; margin-bottom: 0.3rem;}
.author-card .author-role {color: var(--fg-3); font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 0.8rem;}
.author-card p {color: var(--fg-2); font-size: 0.85rem; line-height: 1.55; margin: 0 0 1rem;}

.sidebar-cta {
  background: var(--grad-spine);
  color: #fff;
  padding: 1.25rem;
  border-radius: 14px;
  text-align: center;
  text-decoration: none !important;
  border: none !important;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.sidebar-cta:hover {transform: translateY(-2px); box-shadow: 0 12px 32px rgba(123,61,255,0.4); color: #fff !important;}
.sidebar-cta strong {display: block; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem;}
.sidebar-cta span {display: block; font-size: 0.78rem; opacity: 0.9; font-family: var(--font-mono);}

/* Back-to-blog row after article */
.post-foot {
  max-width: 760px;
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-2);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all 0.15s;
}
.post-foot a:hover {color: var(--fg-1); background: var(--surface-1); border-color: var(--line-2);}

@media (max-width: 1024px) {
  .post-wrap {grid-template-columns: 1fr; gap: 2rem;}
  .post-sidebar {position: static; max-width: 760px;}
}

/* ====== VOIDMOB-STYLE HEADER ====== */
.post-pill {
  display: inline-flex;
  align-items: center;
  background: var(--grad-spine);
  color: #fff;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 1.25rem 0 1.5rem;
  box-shadow: 0 4px 16px rgba(123,61,255,0.35);
}
.post h1 {
  background: linear-gradient(135deg, #7B3DFF 0%, #B070FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
}
.post-meta-row {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-3);
}
.post-meta-item {display: inline-flex; align-items: center; gap: 0.5rem;}
.post-meta-item.accent {color: var(--violet-300);}
.post-meta-item svg {width: 16px; height: 16px; flex-shrink: 0;}

/* Override the older em meta styling so it doesn't conflict if leftover */
.post > em:first-of-type {border-bottom: none; padding-bottom: 0; margin: 0;}
.post {order: 2;}
.post-sidebar {order: 1;}

/* ====== FAQ ACCORDION ====== */
.faq-list {display: flex; flex-direction: column; gap: 0.6rem; margin: 1.5rem 0;}
.faq-item {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item:hover {border-color: var(--line-2);}
.faq-item[open] {border-color: var(--line-accent); background: var(--surface-2);}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  color: var(--fg-1);
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker {display: none;}
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--violet-300);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {content: "−";}
.faq-item .faq-answer {
  padding: 0 1.35rem 1.25rem;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.65;
}
.faq-item .faq-answer a {color: var(--link);}

/* ====== BOTTOM CTA BLOCK ====== */
.bottom-cta {
  position: relative;
  margin: 4rem 0 0;
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, #150A2A 0%, #1A0F36 100%);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
}
.bottom-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(176,112,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176,112,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}
.bottom-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(123,61,255,0.25), transparent 60%);
  pointer-events: none;
}
.bottom-cta > * {position: relative; z-index: 1;}
.bottom-cta h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  margin: 0 0 1.1rem;
  line-height: 1.2;
}
.bottom-cta p {
  color: var(--fg-2);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}
.bottom-cta a.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--grad-spine);
  color: #fff !important;
  padding: 0.95rem 1.85rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 12px 32px rgba(123,61,255,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bottom-cta a.cta-btn:hover {transform: translateY(-2px); box-shadow: 0 18px 40px rgba(123,61,255,0.55); color: #fff !important;}
.bottom-cta a.cta-btn svg {width: 16px; height: 16px;}
@media (max-width: 640px) {
  .bottom-cta {padding: 2.25rem 1.5rem; margin: 3rem 0 0;}
}


/* Reading progress bar — fixed top */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-spine);
  z-index: 200;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(176,112,255,0.6);
}
