/*
Theme Name: DataDrivenOps
Theme URI: https://datadrivenops.co
Author: DataDrivenOps
Description: Custom editorial theme for DataDrivenOps — matching the main site design.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: datadrivenops
*/

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,400;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=DM+Sans:wght@400;500&display=swap');

/* ── VARIABLES ── */
:root {
  --cream: #faf7f2;
  --cream2: #f2ede5;
  --cream3: #e8e0d4;
  --green: #2d4a3e;
  --green2: #3d6454;
  --green3: #4a7a62;
  --text: #1c1a17;
  --muted: #6b6560;
  --dim: #9a9490;
  --border: #ddd5c8;
  --border2: #c8bfb2;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAV ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,247,242,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.site-logo em { font-style: italic; color: var(--green); }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.current { color: var(--green); }
.nav-cta {
  background: var(--green) !important;
  color: var(--cream) !important;
  padding: 7px 16px;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--green2) !important; }

/* ── SHARED ── */
.site-content { padding-top: 58px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 2.5rem; }
.section-rule { width: 40px; height: 2px; background: var(--green); margin-bottom: 1.25rem; }
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}
.tag {
  border: 1px solid var(--border2);
  color: var(--dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  display: inline-block;
}
.btn {
  background: var(--green);
  color: var(--cream);
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--green2); color: var(--cream); }
.read-more {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  color: var(--green);
  font-style: italic;
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.read-more:hover { color: var(--green2); }

/* ── BLOG ARCHIVE (index/category) ── */
.blog-archive-hero {
  padding: 5rem 2.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.blog-archive-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 900;
  line-height: 0.97;
  color: var(--text);
  letter-spacing: -2px;
  margin-bottom: 1rem;
}
.blog-archive-hero h1 em { font-style: italic; color: var(--green); }
.blog-archive-hero p {
  font-size: 16px;
  color: var(--muted);
  font-style: italic;
  max-width: 520px;
  line-height: 1.8;
}

/* POSTS GRID */
.posts-grid-wrap { max-width: 1080px; margin: 0 auto; padding: 3rem 2.5rem; }
.posts-featured {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 1px;
}
.post-card-featured {
  background: var(--cream2);
  padding: 2.5rem;
  border-top: 3px solid var(--green);
  text-decoration: none;
  display: block;
  transition: background 0.15s;
}
.post-card-featured:hover { background: var(--cream3); }
.post-card-featured .post-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin: 0.5rem 0 0.75rem;
}
.posts-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top: none;
}
.post-card-list {
  background: var(--cream);
  padding: 1.75rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  text-decoration: none;
  transition: background 0.15s;
}
.post-card-list:hover { background: var(--cream2); }
.post-cat {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: block;
}
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  display: block;
}
.post-excerpt {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}
.post-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  text-align: right;
  display: block;
  margin-bottom: 0.4rem;
}

/* PAGINATION */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}
.pagination a:hover, .pagination .current {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}

/* ── SINGLE POST ── */
.post-hero {
  padding: 5rem 2.5rem 3rem;
  border-bottom: 1px solid var(--border);
  max-width: 1080px;
  margin: 0 auto;
}
.post-hero-cat {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.post-hero-cat::before { content: ''; display: block; width: 32px; height: 1px; background: var(--green); }
.post-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
  max-width: 800px;
}
.post-meta {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.post-meta-item {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.post-hero-excerpt {
  font-size: 18px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.8;
  max-width: 680px;
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
}

/* POST BODY */
.post-body-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
}
.post-content { font-size: 16px; color: var(--muted); line-height: 1.85; }
.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  line-height: 1.2;
}
.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}
.post-content p { margin-bottom: 1.25rem; }
.post-content p:last-child { margin-bottom: 0; }
.post-content strong { color: var(--text); font-style: italic; }
.post-content a { color: var(--green); text-decoration: underline; }
.post-content blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
  margin: 2rem 0;
}
.post-content ul, .post-content ol {
  margin: 1.25rem 0 1.25rem 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* POST SIDEBAR */
.post-sidebar { position: sticky; top: 78px; align-self: start; }
.sidebar-box {
  background: var(--cream2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1px;
}
.sidebar-box h4 {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-box p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* POST TAGS */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* RELATED POSTS */
.related-posts {
  background: var(--cream2);
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem;
}
.related-posts-inner { max-width: 1080px; margin: 0 auto; }
.related-posts h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--green);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.related-card {
  background: var(--cream2);
  padding: 1.75rem;
  text-decoration: none;
  display: block;
  transition: background 0.15s;
}
.related-card:hover { background: var(--cream3); }
.related-card .post-title { font-size: 17px; margin-bottom: 0.5rem; }
.related-card .post-excerpt { font-size: 12px; }

/* ── FOOTER ── */
.site-footer {
  background: var(--cream3);
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.footer-logo em { font-style: italic; color: var(--green); }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--dim);
  text-decoration: none;
}
.footer-links a:hover { color: var(--green); }
.footer-copy {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .posts-featured, .post-body-wrap { grid-template-columns: 1fr; }
  .post-card-list { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .related-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 1rem; }
}
@media (max-width: 600px) {
  .site-header { padding: 0 1.5rem; }
  .blog-archive-hero, .post-hero { padding: 5rem 1.5rem 2.5rem; }
  .posts-grid-wrap, .post-body-wrap, .related-posts { padding: 2rem 1.5rem; }
  .site-nav .nav-links-group { display: none; }
}
