/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/
/* ==========================================================================
   VisualCode – Single Post v2  (Astra)
   Dark, modern reading experience with a sticky "Trending" rail on the LEFT.
   Same palette + fonts as the Career section.

   SETUP
   1. Appearance > Customize > Global > Container > Sidebar
      -> Single Post: "Left Sidebar"
   2. Appearance > Widgets > Sidebar: add "Popular Posts", "Recent Posts"
      or the "Latest Posts" block. Title it "Trending now".
   3. Paste this file in Appearance > Customize > Additional CSS
      (replace the old single-post CSS completely), then clear cache.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Trispace:wght@300;400;500;600;700;800&family=Syne:wght@600;700&family=Inria+Serif:ital,wght@0,300;0,400;0,700;1,400&display=swap');

:root{
  /* ── EDIT COLORS HERE ── */
  --vc-bg:#0a0a0f;
  --vc-ink:#f5f5f5;            /* headings */
  --vc-text:#b9b9c4;           /* article body */
  --vc-muted:#8a8a99;          /* meta, captions */
  --vc-blue:#3a5fd9;
  --vc-blue-l:#6f93ff;         /* links, accents */
  --vc-green:#10d98e;          /* highlights, rank numerals */
  --vc-violet:#a78bfa;
  --vc-card-1:#10121f;
  --vc-card-2:#0b0d16;
  --vc-line:rgba(90,120,230,.28);
  --vc-chip:rgba(58,95,217,.16);

  --vc-head:'Trispace',monospace;
  --vc-label:'Syne',sans-serif;
  --vc-serif:'Inria Serif',Georgia,serif;
  color-scheme:dark;
}

html{ scroll-behavior:smooth; background:var(--vc-bg); }
body.single-post ::selection{ background:var(--vc-green); color:#06100c; }

/* ---------- Page canvas: dark + soft colour glows ---------- */
body.single-post{
  color:var(--vc-text);
  background:
    radial-gradient(700px circle at 95% 0%,rgba(58,95,217,.22),transparent 70%),
    radial-gradient(520px circle at 0% 55%,rgba(167,139,250,.10),transparent 70%),
    radial-gradient(520px circle at 95% 100%,rgba(16,217,142,.08),transparent 70%),
    var(--vc-bg);
  background-attachment:fixed;
}
/* Astra's white wrappers -> transparent so the dark canvas shows through */
body.single-post #page,
body.single-post .site-content,
body.single-post #content,
body.single-post .ast-container,
body.single-post .ast-separate-container,
body.single-post .ast-separate-container .site-main{ background:transparent !important; }

body.single-post .site-content > .ast-container{
  max-width:1280px;
  padding:48px 24px 90px;
  align-items:flex-start;
  gap:40px;
}

/* ---------- Reading progress bar ---------- */
@supports (animation-timeline:scroll()){
  body.single-post::before{
    content:""; position:fixed; top:0; left:0;
    height:4px; width:100%;
    background:linear-gradient(90deg,var(--vc-blue-l),var(--vc-green));
    transform-origin:0 50%; transform:scaleX(0);
    z-index:9999;
    animation:vc-progress linear both;
    animation-timeline:scroll(root);
  }
  @keyframes vc-progress{ to{ transform:scaleX(1); } }
}

/* ==========================================================================
   LEFT RAIL – Trending
   ========================================================================== */
body.single-post #secondary{
  order:-1; width:300px; flex:0 0 300px;
  margin:0; padding:0;
  align-self:flex-start;
  position:sticky; top:32px;
}
body.single-post #secondary .sidebar-main{
  background:linear-gradient(180deg,var(--vc-card-1),var(--vc-card-2));
  border:1px solid var(--vc-line);
  border-radius:22px;
  padding:28px 24px 10px;
  color:#fff;
  box-shadow:0 40px 80px -50px rgba(58,95,217,.6);
}
body.single-post #secondary .widget{ background:transparent; border:0; padding:0; margin:0 0 20px; }
body.single-post #secondary .widget-title{
  display:inline-block;
  margin:0 0 6px; padding:0 0 14px;
  border:0; border-bottom:3px solid var(--vc-green);
  font-family:var(--vc-head); font-weight:600; font-size:20px; letter-spacing:-.02em;
  color:#fff;
}

body.single-post #secondary .widget_recent_entries ul,
body.single-post #secondary .wp-block-latest-posts,
body.single-post #secondary .wpp-list,
body.single-post #secondary .widget_popular_posts ul,
body.single-post #secondary .trending-list{
  list-style:none; margin:8px 0 0; padding:0; counter-reset:vc-rank;
}
body.single-post #secondary .widget_recent_entries li,
body.single-post #secondary .wp-block-latest-posts li,
body.single-post #secondary .wpp-list li,
body.single-post #secondary .widget_popular_posts li,
body.single-post #secondary .trending-list li{
  counter-increment:vc-rank;
  position:relative; display:block;
  margin:0; padding:18px 0 18px 54px; min-height:56px;
  border-bottom:1px solid rgba(255,255,255,.10);
  transition:padding-left .25s ease;
}
body.single-post #secondary .widget_recent_entries li:last-child,
body.single-post #secondary .wp-block-latest-posts li:last-child,
body.single-post #secondary .wpp-list li:last-child,
body.single-post #secondary .widget_popular_posts li:last-child,
body.single-post #secondary .trending-list li:last-child{ border-bottom:0; }

@media(hover:hover){
  body.single-post #secondary .widget_recent_entries li:hover,
  body.single-post #secondary .wp-block-latest-posts li:hover,
  body.single-post #secondary .wpp-list li:hover,
  body.single-post #secondary .widget_popular_posts li:hover,
  body.single-post #secondary .trending-list li:hover{ padding-left:60px; }
}

body.single-post #secondary .widget_recent_entries li::before,
body.single-post #secondary .wp-block-latest-posts li::before,
body.single-post #secondary .wpp-list li::before,
body.single-post #secondary .widget_popular_posts li::before,
body.single-post #secondary .trending-list li::before{
  content:counter(vc-rank);
  position:absolute; left:0; top:14px;
  font-family:var(--vc-head); font-weight:700; font-size:34px; line-height:1;
  font-variant-numeric:tabular-nums;
  color:transparent; -webkit-text-stroke:1.5px var(--vc-green);
}
body.single-post #secondary .widget_recent_entries li:first-child::before,
body.single-post #secondary .wp-block-latest-posts li:first-child::before,
body.single-post #secondary .wpp-list li:first-child::before,
body.single-post #secondary .widget_popular_posts li:first-child::before,
body.single-post #secondary .trending-list li:first-child::before{ color:var(--vc-green); }

body.single-post #secondary .widget a,
body.single-post #secondary .wpp-post-title{
  font-family:var(--vc-head); font-weight:500; font-size:14.5px; line-height:1.45; letter-spacing:-.01em;
  color:#fff; text-decoration:none;
  transition:color .2s ease;
}
body.single-post #secondary .widget a:hover,
body.single-post #secondary .widget a:focus-visible{ color:var(--vc-green); }

body.single-post #secondary .post-date,
body.single-post #secondary .wpp-meta,
body.single-post #secondary .wpp-date,
body.single-post #secondary .wp-block-latest-posts__post-date{
  display:block; margin-top:5px;
  font-family:var(--vc-serif); font-size:13px; color:rgba(255,255,255,.55);
}
body.single-post #secondary .wpp-thumbnail{
  display:block; width:100%; height:120px; object-fit:cover;
  border-radius:12px; margin:0 0 10px;
}

/* ==========================================================================
   ARTICLE CARD
   ========================================================================== */
body.single-post #primary{ flex:1 1 0; min-width:0; margin:0; padding:0; }

body.single-post .ast-article-single,
body.single-post article.post{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg,var(--vc-card-1),var(--vc-card-2));
  border:1px solid var(--vc-line);
  border-radius:28px;
  padding:60px 64px 64px;
  margin:0;
  box-shadow:0 60px 120px -70px rgba(58,95,217,.6);
}
/* gradient accent line on top of the card */
body.single-post .ast-article-single::before{
  content:""; position:absolute; left:0; right:0; top:0; height:3px;
  background:linear-gradient(90deg,var(--vc-blue-l),var(--vc-violet),var(--vc-green));
}

/* Category pill */
body.single-post .ast-article-single .cat-links{ display:block; margin:0 0 20px; }
body.single-post .ast-article-single .cat-links a{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 15px;
  font-family:var(--vc-label); font-weight:700; font-size:11px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--vc-blue-l);
  background:var(--vc-chip);
  border:1px solid var(--vc-line);
  border-radius:999px;
  text-decoration:none;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
body.single-post .ast-article-single .cat-links a::before{
  content:""; width:6px; height:6px; border-radius:50%; background:var(--vc-green);
}
body.single-post .ast-article-single .cat-links a:hover{
  background:var(--vc-blue-l); color:#06100c; border-color:transparent;
}

/* Headline */
body.single-post .entry-title,
body.single-post .entry-title a{
  font-family:var(--vc-head);
  font-weight:500;
  color:var(--vc-ink);
  text-decoration:none;
}
body.single-post .entry-title{
  font-size:clamp(30px,4.2vw,54px);
  line-height:1.1; letter-spacing:-.035em;
  max-width:20em; margin:0 0 24px;
  text-wrap:balance;
  background:none; -webkit-text-fill-color:initial;
}

/* Meta row */
body.single-post .entry-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px 20px;
  margin:0 0 34px; padding:18px 0;
  font-family:var(--vc-serif); font-size:16px; color:var(--vc-muted);
  border-top:1px solid var(--vc-line); border-bottom:1px solid var(--vc-line);
}
body.single-post .entry-meta a{ color:var(--vc-ink); font-weight:700; text-decoration:none; }
body.single-post .entry-meta a:hover{ color:var(--vc-green); }
body.single-post .entry-meta .updated:not(.published){ color:var(--vc-green); font-weight:700; }
body.single-post .entry-meta .avatar,
body.single-post .ast-author-info img{ width:44px; height:44px; border-radius:50%; object-fit:cover; }

/* Featured image bleeds to the card edges */
body.single-post .ast-single-post-featured-section,
body.single-post .post-thumb{ margin:0 -64px 44px; }
body.single-post .post-thumb img,
body.single-post .ast-single-post-featured-section img{
  display:block; width:100%; height:auto; border-radius:0;
}

/* ---------- BODY COPY ---------- */
body.single-post .entry-content{
  max-width:68ch;
  font-family:var(--vc-serif); font-size:20px; line-height:1.8; font-weight:400;
  color:var(--vc-text);
}
body.single-post .entry-content p{ margin:0 0 1.45em; text-wrap:pretty; }
body.single-post .entry-content > p:first-of-type{
  font-size:23px; line-height:1.6; font-weight:400; color:var(--vc-ink);
}

body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4{
  font-family:var(--vc-head); font-weight:500; color:var(--vc-ink);
  letter-spacing:-.03em; line-height:1.18;
  margin:2.3em 0 .7em; padding:0;
  scroll-margin-top:24px;
}
body.single-post .entry-content h2{ font-size:clamp(26px,2.6vw,34px); }
body.single-post .entry-content h3{ font-size:clamp(21px,2vw,26px); }
body.single-post .entry-content h4{ font-size:19px; }
body.single-post .entry-content h2::before,
body.single-post .entry-content h3::before{ content:none; }
body.single-post .entry-content h2::after{
  content:""; display:block; width:56px; height:3px; margin-top:16px; border-radius:3px;
  background:linear-gradient(90deg,var(--vc-blue-l),var(--vc-green));
}

body.single-post .entry-content strong,
body.single-post .entry-content b{ color:var(--vc-ink); font-weight:700; }

body.single-post .entry-content a{
  color:var(--vc-blue-l);
  text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:4px;
  text-decoration-color:rgba(111,147,255,.35);
  transition:color .2s ease,text-decoration-color .2s ease;
}
body.single-post .entry-content a:hover{ color:var(--vc-green); text-decoration-color:var(--vc-green); }

body.single-post .entry-content ul,
body.single-post .entry-content ol{ margin:0 0 1.5em 1.3em; }
body.single-post .entry-content li{ margin-bottom:.55em; padding-left:.2em; }
body.single-post .entry-content li::marker{ color:var(--vc-green); font-weight:700; }

/* Pull quote */
body.single-post .entry-content blockquote{
  position:relative;
  margin:2.4em 0; padding:30px 32px 30px 44px;
  background:linear-gradient(135deg,rgba(58,95,217,.14),rgba(16,217,142,.05));
  border:1px solid var(--vc-line); border-left:4px solid var(--vc-green);
  border-radius:0 18px 18px 0;
  font-family:var(--vc-head); font-weight:500; font-style:normal;
  font-size:clamp(20px,2.2vw,26px); line-height:1.4; letter-spacing:-.02em;
  color:var(--vc-ink);
}
body.single-post .entry-content blockquote::before{
  content:"\201C";
  position:absolute; left:12px; top:6px;
  font-family:var(--vc-head); font-size:64px; line-height:1; color:var(--vc-green); opacity:.55;
}
body.single-post .entry-content blockquote p{ margin:0; color:inherit; }
body.single-post .entry-content blockquote cite{
  display:block; margin-top:14px;
  font-family:var(--vc-serif); font-size:16px; font-style:normal; font-weight:400; letter-spacing:0;
  color:var(--vc-muted);
}

body.single-post .entry-content img,
body.single-post .entry-content figure img{ height:auto; border-radius:16px; }
body.single-post .entry-content figcaption{
  margin-top:10px; font-family:var(--vc-serif); font-size:15px; text-align:center; color:var(--vc-muted);
}
body.single-post .entry-content hr{
  height:1px; border:0; margin:2.6em 0;
  background:linear-gradient(90deg,transparent,var(--vc-line),transparent);
}

/* Inline code + code blocks */
body.single-post .entry-content code{
  padding:2px 8px; border-radius:6px; font-size:.85em;
  color:var(--vc-green); background:rgba(16,217,142,.10);
}
body.single-post .entry-content pre{
  padding:22px 24px; border-radius:16px; overflow-x:auto;
  font-size:15px; line-height:1.65;
  color:#dfe4ff; background:#06070d; border:1px solid var(--vc-line);
}
body.single-post .entry-content pre code{ padding:0; background:none; color:inherit; }

/* Tables */
body.single-post .entry-content table{
  width:100%; border-collapse:separate; border-spacing:0; margin:0 0 1.6em;
  font-size:17px; border:1px solid var(--vc-line); border-radius:14px; overflow:hidden;
}
body.single-post .entry-content th{
  padding:14px 16px; text-align:left;
  font-family:var(--vc-label); font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--vc-blue-l); background:var(--vc-chip); border:0;
}
body.single-post .entry-content td{ padding:14px 16px; border:0; border-top:1px solid var(--vc-line); color:var(--vc-text); }
body.single-post .entry-content tbody tr:nth-child(even) td{ background:rgba(255,255,255,.02); }

/* ---------- TAGS ---------- */
body.single-post .ast-single-post .tags-links{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top:42px; padding-top:26px; border-top:1px solid var(--vc-line);
}
body.single-post .ast-single-post .tags-links a{
  padding:7px 15px; border:1px solid var(--vc-line); border-radius:999px;
  font-family:var(--vc-head); font-weight:500; font-size:13px;
  color:var(--vc-text); background:transparent; text-decoration:none;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
body.single-post .ast-single-post .tags-links a:hover{
  background:var(--vc-blue-l); color:#06100c; border-color:transparent;
}

/* ---------- AUTHOR BOX ---------- */
body.single-post .ast-author-box{
  display:flex; gap:20px; align-items:flex-start;
  margin-top:42px; padding:28px;
  border:1px solid transparent; border-radius:20px;
  background:
    linear-gradient(180deg,#131629,#0b0d16) padding-box,
    linear-gradient(135deg,rgba(111,147,255,.9),rgba(16,217,142,.5) 60%,rgba(90,120,230,.15)) border-box;
}
body.single-post .ast-author-box .ast-author-bio img,
body.single-post .ast-author-box img{ border-radius:50%; }
body.single-post .ast-author-box .ast-author-name,
body.single-post .ast-author-box .author-title{
  font-family:var(--vc-head); font-weight:600; font-size:19px; color:#fff;
}
body.single-post .ast-author-box p,
body.single-post .ast-author-box .ast-author-bio{ color:var(--vc-text); }

/* ---------- PREV / NEXT ---------- */
body.single-post .post-navigation{ margin-top:42px; }
body.single-post .post-navigation .nav-links{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
body.single-post .post-navigation .nav-previous a,
body.single-post .post-navigation .nav-next a{
  display:block; padding:22px 24px;
  border:1px solid var(--vc-line); border-radius:18px;
  background:linear-gradient(180deg,var(--vc-card-1),var(--vc-card-2));
  font-family:var(--vc-head); font-weight:500; font-size:15px; line-height:1.4;
  color:var(--vc-ink); text-decoration:none;
  transition:border-color .3s ease,transform .3s ease,box-shadow .3s ease;
}
body.single-post .post-navigation .nav-next a{ text-align:right; }
body.single-post .post-navigation a:hover{
  border-color:var(--vc-blue-l); transform:translateY(-3px);
  box-shadow:0 20px 50px -28px rgba(111,147,255,.55);
}

/* ---------- RELATED POSTS (Astra) ---------- */
body.single-post .ast-related-posts-wrapper{ margin-top:48px; }
body.single-post .ast-related-posts-title{
  font-family:var(--vc-head); font-weight:500; font-size:26px; letter-spacing:-.03em; color:var(--vc-ink);
}
body.single-post .ast-related-post{
  background:linear-gradient(180deg,var(--vc-card-1),var(--vc-card-2));
  border:1px solid var(--vc-line); border-radius:18px; overflow:hidden;
  transition:border-color .3s ease,transform .3s ease;
}
body.single-post .ast-related-post:hover{ border-color:var(--vc-blue-l); transform:translateY(-4px); }
body.single-post .ast-related-post-content{ padding:18px 20px; }
body.single-post .ast-related-post-title a{ font-family:var(--vc-head); font-weight:500; color:var(--vc-ink); text-decoration:none; }
body.single-post .ast-related-post-title a:hover{ color:var(--vc-green); }

/* ---------- COMMENTS ---------- */
body.single-post .comments-area{
  margin-top:28px; padding:42px 64px;
  background:linear-gradient(180deg,var(--vc-card-1),var(--vc-card-2));
  border:1px solid var(--vc-line); border-radius:28px;
  color:var(--vc-text);
}
body.single-post .comments-title,
body.single-post .comment-reply-title{ font-family:var(--vc-head); font-weight:500; letter-spacing:-.03em; color:var(--vc-ink); }
body.single-post .comments-area a{ color:var(--vc-blue-l); }
body.single-post .comments-area a:hover{ color:var(--vc-green); }
body.single-post .comment-form input[type="text"],
body.single-post .comment-form input[type="email"],
body.single-post .comment-form input[type="url"],
body.single-post .comment-form textarea{
  padding:14px 16px; border:1px solid var(--vc-line); border-radius:12px;
  background:#0a0b14; color:var(--vc-ink);
  font-family:var(--vc-serif); font-size:17px;
}
body.single-post .comment-form input:focus,
body.single-post .comment-form textarea:focus{
  outline:none; border-color:var(--vc-blue-l); box-shadow:0 0 0 3px rgba(111,147,255,.18);
}
body.single-post .comment-form .submit{
  padding:14px 32px; border:0; border-radius:999px; cursor:pointer;
  font-family:var(--vc-head); font-weight:700; font-size:14px;
  color:#06100c; background:linear-gradient(90deg,#6f93ff,#10d98e);
  transition:transform .3s ease,box-shadow .3s ease;
}
body.single-post .comment-form .submit:hover{ transform:translateY(-2px); box-shadow:0 18px 40px -16px rgba(16,217,142,.6); }

/* ---------- Keyboard focus ---------- */
body.single-post a:focus-visible,
body.single-post button:focus-visible{ outline:3px solid var(--vc-green); outline-offset:3px; border-radius:4px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media(max-width:1024px){
  body.single-post{ background-attachment:scroll; }
  body.single-post .site-content > .ast-container{ flex-direction:column; gap:24px; padding:24px 16px 56px; }
  body.single-post #secondary{ position:static; width:100%; flex:none; order:2; }
  body.single-post #primary{ width:100%; order:1; }
  body.single-post .ast-article-single,
  body.single-post article.post{ padding:40px 32px 46px; }
  body.single-post .ast-single-post-featured-section,
  body.single-post .post-thumb{ margin:0 -32px 32px; }
  body.single-post .comments-area{ padding:32px; }
}
@media(max-width:600px){
  body.single-post .ast-article-single,
  body.single-post article.post{ padding:30px 20px 36px; border-radius:20px; }
  body.single-post .ast-single-post-featured-section,
  body.single-post .post-thumb{ margin:0 -20px 24px; }
  body.single-post .entry-content{ font-size:18px; }
  body.single-post .entry-content > p:first-of-type{ font-size:20px; }
  body.single-post .entry-content blockquote{ padding:26px 20px 24px 34px; }
  body.single-post .entry-content table{ display:block; overflow-x:auto; }
  body.single-post .post-navigation .nav-links{ grid-template-columns:1fr; }
  body.single-post .post-navigation .nav-next a{ text-align:left; }
  body.single-post .ast-author-box{ flex-direction:column; }
  body.single-post .comments-area{ padding:26px 20px; border-radius:20px; }
}

@media(prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  body.single-post::before{ animation:none; transform:scaleX(0); }
  body.single-post *{ transition:none !important; }
}