/*
Theme Name: Datafrik Blog
Theme URI: https://datafrik.co
Author: Datafrik Team
Author URI: https://datafrik.co
Description: Official Datafrik blog theme — matching the datafrik.co brand identity. Built for data education content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: datafrik-blog
Tags: blog, education, dark-mode, custom-colors, responsive-layout, one-column, two-columns
*/

/* ─── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Hind:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  /* Brand Colours — matches datafrik.co exactly */
  --df-teal:        #3EDFCF;
  --df-teal-dark:   #227970;
  --df-teal-deep:   #35C9BA;
  --df-navy:        #001926;

  /* Light mode */
  --df-bg:          #ffffff;
  --df-bg-alt:      #F5FAFA;
  --df-bg-card:     #ffffff;
  --df-surface:     #F5FAFA;
  --df-border:      #E8EEEE;
  --df-heading:     #263238;
  --df-text:        #4D4D4D;
  --df-muted:       #717171;
  --df-nav-bg:      #ffffff;
  --df-footer-bg:   #001926;
  --df-footer-text: #89939E;

  /* Shadows */
  --df-shadow-sm:   0 2px 8px rgba(62,223,207,0.08);
  --df-shadow-md:   0 4px 24px rgba(62,223,207,0.12);
  --df-shadow-lg:   0 8px 40px rgba(62,223,207,0.18);

  /* Typography */
  --df-font-head:   'DM Sans', sans-serif;
  --df-font-body:   'Hind', sans-serif;
  --df-radius:      12px;
  --df-radius-pill: 999px;
  --df-max-w:       1200px;
}

/* Dark Mode */
[data-theme="dark"],
.dark-mode {
  --df-bg:        #0F0E14;
  --df-bg-alt:    #10171D;
  --df-bg-card:   #10171D;
  --df-surface:   #17161C;
  --df-border:    #1E2A32;
  --df-heading:   #F5F7FA;
  --df-text:      #BFCBD1;
  --df-muted:     #89939E;
  --df-nav-bg:    #0F0E14;
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family:      var(--df-font-body);
  font-size:        16px;
  line-height:      1.7;
  color:            var(--df-text);
  background-color: var(--df-bg);
  transition:       background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--df-teal-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--df-teal); }

h1,h2,h3,h4,h5,h6 {
  font-family:  var(--df-font-head);
  color:        var(--df-heading);
  line-height:  1.25;
  font-weight:  600;
}

/* ─── Layout Utilities ──────────────────────────────────────────── */
.df-container {
  max-width:  var(--df-max-w);
  margin:     0 auto;
  padding:    0 1.5rem;
}
@media (min-width: 768px) { .df-container { padding: 0 2.5rem; } }
@media (min-width: 1024px) { .df-container { padding: 0 5rem; } }

.df-pill-badge {
  display:        inline-block;
  padding:        0.4rem 1.2rem;
  border:         2px solid var(--df-teal-dark);
  border-radius:  var(--df-radius-pill);
  font-family:    var(--df-font-head);
  font-size:      0.75rem;
  font-weight:    500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--df-teal-dark);
  margin-bottom:  1rem;
  transition:     all 0.2s;
}
[data-theme="dark"] .df-pill-badge {
  border-color: var(--df-teal);
  color:        var(--df-teal);
}

.df-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            0.5rem;
  padding:        0.65rem 1.5rem;
  border-radius:  var(--df-radius);
  font-family:    var(--df-font-head);
  font-size:      0.9rem;
  font-weight:    500;
  cursor:         pointer;
  transition:     all 0.2s;
  border:         none;
  text-decoration: none;
}
.df-btn-primary {
  background: var(--df-teal);
  color:      #001926;
}
.df-btn-primary:hover { background: var(--df-teal-deep); color: #001926; transform: translateY(-1px); }

.df-btn-outline {
  background:   transparent;
  border:       2px solid var(--df-teal-dark);
  color:        var(--df-teal-dark);
}
.df-btn-outline:hover {
  background: var(--df-teal-dark);
  color:      #fff;
}
[data-theme="dark"] .df-btn-outline {
  border-color: var(--df-teal);
  color:        var(--df-teal);
}
[data-theme="dark"] .df-btn-outline:hover {
  background: var(--df-teal);
  color:      var(--df-navy);
}

/* ─── Navigation ────────────────────────────────────────────────── */
#site-header {
  position:         sticky;
  top:              0;
  z-index:          100;
  background:       var(--df-nav-bg);
  border-bottom:    1px solid var(--df-border);
  backdrop-filter:  blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:       background 0.3s, border-color 0.3s;
}

.nav-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          68px;
}

.site-logo {
  display:     flex;
  align-items: center;
  gap:         0.6rem;
  font-family: var(--df-font-head);
  font-size:   1.4rem;
  font-weight: 700;
  color:       var(--df-heading);
  text-decoration: none;
}
.site-logo .logo-dot { color: var(--df-teal); }
.site-logo img { height: 32px; width: auto; }

.nav-links {
  display:     flex;
  align-items: center;
  gap:         2rem;
  list-style:  none;
}
.nav-links a {
  font-family: var(--df-font-head);
  font-size:   0.9rem;
  font-weight: 500;
  color:       var(--df-text);
  transition:  color 0.2s;
}
.nav-links a:hover,
.nav-links .current_page_item > a { color: var(--df-teal); }

.nav-right {
  display:     flex;
  align-items: center;
  gap:         1rem;
}

/* Dark mode toggle */
#theme-toggle {
  background:    none;
  border:        1px solid var(--df-border);
  border-radius: 999px;
  width:         40px;
  height:        40px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  cursor:        pointer;
  color:         var(--df-text);
  transition:    all 0.2s;
}
#theme-toggle:hover {
  border-color:  var(--df-teal);
  color:         var(--df-teal);
}
#theme-toggle svg { width: 18px; height: 18px; }

/* Mobile hamburger */
.nav-hamburger {
  display:       none;
  flex-direction: column;
  gap:           5px;
  background:    none;
  border:        none;
  cursor:        pointer;
  padding:       4px;
}
.nav-hamburger span {
  display:          block;
  width:            24px;
  height:           2px;
  background:       var(--df-text);
  border-radius:    2px;
  transition:       transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links-wrap {
    display:       none;
    position:      absolute;
    top:           68px;
    left:          0;
    right:         0;
    background:    var(--df-nav-bg);
    border-bottom: 1px solid var(--df-border);
    padding:       1.5rem;
  }
  .nav-links-wrap.open { display: block; }
  .nav-links {
    flex-direction: column;
    align-items:    flex-start;
    gap:            1rem;
  }
}

/* Search bar in nav */
.nav-search-form {
  display:       flex;
  align-items:   center;
  background:    var(--df-bg-alt);
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius-pill);
  padding:       0.3rem 0.8rem;
  gap:           0.4rem;
  transition:    border-color 0.2s;
}
.nav-search-form:focus-within { border-color: var(--df-teal); }
.nav-search-form input {
  background:  transparent;
  border:      none;
  outline:     none;
  font-size:   0.85rem;
  color:       var(--df-text);
  width:       160px;
}
.nav-search-form button {
  background:  none;
  border:      none;
  cursor:      pointer;
  color:       var(--df-muted);
  padding:     0;
  line-height: 1;
}
.nav-search-form button svg { width: 16px; height: 16px; }

/* ─── Hero / Page Title ─────────────────────────────────────────── */
.page-hero {
  background:   var(--df-bg-alt);
  padding:      4rem 0 3rem;
  border-bottom: 1px solid var(--df-border);
  position:     relative;
  overflow:     hidden;
}
.page-hero::before {
  content:     '';
  position:    absolute;
  top:         -60px;
  right:       -60px;
  width:       300px;
  height:      300px;
  background:  radial-gradient(circle, rgba(62,223,207,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero-label { margin-bottom: 0.75rem; }
.page-hero h1 {
  font-size:   2.5rem;
  font-weight: 700;
  max-width:   640px;
}
.page-hero p {
  margin-top:  0.75rem;
  color:       var(--df-muted);
  font-size:   1.05rem;
  max-width:   520px;
}
@media (max-width: 600px) { .page-hero h1 { font-size: 1.8rem; } }

/* ─── Main Layout ───────────────────────────────────────────────── */
#main-content {
  padding: 3rem 0 5rem;
}

.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr 340px;
  }
}

/* ─── Post Cards ────────────────────────────────────────────────── */
.posts-grid {
  display:               grid;
  grid-template-columns: 1fr;
  gap:                   2rem;
}
@media (min-width: 640px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .posts-grid.full-width { grid-template-columns: repeat(3, 1fr); }
}

/* Featured post — spans full width */
.post-card-featured {
  grid-column: 1 / -1;
  display:     grid;
  grid-template-columns: 1fr;
  gap:         0;
  border-radius: var(--df-radius);
  overflow:    hidden;
  background:  var(--df-bg-card);
  border:      1px solid var(--df-border);
  box-shadow:  var(--df-shadow-sm);
  transition:  box-shadow 0.3s, transform 0.3s;
}
@media (min-width: 768px) {
  .post-card-featured {
    grid-template-columns: 1.2fr 1fr;
  }
}
.post-card-featured:hover {
  box-shadow: var(--df-shadow-lg);
  transform:  translateY(-3px);
}

.post-card {
  background:    var(--df-bg-card);
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius);
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
  transition:    box-shadow 0.3s, transform 0.3s;
  box-shadow:    var(--df-shadow-sm);
}
.post-card:hover {
  box-shadow: var(--df-shadow-md);
  transform:  translateY(-4px);
}

.post-card-thumb {
  position:     relative;
  aspect-ratio: 16/10;
  overflow:     hidden;
  background:   var(--df-surface);
}
.post-card-thumb img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumb img,
.post-card-featured:hover .post-card-thumb img {
  transform: scale(1.04);
}

/* Category tag on thumbnail */
.post-cat-badge {
  position:      absolute;
  top:           1rem;
  left:          1rem;
  background:    var(--df-teal);
  color:         #001926;
  font-family:   var(--df-font-head);
  font-size:     0.7rem;
  font-weight:   600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding:       0.25rem 0.75rem;
  border-radius: var(--df-radius-pill);
}

.post-card-body {
  padding:        1.5rem;
  display:        flex;
  flex-direction: column;
  flex-grow:      1;
}
.post-card-featured .post-card-body {
  padding:         2rem 2rem;
  justify-content: center;
}

.post-meta {
  display:     flex;
  align-items: center;
  gap:         0.75rem;
  font-size:   0.78rem;
  color:       var(--df-muted);
  margin-bottom: 0.75rem;
  flex-wrap:   wrap;
}
.post-meta .sep { opacity: 0.4; }

.post-card-title {
  font-size:     1.15rem;
  font-weight:   600;
  color:         var(--df-heading);
  margin-bottom: 0.6rem;
  line-height:   1.3;
  transition:    color 0.2s;
}
.post-card-featured .post-card-title { font-size: 1.6rem; }
.post-card-title a:hover { color: var(--df-teal); }

.post-card-excerpt {
  font-size:     0.9rem;
  color:         var(--df-muted);
  line-height:   1.65;
  flex-grow:     1;
  margin-bottom: 1.25rem;
  display:       -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:      hidden;
}

.post-card-footer {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  margin-top:  auto;
}

.post-author-mini {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  font-size:   0.82rem;
  color:       var(--df-text);
}
.post-author-mini img {
  width:         28px;
  height:        28px;
  border-radius: 50%;
  object-fit:    cover;
  border:        2px solid var(--df-teal);
}

.post-read-more {
  font-family: var(--df-font-head);
  font-size:   0.82rem;
  font-weight: 600;
  color:       var(--df-teal-dark);
  display:     flex;
  align-items: center;
  gap:         0.3rem;
  transition:  gap 0.2s, color 0.2s;
}
.post-read-more:hover {
  color: var(--df-teal);
  gap:   0.6rem;
}
[data-theme="dark"] .post-read-more { color: var(--df-teal); }

/* Read time pill */
.read-time {
  display:       inline-flex;
  align-items:   center;
  gap:           0.3rem;
  font-size:     0.75rem;
  background:    rgba(62,223,207,0.1);
  color:         var(--df-teal-dark);
  padding:       0.2rem 0.65rem;
  border-radius: var(--df-radius-pill);
  font-weight:   500;
}
[data-theme="dark"] .read-time { color: var(--df-teal); }

/* ─── Pagination ────────────────────────────────────────────────── */
.df-pagination {
  display:         flex;
  justify-content: center;
  align-items:     center;
  gap:             0.5rem;
  margin-top:      3rem;
}
.df-pagination a,
.df-pagination span {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           40px;
  height:          40px;
  border-radius:   var(--df-radius);
  font-family:     var(--df-font-head);
  font-size:       0.9rem;
  font-weight:     500;
  border:          1px solid var(--df-border);
  color:           var(--df-text);
  transition:      all 0.2s;
}
.df-pagination a:hover,
.df-pagination .current {
  background:   var(--df-teal);
  border-color: var(--df-teal);
  color:        #001926;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
#sidebar { display: flex; flex-direction: column; gap: 2rem; }

.widget {
  background:    var(--df-bg-card);
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius);
  padding:       1.5rem;
}

.widget-title {
  font-family:   var(--df-font-head);
  font-size:     1rem;
  font-weight:   600;
  color:         var(--df-heading);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--df-teal);
  display:       inline-block;
}

/* Search widget */
.widget-search-form {
  display:     flex;
  gap:         0.5rem;
}
.widget-search-form input {
  flex-grow:     1;
  padding:       0.55rem 1rem;
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius);
  background:    var(--df-bg-alt);
  color:         var(--df-text);
  font-size:     0.9rem;
  outline:       none;
  transition:    border-color 0.2s;
}
.widget-search-form input:focus { border-color: var(--df-teal); }
.widget-search-form button {
  padding:       0.55rem 1rem;
  background:    var(--df-teal);
  border:        none;
  border-radius: var(--df-radius);
  color:         #001926;
  font-weight:   600;
  cursor:        pointer;
  font-size:     0.85rem;
  transition:    background 0.2s;
}
.widget-search-form button:hover { background: var(--df-teal-deep); }

/* Category list */
.widget ul { list-style: none; }
.widget ul li {
  padding:       0.5rem 0;
  border-bottom: 1px solid var(--df-border);
  display:       flex;
  justify-content: space-between;
  align-items:   center;
  font-size:     0.9rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--df-text); transition: color 0.2s; }
.widget ul li a:hover { color: var(--df-teal); }
.widget ul li .cat-count {
  background:    rgba(62,223,207,0.12);
  color:         var(--df-teal-dark);
  font-size:     0.7rem;
  font-weight:   600;
  padding:       0.15rem 0.5rem;
  border-radius: var(--df-radius-pill);
}
[data-theme="dark"] .widget ul li .cat-count { color: var(--df-teal); }

/* Recent posts widget */
.recent-post-item {
  display:     flex;
  gap:         0.75rem;
  padding:     0.75rem 0;
  border-bottom: 1px solid var(--df-border);
}
.recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-post-item img {
  width:         64px;
  height:        64px;
  object-fit:    cover;
  border-radius: 8px;
  flex-shrink:   0;
}
.recent-post-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.recent-post-meta a {
  font-size:   0.85rem;
  font-weight: 500;
  color:       var(--df-heading);
  line-height: 1.3;
}
.recent-post-meta a:hover { color: var(--df-teal); }
.recent-post-meta time {
  font-size: 0.75rem;
  color:     var(--df-muted);
}

/* Tags widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud a {
  padding:       0.3rem 0.8rem;
  background:    var(--df-bg-alt);
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius-pill);
  font-size:     0.78rem;
  color:         var(--df-text);
  transition:    all 0.2s;
}
.tag-cloud a:hover {
  background:   var(--df-teal);
  border-color: var(--df-teal);
  color:        #001926;
}

/* Newsletter widget */
.newsletter-widget {
  background:    linear-gradient(135deg, var(--df-navy) 0%, #0a2030 100%);
  border-color:  rgba(62,223,207,0.2);
}
.newsletter-widget .widget-title { color: #fff; border-color: var(--df-teal); }
.newsletter-widget p { color: var(--df-footer-text); font-size: 0.88rem; margin-bottom: 1rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 0.6rem; }
.newsletter-form input {
  padding:       0.6rem 1rem;
  border:        1px solid rgba(62,223,207,0.3);
  border-radius: var(--df-radius);
  background:    rgba(255,255,255,0.06);
  color:         #fff;
  font-size:     0.88rem;
  outline:       none;
  transition:    border-color 0.2s;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-form input:focus { border-color: var(--df-teal); }
.newsletter-form button {
  padding:       0.65rem;
  background:    var(--df-teal);
  border:        none;
  border-radius: var(--df-radius);
  color:         var(--df-navy);
  font-weight:   600;
  font-size:     0.88rem;
  cursor:        pointer;
  transition:    background 0.2s;
  font-family:   var(--df-font-head);
}
.newsletter-form button:hover { background: var(--df-teal-deep); }

/* ─── Single Post ───────────────────────────────────────────────── */
.single-post-hero {
  padding:      3.5rem 0 0;
  background:   var(--df-bg-alt);
  border-bottom: 1px solid var(--df-border);
}
.single-post-hero .post-cat-badge {
  position: static;
  margin-bottom: 1rem;
}
.single-post-title {
  font-size:   2.4rem;
  font-weight: 700;
  max-width:   800px;
  line-height: 1.2;
}
@media (max-width: 600px) { .single-post-title { font-size: 1.7rem; } }

.single-post-meta {
  display:   flex;
  flex-wrap: wrap;
  gap:       1.5rem;
  margin:    1.5rem 0;
  padding:   1.25rem 0;
  border-top:    1px solid var(--df-border);
  border-bottom: 1px solid var(--df-border);
}
.single-post-meta-item {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  font-size:   0.88rem;
  color:       var(--df-muted);
}
.single-post-meta-item strong { color: var(--df-text); }
.single-post-meta-item svg { width: 16px; height: 16px; color: var(--df-teal); }

.single-post-cover {
  margin-top:    2rem;
  border-radius: var(--df-radius) var(--df-radius) 0 0;
  overflow:      hidden;
  max-height:    500px;
}
.single-post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Post content typography */
.post-content {
  max-width:   780px;
  font-size:   1.05rem;
  line-height: 1.85;
  color:       var(--df-text);
  padding:     2.5rem 0;
}
.post-content h2 { font-size: 1.65rem; margin: 2.5rem 0 1rem; color: var(--df-heading); }
.post-content h3 { font-size: 1.3rem;  margin: 2rem 0 0.75rem; color: var(--df-heading); }
.post-content p  { margin-bottom: 1.4rem; }
.post-content ul,
.post-content ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  margin:        1.5rem 0;
  padding:       1.25rem 1.5rem;
  border-left:   4px solid var(--df-teal);
  background:    rgba(62,223,207,0.06);
  border-radius: 0 var(--df-radius) var(--df-radius) 0;
  font-style:    italic;
  color:         var(--df-heading);
}
.post-content code {
  background:    rgba(62,223,207,0.1);
  padding:       0.15rem 0.45rem;
  border-radius: 4px;
  font-size:     0.88em;
  color:         var(--df-teal-dark);
  font-family:   'Courier New', monospace;
}
[data-theme="dark"] .post-content code { color: var(--df-teal); }
.post-content pre {
  background:    #001926;
  padding:       1.5rem;
  border-radius: var(--df-radius);
  overflow-x:    auto;
  margin-bottom: 1.4rem;
  border:        1px solid rgba(62,223,207,0.2);
}
.post-content pre code {
  background: transparent;
  padding:    0;
  color:      var(--df-teal);
  font-size:  0.9rem;
}
.post-content a { color: var(--df-teal-dark); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .post-content a { color: var(--df-teal); }
.post-content img {
  border-radius: var(--df-radius);
  margin:        1.5rem auto;
}
.post-content table {
  width:           100%;
  border-collapse: collapse;
  margin-bottom:   1.5rem;
  font-size:       0.92rem;
}
.post-content th {
  background:  var(--df-bg-alt);
  padding:     0.65rem 1rem;
  text-align:  left;
  font-weight: 600;
  color:       var(--df-heading);
  border-bottom: 2px solid var(--df-teal);
}
.post-content td {
  padding:       0.6rem 1rem;
  border-bottom: 1px solid var(--df-border);
}

/* Author card */
.author-card {
  display:       flex;
  gap:           1.5rem;
  background:    var(--df-bg-card);
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius);
  padding:       1.75rem;
  margin-top:    2.5rem;
  align-items:   flex-start;
}
.author-card img {
  width:         80px;
  height:        80px;
  border-radius: 50%;
  object-fit:    cover;
  flex-shrink:   0;
  border:        3px solid var(--df-teal);
}
.author-card-name { font-weight: 700; font-size: 1.05rem; color: var(--df-heading); margin-bottom: 0.25rem; }
.author-card-role { font-size: 0.82rem; color: var(--df-teal-dark); font-weight: 500; margin-bottom: 0.6rem; }
[data-theme="dark"] .author-card-role { color: var(--df-teal); }
.author-card-bio { font-size: 0.9rem; color: var(--df-muted); }

/* Post Tags */
.post-tags {
  display:     flex;
  flex-wrap:   wrap;
  gap:         0.5rem;
  margin-top:  2rem;
  padding-top: 1.5rem;
  border-top:  1px solid var(--df-border);
}
.post-tags span { font-weight: 600; font-size: 0.85rem; color: var(--df-text); }

/* Share bar */
.share-bar {
  display:       flex;
  align-items:   center;
  gap:           0.75rem;
  flex-wrap:     wrap;
  padding:       1.25rem 0;
  border-top:    1px solid var(--df-border);
  border-bottom: 1px solid var(--df-border);
  margin-top:    1.5rem;
}
.share-bar span { font-size: 0.85rem; font-weight: 600; color: var(--df-text); }
.share-btn {
  display:       flex;
  align-items:   center;
  gap:           0.4rem;
  padding:       0.4rem 1rem;
  border-radius: var(--df-radius-pill);
  font-size:     0.8rem;
  font-weight:   600;
  font-family:   var(--df-font-head);
  cursor:        pointer;
  border:        1px solid;
  transition:    all 0.2s;
  background:    transparent;
}
.share-btn.twitter { border-color: #1DA1F2; color: #1DA1F2; }
.share-btn.twitter:hover { background: #1DA1F2; color: #fff; }
.share-btn.linkedin { border-color: #0A66C2; color: #0A66C2; }
.share-btn.linkedin:hover { background: #0A66C2; color: #fff; }
.share-btn.copy { border-color: var(--df-border); color: var(--df-text); }
.share-btn.copy:hover { border-color: var(--df-teal); color: var(--df-teal); }

/* Related posts */
.related-posts { margin-top: 3rem; }
.related-posts h3 {
  font-size:     1.3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--df-teal);
  display:       inline-block;
}

/* ─── Comments ──────────────────────────────────────────────────── */
.comments-section { margin-top: 3rem; }
.comments-section h3 {
  font-size:     1.3rem;
  margin-bottom: 1.5rem;
  color:         var(--df-heading);
}

.comment-list { list-style: none; }
.comment-item {
  display:       flex;
  gap:           1rem;
  padding:       1.25rem 0;
  border-bottom: 1px solid var(--df-border);
}
.comment-avatar {
  width:         44px;
  height:        44px;
  border-radius: 50%;
  overflow:      hidden;
  flex-shrink:   0;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author-name { font-weight: 600; font-size: 0.9rem; color: var(--df-heading); }
.comment-date { font-size: 0.78rem; color: var(--df-muted); margin-left: 0.5rem; }
.comment-body { font-size: 0.9rem; color: var(--df-text); margin-top: 0.4rem; }
.comment-reply-link { font-size: 0.78rem; color: var(--df-teal-dark); font-weight: 600; margin-top: 0.4rem; display: inline-block; }
[data-theme="dark"] .comment-reply-link { color: var(--df-teal); }

.comment-form { margin-top: 2rem; }
.comment-form h4 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--df-heading); }
.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) { .comment-form-grid { grid-template-columns: 1fr 1fr; } }
.form-field label {
  display:       block;
  font-size:     0.85rem;
  font-weight:   600;
  color:         var(--df-text);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width:         100%;
  padding:       0.65rem 1rem;
  border:        1px solid var(--df-border);
  border-radius: var(--df-radius);
  background:    var(--df-bg-alt);
  color:         var(--df-text);
  font-size:     0.92rem;
  font-family:   var(--df-font-body);
  outline:       none;
  transition:    border-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--df-teal); }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field.full { grid-column: 1 / -1; }

/* ─── CTA Banner ────────────────────────────────────────────────── */
.cta-banner {
  background:    linear-gradient(135deg, var(--df-navy) 0%, #0a2030 100%);
  border-radius: var(--df-radius);
  padding:       3rem 2rem;
  text-align:    center;
  margin:        4rem 0 0;
  border:        1px solid rgba(62,223,207,0.2);
  position:      relative;
  overflow:      hidden;
}
.cta-banner::before {
  content:  '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(62,223,207,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-banner h2 { font-size: 1.8rem; color: #fff; margin-bottom: 0.75rem; }
.cta-banner p  { color: var(--df-footer-text); margin-bottom: 1.5rem; }

/* ─── Footer ────────────────────────────────────────────────────── */
#site-footer {
  background:  var(--df-footer-bg);
  padding:     4rem 0 2rem;
  border-top:  1px solid rgba(62,223,207,0.15);
}

.footer-grid {
  display:               grid;
  grid-template-columns: 1fr;
  gap:                   2.5rem;
  margin-bottom:         3rem;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand-desc {
  font-size:   0.88rem;
  color:       var(--df-footer-text);
  margin-top:  0.75rem;
  line-height: 1.7;
  max-width:   260px;
}

.footer-col-title {
  font-family:   var(--df-font-head);
  font-size:     0.8rem;
  font-weight:   700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:         #fff;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  font-size:  0.88rem;
  color:      var(--df-footer-text);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--df-teal); }

.footer-bottom {
  border-top:  1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display:     flex;
  flex-wrap:   wrap;
  justify-content: space-between;
  align-items: center;
  gap:         1rem;
  font-size:   0.82rem;
  color:       var(--df-footer-text);
}
.footer-bottom a { color: var(--df-footer-text); }
.footer-bottom a:hover { color: var(--df-teal); }

.footer-social {
  display:     flex;
  gap:         0.75rem;
}
.social-icon {
  width:         36px;
  height:        36px;
  border-radius: 50%;
  border:        1px solid rgba(255,255,255,0.15);
  display:       flex;
  align-items:   center;
  justify-content: center;
  color:         var(--df-footer-text);
  transition:    all 0.2s;
}
.social-icon:hover {
  border-color: var(--df-teal);
  color:        var(--df-teal);
  transform:    translateY(-2px);
}
.social-icon svg { width: 16px; height: 16px; }

/* ─── Progress bar ──────────────────────────────────────────────── */
#reading-progress {
  position:   fixed;
  top:        0;
  left:       0;
  height:     3px;
  background: var(--df-teal);
  z-index:    9999;
  width:      0%;
  transition: width 0.1s linear;
}

/* ─── Back to top ───────────────────────────────────────────────── */
#back-to-top {
  position:      fixed;
  bottom:        2rem;
  right:         2rem;
  width:         44px;
  height:        44px;
  background:    var(--df-teal);
  color:         var(--df-navy);
  border:        none;
  border-radius: 50%;
  cursor:        pointer;
  display:       flex;
  align-items:   center;
  justify-content: center;
  box-shadow:    0 4px 16px rgba(62,223,207,0.35);
  opacity:       0;
  transform:     translateY(12px);
  transition:    opacity 0.3s, transform 0.3s;
  z-index:       200;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top svg { width: 20px; height: 20px; }

/* ─── No posts / 404 ────────────────────────────────────────────── */
.no-posts {
  text-align:    center;
  padding:       5rem 1rem;
  color:         var(--df-muted);
}
.no-posts svg { width: 64px; height: 64px; margin: 0 auto 1rem; color: var(--df-teal); opacity: 0.5; }
.no-posts h2  { font-size: 1.5rem; color: var(--df-heading); margin-bottom: 0.5rem; }

/* ─── Utility / Animations ──────────────────────────────────────── */
.fade-in-up {
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger children */
.stagger > * { animation: fadeInUp 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.15s; }
.stagger > *:nth-child(3) { animation-delay: 0.25s; }
.stagger > *:nth-child(4) { animation-delay: 0.35s; }
.stagger > *:nth-child(5) { animation-delay: 0.45s; }
.stagger > *:nth-child(6) { animation-delay: 0.55s; }

/* Skip link for accessibility */
.skip-link {
  position:   absolute;
  top:        -40px;
  left:       0;
  background: var(--df-teal);
  color:      var(--df-navy);
  padding:    0.5rem 1rem;
  z-index:    999;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Responsive helpers */
@media (max-width: 480px) {
  .hide-mobile { display: none !important; }
  .share-bar   { flex-direction: column; align-items: flex-start; }
}
