/* Breadcrumb (scoped to page-hero to avoid conflicts) */
.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-soft);
  margin-bottom: 18px;
  list-style: none;
  padding: 0;
}
.page-hero .breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.page-hero .breadcrumb a:hover { color: var(--blue); }
.page-hero .breadcrumb span   { color: var(--border-mid); }
.page-hero .breadcrumb .breadcrumb-current { color: var(--text-mid); }

/* Hero badge (category pill in page hero) */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--blue-pale);
  border: 1px solid var(--border-mid);
  color: var(--blue);
  margin-bottom: 18px;
}

/* Detail meta bar (author / date / read-time / views) */
.detail-meta-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.3px;
}
.detail-meta-item i {
  color: var(--blue);
  font-size: 11px;
  flex-shrink: 0;
}

/* Two-column detail layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}
.detail-main  { min-width: 0; }
.detail-sidebar { min-width: 0; }

/* Hero image / thumbnail */
.detail-hero-img {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 36px;
  background: var(--bg-alt2);
}
.detail-hero-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.detail-hero-img:hover img { transform: scale(1.02); }

.blog-card.has-thumb {
  padding: 0;
}
.blog-card.has-thumb .blog-card-body {
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-alt2);
  flex-shrink: 0;
  position: relative;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.blog-card:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt2) 0%, var(--blue-pale) 100%);
  font-size: 2.5rem;
  color: var(--border-mid);
}

/* Footer inside card — works for both thumb and no-thumb */
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.blog-card-author {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cta-terminal {
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.cta-terminal-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.5;
}
.cta-terminal-line:first-child {
  padding: 14px 22px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.cta-terminal-line:last-child {
  border-bottom: none;
  padding-bottom: 16px;
}
.cta-terminal-line .prompt { color: var(--blue-light); flex-shrink: 0; }
.cta-terminal-line .cmd    { color: rgba(255,255,255,0.65); }
.cta-terminal-line .out {
  color: rgba(255,255,255,0.5);
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* blinking cursor — .cta-cursor is defined in style.css; this overrides if needed */
.cta-cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--blue-light);
  vertical-align: middle;
  border-radius: 1px;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* Pull-quote excerpt */
.bd-excerpt {
  font-size: 1.08rem;
  line-height: 1.82;
  color: var(--text-mid);
  border-left: 3px solid var(--blue);
  padding: 18px 22px;
  margin: 0 0 36px;
  font-style: italic;
  background: var(--blue-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Article body */
.bd-body {
  font-size: 1rem;
  line-height: 1.92;
  color: var(--text-mid);
}
.bd-body p  { margin-bottom: 22px; }
.bd-body h2 { color: var(--text); font-size: 1.55rem; margin: 40px 0 16px; line-height: 1.2; }
.bd-body h3 { color: var(--text); font-size: 1.2rem;  margin: 32px 0 12px; line-height: 1.3; }
.bd-body ul, .bd-body ol { padding-left: 26px; margin-bottom: 22px; }
.bd-body li { margin-bottom: 10px; }
.bd-body strong { color: var(--text); font-weight: 600; }
.bd-body a  { color: var(--blue); text-decoration: underline; transition: color 0.2s; }
.bd-body a:hover { color: var(--navy); }

/* Tags */
.bd-tags-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.bd-tags-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  display: block;
  margin-bottom: 12px;
}
.bd-tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-tag {
  display: inline-flex;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--blue);
  background: var(--blue-pale);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bd-tag:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

/* Share bar */
.bd-share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt2);
}
.bd-share-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  flex-shrink: 0;
}
.bd-share-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.bd-share-link:hover { background: var(--blue-pale); color: var(--navy); }
.bd-share-all {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.bd-share-all:hover { color: var(--navy); }

/* Related articles */
.bd-related { margin-top: 52px; }
.bd-related > h3 {
  margin-bottom: 24px;
  font-size: 1.4rem;
  color: var(--text);
}
.bd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.bd-related-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt2);
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.bd-related-card:hover {
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.bd-related-card .blog-tag { margin-bottom: 10px; font-size: 9px; }
.bd-related-card h4 {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 8px;
}
.bd-related-author {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-soft);
}

/* Blog Sidebar */

/* Author card — dark gradient background, ALL text must be light */
.bd-author-card {
  background: linear-gradient(145deg, var(--navy) 0%, var(--blue-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 20px;
  border: 1px solid rgba(90,158,245,0.25);
  box-shadow: 0 8px 32px rgba(18,48,110,0.25);
}
.bd-author-card h4 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.bd-author-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.bd-author-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bd-author-avatar i { color: rgba(255,255,255,0.75); font-size: 1.1rem; }
.bd-author-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  display: block;
}
.bd-author-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  display: block;
  margin-top: 3px;
}
.bd-author-bio {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 0;
}

/* Recent articles card */
.bd-recent-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 8px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.bd-recent-card > h4 {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.bd-recent-item {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.bd-recent-item:last-child { border-bottom: none; }
.bd-recent-title {
  font-size: 0.86rem;
  color: var(--text);
  display: block;
  line-height: 1.45;
  transition: color 0.2s;
}
.bd-recent-item:hover .bd-recent-title { color: var(--blue); }
.bd-recent-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-soft);
  letter-spacing: 1px;
  margin-top: 5px;
  display: block;
}

/* Sidebar CTA */
.bd-sidebar-cta {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(90,158,245,0.2);
  box-shadow: 0 8px 32px rgba(18,48,110,0.3);
}
.bd-sidebar-cta h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 10px;
}
.bd-sidebar-cta p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.65;
  margin-bottom: 20px;
}
.bd-sidebar-cta .btn {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

/* Icon placeholder when no thumbnail */
.pd-icon-placeholder {
  height: 220px;
  background: linear-gradient(135deg, var(--bg-alt2) 0%, var(--blue-pale) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.pd-icon-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(27,74,160,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.pd-icon-placeholder i {
  font-size: 5rem;
  color: var(--blue-mid);
  opacity: 0.28;
  position: relative;
  z-index: 1;
}

/* Overview icon */
.pd-overview-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--white);
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(18,48,110,0.3);
}
.pd-project-title {
  color: var(--text);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 16px;
  line-height: 1.2;
}
.pd-project-desc {
  font-size: 1rem;
  line-height: 1.92;
  color: var(--text-mid);
  margin-bottom: 0;
}

/* Challenge / Solution blocks */
.pd-block {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border-left: 3px solid transparent;
}
.pd-block-inner { padding: 22px 26px; }
.pd-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pd-block-head h3 { font-size: 1.1rem; color: var(--text); margin: 0; }
.pd-block-head i  { font-size: 1rem; flex-shrink: 0; }
.pd-block-body    { font-size: 0.95rem; line-height: 1.88; color: var(--text-mid); margin: 0; }

.pd-block-challenge {
  border-left-color: #e74c3c;
}
.pd-block-challenge .pd-block-inner {
  background: #fff8f8;
  border: 1px solid rgba(231,76,60,0.12);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pd-block-challenge .pd-block-head i { color: #e74c3c; }

.pd-block-solution {
  border-left-color: var(--blue);
}
.pd-block-solution .pd-block-inner {
  background: var(--bg-alt2);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pd-block-solution .pd-block-head i { color: var(--blue); }

/* Results */
.pd-results { margin-top: 36px; }
.pd-results-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.pd-results-head h3 { font-size: 1.1rem; color: var(--text); margin: 0; }
.pd-results-head i  { color: #27ae60; font-size: 1rem; }

.pd-result-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}
.pd-result-item i {
  color: #27ae60;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Tech stack */
.pd-tech-section { margin-top: 36px; }
.pd-tech-section > h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 14px;
}
.pd-tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--bg-alt2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pd-tech-pill:hover {
  background: var(--blue-pale);
  border-color: var(--blue-mid);
  color: var(--blue);
}

/* Related projects */
.pd-related {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.pd-related > h3 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 22px;
}
.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.pd-related-card {
  display: block;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt2);
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.pd-related-card:hover {
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.pd-related-icon {
  font-size: 1.8rem;
  color: var(--navy);
  opacity: 0.35;
  margin-bottom: 12px;
}
.pd-related-card .portfolio-cat { font-size: 9px; margin-bottom: 8px; }
.pd-related-card h4 {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

/* Portfolio Sidebar */

/* Project details card — dark gradient, text must be light */
.pd-details-card {
  background: linear-gradient(145deg, var(--navy) 0%, var(--blue-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 20px;
  border: 1px solid rgba(90,158,245,0.25);
  box-shadow: 0 8px 32px rgba(18,48,110,0.25);
}
.pd-details-card > h4 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pd-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pd-detail-row:last-of-type { border-bottom: none; }
.pd-detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}
.pd-detail-value {
  font-size: 0.875rem;
  color: var(--white);
  font-weight: 500;
  text-align: right;
  max-width: 160px;
  line-height: 1.4;
}
.pd-details-card-cta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.pd-details-card-cta .btn {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

/* Tech stack sidebar card */
.pd-stack-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.pd-stack-card > h4 {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.pd-stack-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pd-stack-pill {
  display: inline-flex;
  padding: 5px 12px;
  background: var(--bg-alt2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}
.pd-stack-cta {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pd-stack-cta .btn { width: 100%; justify-content: center; cursor: pointer; }

/* Portfolio sidebar CTA */
.pd-sidebar-cta {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(90,158,245,0.2);
  box-shadow: 0 8px 32px rgba(18,48,110,0.3);
}
.pd-sidebar-cta > h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 10px;
}
.pd-sidebar-cta > p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.65;
  margin-bottom: 20px;
}
.pd-sidebar-cta .btn { width: 100%; justify-content: center; cursor: pointer; }

@media (max-width: 1100px) {
  .detail-layout { grid-template-columns: 1fr 300px; gap: 48px; }
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; gap: 44px; }
  .detail-hero-img img { height: 300px; }
  .bd-related-grid { grid-template-columns: 1fr 1fr; }
  .pd-related-grid { grid-template-columns: 1fr 1fr; }

  /* CTA terminal stacks under the text */
  .cta-layout { grid-template-columns: 1fr; }
  .cta-terminal { max-width: 100%; }
}

@media (max-width: 640px) {
  .detail-hero-img img { height: 240px; }
  .bd-related-grid { grid-template-columns: 1fr; }
  .pd-related-grid { grid-template-columns: 1fr; }
  .detail-meta-bar { gap: 14px; }
  .detail-meta-item { font-size: 11px; }
  .blog-card-img { height: 180px; }
  .bd-share-bar { gap: 10px; }
  .bd-share-all { margin-left: 0; width: 100%; }
  .sd-benefit-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
}

@media (max-width: 480px) {
  .bd-author-card,
  .bd-recent-card,
  .bd-sidebar-cta,
  .pd-details-card,
  .pd-stack-card,
  .pd-sidebar-cta { padding: 20px 16px; }
  .detail-hero-img img { height: 200px; }
  .pd-icon-placeholder { height: 160px; }
  .pd-icon-placeholder i { font-size: 3.5rem; }
  .cta-terminal-line { padding: 10px 16px; font-size: 11px; }
  .cta-terminal-line:first-child { padding: 12px 16px; }
  .pd-block-inner { padding: 18px 18px; }
  .hero-badge { font-size: 9px; padding: 4px 12px; }
}
