/* =====================================================================
   SIMPLIFIED BLOG TYPOGRAPHY - Clean & Professional
   ===================================================================== */

/* Smooth scroll and anchor offset for TOC links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

/* Anchor offset for all targets (TOC links scroll to headings) */
.blog-single-content h1[id],
.blog-single-content h2[id],
.blog-single-content h3[id],
.blog-single-content h4[id],
.blog-single-content h5[id],
.blog-single-content h6[id] {
  scroll-margin-top: 150px !important;
}

/* Blog Single Clean Typography - base styles overridden by 3-column layout below */
.blog-single {
  padding: var(--al-space-4xl) var(--al-space-lg);
  color: var(--al-white);
}

/* Blog Header - base styles overridden by 3-column layout below */
.blog-single-header {
  margin-bottom: var(--al-space-4xl);
  padding-bottom: var(--al-space-3xl);
  border-bottom: 1px solid rgba(0, 255, 78, 0.2);
}

/* Breadcrumbs */
.blog-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--al-space-sm);
  margin-bottom: var(--al-space-lg);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-breadcrumbs a {
  color: var(--al-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-breadcrumbs a:hover {
  color: var(--al-primary-light);
}

.blog-breadcrumbs .breadcrumb-separator {
  color: var(--al-gray-500);
}

/* Clean Title Styling */
.blog-single-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--al-space-xl);
  color: var(--al-white);
  letter-spacing: -0.02em;
}

/* Meta Information */
.blog-single-meta {
  color: var(--al-gray-400);
  font-size: 0.95rem;
  display: flex;
  gap: var(--al-space-xl);
  flex-wrap: wrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-single-meta span {
  position: relative;
}

.blog-single-meta span:not(:last-child)::after {
  content: '•';
  position: absolute;
  right: calc(var(--al-space-xl) * -0.5);
  color: var(--al-gray-600);
}

/* Content Typography */
.blog-single-content {
  color: var(--al-gray-200);
  line-height: 1.8;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Headings */
.blog-single-content h1,
.blog-single-content h2,
.blog-single-content h3,
.blog-single-content h4,
.blog-single-content h5,
.blog-single-content h6 {
  clear: both;
  color: var(--al-white);
  margin: var(--al-space-2xl) 0 var(--al-space-md) 0;
  font-weight: 700;
  position: relative;
  letter-spacing: -0.01em;
  line-height: 1.3;
  /* Offset for anchor links so heading is visible below sticky nav */
  scroll-margin-top: 150px !important;
}

.blog-single-content h2 {
  font-size: 2rem;
  padding-bottom: var(--al-space-sm);
  border-bottom: 1px solid rgba(0, 255, 78, 0.2);
}

.blog-single-content h3 {
  font-size: 1.5rem;
  color: var(--al-gray-100);
}

.blog-single-content h4 {
  font-size: 1.25rem;
  color: var(--al-gray-200);
}

/* Paragraphs */
.blog-single-content p {
  margin-bottom: var(--al-space-lg);
}

/* Images */
.blog-single-content img {
  display: block;
  width: auto;
  max-width: min(100%, 860px);
  max-height: 480px;
  margin: var(--al-space-xl) auto;
  border-radius: 12px;
  object-fit: contain;
}

.blog-single-content .blog-inline-image {
  margin: var(--al-space-sm) 0 var(--al-space-xl);
}

.blog-single-content .blog-inline-image img {
  max-width: 100%;
  max-height: 360px;
  margin: 0;
}

@media (min-width: 900px) {
  .blog-single-content .blog-inline-image-right {
    float: right;
    width: min(42%, 520px);
    margin: 0 0 var(--al-space-lg) var(--al-space-2xl);
  }
}

@media (max-width: 899px) {
  .blog-single-content .blog-inline-image {
    width: 100%;
    margin: var(--al-space-xl) 0;
  }
}

/* Strong & Emphasis */
.blog-single-content strong,
.blog-single-content b {
  color: var(--al-white);
  font-weight: 600;
}

.blog-single-content em,
.blog-single-content i {
  color: var(--al-gray-100);
  font-style: italic;
}

/* Lists */
.blog-single-content ul,
.blog-single-content ol {
  margin: var(--al-space-lg) 0;
  padding-left: var(--al-space-xl);
}

.blog-single-content li {
  margin-bottom: var(--al-space-sm);
  line-height: 1.8;
}

.blog-single-content ul li {
  list-style: none;
  position: relative;
  padding-left: var(--al-space-lg);
}

.blog-single-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--al-primary);
  font-weight: bold;
}

.blog-single-content ol {
  counter-reset: blog-counter;
}

.blog-single-content ol li {
  counter-increment: blog-counter;
  list-style: none;
  position: relative;
  padding-left: var(--al-space-2xl);
}

.blog-single-content ol li::before {
  content: counter(blog-counter) '.';
  position: absolute;
  left: 0;
  color: var(--al-primary);
  font-weight: 600;
}

/* Links */
.blog-single-content a {
  color: var(--al-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.blog-single-content a:hover {
  color: var(--al-primary-light);
  border-bottom-color: var(--al-primary-light);
}

/* Code */
.blog-single-content code {
  background: rgba(0, 255, 78, 0.1);
  color: var(--al-primary);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

.blog-single-content pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 78, 0.2);
  border-radius: 8px;
  padding: var(--al-space-lg);
  overflow-x: auto;
  margin: var(--al-space-2xl) 0;
}

.blog-single-content pre code {
  background: none;
  padding: 0;
  color: var(--al-gray-100);
  display: block;
  line-height: 1.6;
}

/* Blockquotes */
.blog-single-content blockquote {
  border-left: 3px solid var(--al-primary);
  padding-left: var(--al-space-xl);
  margin: var(--al-space-2xl) 0;
  font-style: italic;
  color: var(--al-gray-300);
}

/* Tables */
.blog-single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--al-space-2xl) 0;
}

.blog-single-content th {
  background: rgba(0, 255, 78, 0.1);
  color: var(--al-white);
  font-weight: 600;
  padding: var(--al-space-md);
  text-align: left;
  border-bottom: 2px solid rgba(0, 255, 78, 0.3);
}

.blog-single-content td {
  padding: var(--al-space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-single-content tr:hover {
  background: rgba(0, 255, 78, 0.05);
}

/* Horizontal Rules */
.blog-single-content hr {
  border: none;
  height: 1px;
  background: rgba(0, 255, 78, 0.3);
  margin: var(--al-space-3xl) 0;
}

/* Tags */
.blog-tags {
  margin-top: var(--al-space-4xl);
  padding-top: var(--al-space-2xl);
  border-top: 1px solid rgba(0, 255, 78, 0.2);
}

.blog-tags .tag {
  display: inline-block;
  background: rgba(0, 255, 78, 0.1);
  color: var(--al-primary);
  padding: var(--al-space-xs) var(--al-space-md);
  border-radius: 20px;
  font-size: 0.9rem;
  margin: var(--al-space-xs);
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 255, 78, 0.3);
  font-weight: 500;
}

.blog-tags .tag:hover {
  background: rgba(0, 255, 78, 0.2);
  transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
  margin-top: var(--al-space-4xl);
  padding: var(--al-space-4xl) var(--al-space-3xl);
  border-top: 1px solid rgba(0, 255, 78, 0.2);
}

.related-posts .section-title {
  color: var(--al-white);
  margin-bottom: var(--al-space-3xl);
  font-size: 2rem;
  font-weight: 700;
}

/* Blog List Styles */
.blog-list-container {
  padding: var(--al-space-4xl) var(--al-space-3xl);
}

.blog-list-header {
  margin-bottom: var(--al-space-4xl);
  padding-bottom: var(--al-space-3xl);
  border-bottom: 2px solid rgba(0, 255, 78, 0.2);
}

.blog-list-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--al-white);
  margin-bottom: var(--al-space-lg);
  letter-spacing: -0.02em;
}

.blog-list-description {
  color: var(--al-gray-300);
  font-size: 1.2rem;
  line-height: 1.6;
}

.blog-list {
  margin-bottom: var(--al-space-4xl);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--al-space-2xl);
}

.blog-list-item {
  padding: var(--al-space-2xl);
  background: rgba(0, 255, 78, 0.02);
  border: 1px solid rgba(0, 255, 78, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.blog-list-item:hover {
  background: rgba(0, 255, 78, 0.05);
  border-color: rgba(0, 255, 78, 0.3);
  transform: translateY(-2px);
}

.blog-list-item-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: var(--al-space-sm);
}

.blog-list-item-title a {
  color: var(--al-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-list-item-title a:hover {
  color: var(--al-primary);
}

.blog-list-meta {
  color: var(--al-gray-400);
  font-size: 0.9rem;
  margin-bottom: var(--al-space-md);
  display: flex;
  gap: var(--al-space-lg);
  flex-wrap: wrap;
}

.blog-list-excerpt {
  color: var(--al-gray-300);
  line-height: 1.6;
  margin-bottom: var(--al-space-md);
}

.blog-list-tags {
  display: flex;
  gap: var(--al-space-sm);
  flex-wrap: wrap;
}

.blog-list-tags .tag {
  display: inline-block;
  background: rgba(0, 255, 78, 0.1);
  color: var(--al-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.blog-list-tags .tag:hover {
  background: rgba(0, 255, 78, 0.2);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--al-space-md);
  margin-top: var(--al-space-3xl);
}

.pagination a,
.pagination span {
  padding: var(--al-space-sm) var(--al-space-md);
  background: rgba(0, 255, 78, 0.1);
  color: var(--al-primary);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: rgba(0, 255, 78, 0.2);
}

.pagination .active {
  background: var(--al-primary);
  color: var(--al-black);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .blog-single {
    padding: var(--al-space-2xl) var(--al-space-lg);
  }

  .blog-single-title {
    font-size: 2rem;
  }

  .blog-single-content {
    font-size: 1rem;
  }

  .blog-single-content h2 {
    font-size: 1.5rem;
  }

  .blog-single-content h3 {
    font-size: 1.25rem;
  }

  .blog-single-meta {
    flex-direction: column;
    gap: var(--al-space-sm);
  }

  .blog-single-meta span:not(:last-child)::after {
    display: none;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .blog-list-title {
    font-size: 2rem;
  }

  .blog-list-item-title {
    font-size: 1.4rem;
  }

  .related-posts {
    padding: var(--al-space-2xl) var(--al-space-lg);
  }
}

/* =====================================================================
   3-COLUMN BLOG LAYOUT - Temporal-style with positioned sidebars
   ===================================================================== */

/* Main article container */
.blog-single {
  max-width: none !important;
  padding: var(--al-space-4xl) 0 !important;
  position: relative;
  margin: 0 !important;
}

/* Header container - align with content column */
.blog-single-header {
  max-width: 800px;
  margin: 0 auto var(--al-space-3xl) !important;
  padding: 0 var(--al-space-xl) var(--al-space-3xl);
  border-bottom: 1px solid rgba(0, 255, 78, 0.2);
}

.blog-single-title {
  text-align: left !important;
  margin-bottom: var(--al-space-lg);
}

/* Show meta below title always */
.blog-meta-mobile {
  display: flex !important;
  justify-content: flex-start !important;
}

/* Layout container - relative positioning context */
.blog-layout-grid {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--al-space-xl);
}

/* Main content column - full width of container */
.blog-main-content {
  width: 100%;
}

/* =====================================================================
   LEFT COLUMN - Metadata + Table of Contents (positioned)
   ===================================================================== */

.blog-left-column {
  position: absolute;
  left: calc(50% - 400px - 240px - 40px); /* center - half content - column width - gap */
  top: 0;
  width: 220px;
}

.blog-left-column-inner {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Metadata block */
.blog-meta-block {
  margin-bottom: var(--al-space-2xl);
  padding-bottom: var(--al-space-2xl);
  border-bottom: 1px solid rgba(0, 255, 78, 0.15);
}

.blog-meta-item {
  margin-bottom: var(--al-space-lg);
}

.blog-meta-item:last-child {
  margin-bottom: 0;
}

.blog-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--al-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.blog-meta-value {
  font-size: 0.875rem;
  color: var(--al-gray-200);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.blog-meta-value a {
  color: var(--al-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-meta-value a:hover {
  color: var(--al-primary-light);
}

/* Table of Contents */
.blog-toc {
  padding-top: var(--al-space-lg);
}

.blog-toc-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--al-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--al-space-md);
}

/* Hugo generates #TableOfContents with nested nav > ul */
.blog-toc nav,
.blog-toc > ul {
  margin: 0;
  padding: 0;
}

.blog-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-toc li {
  margin-bottom: var(--al-space-sm);
  line-height: 1.4;
}

.blog-toc a {
  color: var(--al-primary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
  display: block;
  transition: color 0.2s ease;
}

.blog-toc a:hover {
  color: var(--al-primary-light);
}

/* Nested TOC items (h3, h4, etc.) */
.blog-toc ul ul {
  margin-top: var(--al-space-xs);
  padding-left: var(--al-space-md);
}

.blog-toc ul ul a {
  font-size: 0.8rem;
  color: var(--al-gray-400);
}

.blog-toc ul ul a:hover {
  color: var(--al-primary);
}

/* =====================================================================
   RIGHT COLUMN - Share Bar + CTA Card (positioned)
   ===================================================================== */

.blog-right-column {
  position: absolute;
  right: calc(50% - 400px - 280px - 40px); /* center - half content - column width - gap */
  top: 0;
  width: 280px;
}

.blog-right-column-inner {
  position: sticky;
  top: 100px;
}

/* Share Bar */
.blog-share-bar {
  display: flex;
  align-items: center;
  gap: var(--al-space-md);
  padding: var(--al-space-md) var(--al-space-lg);
  background: rgba(30, 35, 50, 0.9);
  border-radius: 8px;
  margin-bottom: var(--al-space-xl);
}

.blog-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--al-gray-300);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.blog-share-icons {
  display: flex;
  align-items: center;
  gap: var(--al-space-sm);
}

.blog-share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--al-gray-300);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-share-icon:hover {
  color: var(--al-white);
  background: rgba(255, 255, 255, 0.1);
}

.blog-share-icon.copied {
  color: var(--al-primary);
}

/* CTA Card */
.blog-cta-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 78, 0.2);
  border-radius: 0;
  padding: var(--al-space-xl);
}

.blog-cta-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--al-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--al-space-md);
}

.blog-cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--al-white);
  line-height: 1.3;
  margin: 0 0 var(--al-space-md) 0;
}

.blog-cta-description {
  font-size: 0.95rem;
  color: var(--al-gray-300);
  line-height: 1.6;
  margin: 0 0 var(--al-space-xl) 0;
}

.blog-cta-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* =====================================================================
   RESPONSIVE - Hide columns on mobile/tablet
   ===================================================================== */

/* Show sidebars only on very wide screens (1400px+) */
@media (max-width: 1439px) {
  .blog-left-column,
  .blog-right-column {
    display: none;
  }

  .blog-meta-mobile {
    display: flex;
  }
}

@media (max-width: 900px) {
  .blog-single {
    padding: var(--al-space-2xl) 0;
  }

  .blog-single-header {
    padding: 0 var(--al-space-lg) var(--al-space-2xl);
    margin-bottom: var(--al-space-xl);
  }

  .blog-layout-grid {
    padding: 0 var(--al-space-lg);
  }
}

@media (min-width: 1440px) {
  /* Keep meta visible below title on all screen sizes */
  
  .blog-single-header {
    max-width: 850px;
  }
  
  .blog-layout-grid {
    max-width: 850px;
  }
  
  .blog-left-column {
    left: calc(50% - 425px - 240px - 50px);
  }
  
  .blog-list {
    gap: var(--al-space-3xl);
  }
  
  .blog-list-title {
    font-size: 3.25rem;
  }
}

/* Extra large screens - 1920px+ */
@media (min-width: 1920px) {
  .blog-single-header {
    max-width: 900px;
  }
  
  .blog-layout-grid {
    max-width: 900px;
  }
  
  .blog-left-column {
    left: calc(50% - 450px - 260px - 60px);
    width: 240px;
  }
  
  .blog-right-column {
    width: 260px;
  }
  
  .blog-single-title {
    font-size: clamp(2.75rem, 5vw, 4rem);
  }
  
  .blog-single-content {
    font-size: 1.15rem;
    line-height: 1.85;
  }
  
  .blog-list {
    gap: 3rem;
  }
  
  .blog-list-title {
    font-size: 3.5rem;
  }
  
  .blog-list-item {
    padding: var(--al-space-3xl);
  }
  
  .blog-list-item-title {
    font-size: 2rem;
  }
}

/* Ultra wide screens - 2560px+ */
@media (min-width: 2560px) {
  .blog-single-header {
    max-width: 1000px;
  }
  
  .blog-layout-grid {
    max-width: 1000px;
  }
  
  .blog-left-column {
    left: calc(50% - 500px - 280px - 70px);
    width: 260px;
  }
  
  .blog-right-column {
    width: 280px;
  }
  
  .blog-single-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
  }
  
  .blog-single-content {
    font-size: 1.2rem;
    line-height: 1.9;
  }
  
  .blog-list {
    gap: 3.5rem;
  }
  
  .blog-list-title {
    font-size: 4rem;
  }
  
  .blog-list-item {
    padding: var(--al-space-4xl);
  }
  
  .blog-list-item-title {
    font-size: 2.25rem;
  }
}
