/* ════════════════════════════════════════
   content.css — shared styles for
   blog posts & work case studies
   os3li.com
════════════════════════════════════════ */

/* ── 1. TOKENS ── */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;

  /* dark (default) */
  --bg:             #0d0d12;
  --bg-2:           #111118;
  --surface:        rgba(28, 28, 38, 0.92);
  --border:         rgba(255, 255, 255, 0.07);
  --border-2:       rgba(255, 255, 255, 0.12);
  --text-1:         #F2F2F7;
  --text-2:         #AEAEC0;
  --text-3:         #68687E;
  --text-4:         #3D3D50;
  --accent:         #6366F1;
  --accent-2:       #8B5CF6;
  --accent-light:   rgba(99, 102, 241, 0.12);
  --accent-glow:    rgba(99, 102, 241, 0.25);
  --green:          #34D399;
  --green-bg:       rgba(52, 211, 153, 0.10);
  --green-border:   rgba(52, 211, 153, 0.25);

  /* content layout */
  --max-w: 780px;
  --max-w-wide: 960px;
}

[data-theme="light"] {
  --bg:             #EEEEF3;
  --bg-2:           #E4E4EB;
  --surface:        rgba(255, 255, 255, 0.90);
  --border:         rgba(0, 0, 0, 0.07);
  --border-2:       rgba(0, 0, 0, 0.12);
  --text-1:         #1C1C1E;
  --text-2:         #48485A;
  --text-3:         #88889A;
  --text-4:         #B8B8CA;
  --accent:         #5254E8;
  --accent-2:       #7C3AED;
  --accent-light:   rgba(82, 84, 232, 0.10);
  --accent-glow:    rgba(82, 84, 232, 0.18);
  --green:          #16A34A;
  --green-bg:       rgba(22, 163, 74, 0.08);
  --green-border:   rgba(22, 163, 74, 0.20);
}

/* ── 2. BASE RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark light; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur) var(--ease-in-out), color var(--dur) var(--ease-in-out);
}
img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 3. NAVIGATION BAR ── */
.cnt-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 48px);
  height: 56px;
  background: rgba(13,13,18,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--border);
}
[data-theme="light"] .cnt-nav { background: rgba(238,238,243,0.82); }

.cnt-nav-back {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--accent);
  cursor: pointer; transition: opacity var(--dur);
}
.cnt-nav-back:hover { opacity: 0.75; text-decoration: none; }
.cnt-nav-back svg { width: 18px; height: 18px; }

.cnt-nav-logo {
  font-size: 16px; font-weight: 800;
  color: var(--text-1); letter-spacing: -0.03em;
}
.cnt-nav-logo span { color: var(--accent); }

.cnt-nav-right { display: flex; align-items: center; gap: 12px; }

.cnt-theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 0.5px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: background var(--dur);
}
.cnt-theme-btn:hover { background: var(--border-2); }

/* ── 4. PAGE WRAPPER ── */
.cnt-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}
.cnt-wrap-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ── 5. ARTICLE HERO ── */
.cnt-hero { padding: 56px 0 40px; }

.cnt-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cnt-tag {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-light);
  border: 0.5px solid rgba(99,102,241,0.2);
  padding: 4px 12px; border-radius: 100px;
}

.cnt-hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800; letter-spacing: -0.04em;
  color: var(--text-1); line-height: 1.18;
  margin-bottom: 16px;
}
.cnt-hero-sub {
  font-size: 18px; color: var(--text-2);
  line-height: 1.65; max-width: 580px; margin-bottom: 28px;
}

.cnt-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-3);
  padding-bottom: 28px;
  border-bottom: 0.5px solid var(--border);
}
.cnt-meta-author {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--text-2);
}
.cnt-meta-author-av {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff;
}
.cnt-meta-dot { opacity: 0.3; }
.cnt-meta-avail {
  display: flex; align-items: center; gap: 6px;
  color: var(--green); font-weight: 600;
}
.cnt-meta-avail::before {
  content: ''; display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--green);
}

/* ── 6. COVER IMAGE ── */
.cnt-cover {
  width: 100%; height: clamp(200px, 30vw, 380px);
  border-radius: 18px; overflow: hidden;
  margin-bottom: 48px; border: 0.5px solid var(--border);
}
.cnt-cover-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ── 7. ARTICLE BODY ── */
.cnt-body {
  display: flex; flex-direction: column;
  gap: 24px;
  font-size: 16px; color: var(--text-2);
  line-height: 1.78;
}
.cnt-body h2 {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--text-1);
  margin-top: 16px;
}
.cnt-body h3 {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-1);
}
.cnt-body p { max-width: 72ch; }
.cnt-body strong { color: var(--text-1); }
.cnt-body a { color: var(--accent); font-weight: 600; }
.cnt-body ul, .cnt-body ol {
  padding-left: 20px; display: flex; flex-direction: column; gap: 6px;
}
.cnt-body li { color: var(--text-2); }
.cnt-body blockquote {
  padding: 16px 20px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 17px; font-style: italic; color: var(--text-2);
}

/* Code */
.cnt-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.87em;
  background: var(--surface); border: 0.5px solid var(--border);
  padding: 2px 6px; border-radius: 5px;
  color: var(--accent-2);
}
.cnt-body pre {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 20px;
  overflow-x: auto;
}
.cnt-body pre code {
  background: none; border: none; padding: 0;
  font-size: 14px; color: var(--text-2);
}

/* Image caption */
.cnt-img-wrap { display: flex; flex-direction: column; gap: 8px; }
.cnt-img-cap {
  font-size: 12px; color: var(--text-4);
  text-align: center; font-style: italic;
}

/* ── 8. CALLOUT CARDS ── */
.cnt-callout {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.cnt-callout-ic { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.cnt-callout p { font-size: 15px; color: var(--text-2); line-height: 1.65; margin: 0; }

/* ── 9. STATS ROW (case studies) ── */
.cnt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 32px 0;
}
.cnt-stat {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px; padding: 18px 16px;
  text-align: center;
}
.cnt-stat-num {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.04em; color: var(--accent);
  line-height: 1;
}
.cnt-stat-label {
  font-size: 12px; color: var(--text-3);
  margin-top: 5px; font-weight: 500;
}

/* ── 10. PROCESS STEPS ── */
.cnt-steps { display: flex; flex-direction: column; gap: 14px; }
.cnt-step {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.cnt-step-num {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-light); border: 0.5px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--accent);
}
.cnt-step-body { flex: 1; }
.cnt-step-body strong { font-size: 14px; font-weight: 700; color: var(--text-1); display: block; margin-bottom: 4px; }
.cnt-step-body p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0; }

/* ── 11. SECTION DIVIDER ── */
.cnt-divider {
  border: none; height: 0.5px;
  background: var(--border); margin: 24px 0;
}

/* ── 12. FOOTER CTA ── */
.cnt-footer-cta {
  margin: 56px 0 64px; padding: 36px 32px;
  background: var(--surface); border: 0.5px solid var(--border-2);
  border-radius: 20px; text-align: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, transparent 100%);
}
.cnt-footer-cta h2 {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--text-1); margin-bottom: 8px;
}
.cnt-footer-cta p { font-size: 15px; color: var(--text-2); margin-bottom: 22px; }
.cnt-footer-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cnt-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity 180ms, transform 180ms;
}
.cnt-btn:hover { opacity: 0.85; text-decoration: none; }
.cnt-btn:active { transform: scale(0.97); }
.cnt-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 6px 18px var(--accent-glow);
}
.cnt-btn-secondary {
  background: var(--surface); border: 0.5px solid var(--border-2); color: var(--text-1);
}

/* ── 13. BACK TO LIST / NEXT POST ── */
.cnt-post-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; border-top: 0.5px solid var(--border);
  margin-bottom: 48px; gap: 16px; flex-wrap: wrap;
}
.cnt-post-nav a {
  font-size: 13px; font-weight: 700; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.cnt-post-nav a:hover { text-decoration: none; opacity: 0.75; }

/* ── 14. LISTING PAGE ── */
.cnt-listing-hero { padding: 56px 0 32px; }
.cnt-listing-hero h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800;
  letter-spacing: -0.04em; color: var(--text-1); margin-bottom: 12px;
}
.cnt-listing-hero p { font-size: 18px; color: var(--text-2); max-width: 500px; }

.cnt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; padding-bottom: 64px;
}
.cnt-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 18px; overflow: hidden; display: block;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.cnt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  text-decoration: none;
}
.cnt-card-cover {
  height: 180px; display: flex;
  align-items: flex-end; padding: 14px;
}
.cnt-card-cover-badge {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
  padding: 3px 10px; border-radius: 100px;
  border: 0.5px solid rgba(255,255,255,0.15);
}
.cnt-card-body { padding: 16px 18px 20px; }
.cnt-card-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cnt-card-tag {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-light); padding: 2px 9px; border-radius: 100px;
}
.cnt-card-date { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.cnt-card h3 {
  font-size: 17px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.025em; margin-bottom: 6px; line-height: 1.35;
}
.cnt-card p {
  font-size: 13.5px; color: var(--text-2);
  line-height: 1.6; margin-bottom: 12px;
}
.cnt-card-cta { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ── 15. READING TIME / BREADCRUMB ── */
.cnt-breadcrumb {
  font-size: 12.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 20px;
}
.cnt-breadcrumb a { color: var(--text-3); }
.cnt-breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.cnt-breadcrumb-sep { opacity: 0.3; }

/* ── 16. RELATED POSTS ── */
.cnt-related {
  margin: 48px 0 0;
  padding-top: 40px;
  border-top: 0.5px solid var(--border);
}
.cnt-related-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 20px;
}
.cnt-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.cnt-related-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 0.5px solid var(--border);
  transition: transform 160ms var(--ease-spring), box-shadow 160ms;
  text-decoration: none;
  color: inherit;
}
.cnt-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  text-decoration: none;
}
.cnt-related-card-cover {
  height: 80px;
}
.cnt-related-card-body {
  padding: 12px 14px 16px;
}
.cnt-related-card-body h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin: 6px 0 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* ── 16b. PAGE FOOTER ── */
.cnt-page-footer {
  border-top: 0.5px solid var(--border);
  padding: 28px clamp(20px, 5vw, 48px);
  text-align: center; font-size: 12px; color: var(--text-4);
}
.cnt-page-footer a { color: var(--accent); font-weight: 600; }

/* ── 17. RESPONSIVE ── */
@media (max-width: 640px) {
  .cnt-hero h1 { font-size: 28px; }
  .cnt-hero-sub { font-size: 16px; }
  .cnt-stats { grid-template-columns: 1fr 1fr; }
  .cnt-footer-cta { padding: 28px 20px; }
  .cnt-footer-cta-btns { flex-direction: column; align-items: stretch; }
  .cnt-btn { justify-content: center; }
}

/* ── 18. PRINT ── */
@media print {
  .cnt-nav, .cnt-footer-cta, .cnt-post-nav { display: none; }
  body { color: #000; background: #fff; }
}
