/* ════════════════════════════════════════════════════════════════
   Digital Transformation Advisory — Design Standard
   ════════════════════════════════════════════════════════════════
   Brand colours:
     Primary:   #0096FF  (headlines, links, accents)
     Text:      #1A1A1A  (body copy — near-black for readability)
     Muted:     #AAAAAA  (secondary text, captions, metadata)
     Surface:   #FFFFFF  (backgrounds, cards)
     Code bg:   #F5F5F7  (subtle warm grey, Apple-style)
     Border:    #E5E5E5  (light dividers)
     Dark bg:   #1A1A2E  (code blocks — dark with slight blue)
   ════════════════════════════════════════════════════════════════ */

:root {
  --brand: #0096FF;
  --brand-light: #E8F4FF;
  --brand-dark: #0078CC;
  --text: #1A1A1A;
  --bg: #FFFFFF;
  --muted: #AAAAAA;
  --border: #E5E5E5;
  --code-bg: #F5F5F7;
  --code-dark: #1A1A2E;
  --max-width: 48rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ─────────────────────────────────── */
.site-header { border-bottom: 2px solid var(--brand); padding: 1rem 0; }
.site-header nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.site-title { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.nav-links { list-style: none; display: flex; gap: 1.25rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--brand); }

/* ── Main ───────────────────────────────────── */
main { padding: 2rem 0 4rem; }

/* ── Home ───────────────────────────────────── */
.site-heading { font-size: 1.75rem; margin-bottom: 0.25rem; color: var(--text); }
.site-description { color: var(--muted); margin-bottom: 2.5rem; font-size: 1rem; }

.post-preview { margin-bottom: 2.25rem; padding-bottom: 2.25rem; border-bottom: 1px solid var(--border); }
.post-preview:last-child { border-bottom: none; }
.post-preview h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.post-preview h2 a { color: var(--text); text-decoration: none; transition: color 0.15s ease; }
.post-preview h2 a:hover { color: var(--brand); }
.post-preview time { font-size: 0.85rem; color: var(--muted); }
.post-preview p { margin-top: 0.5rem; color: #444; }

/* ── Post ───────────────────────────────────── */
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; line-height: 1.25; margin-bottom: 0.5rem; color: var(--brand); }
.post-header time { font-size: 0.9rem; color: var(--muted); }

.post-content h2 { font-size: 1.45rem; margin: 2.5rem 0 0.75rem; color: var(--brand); border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
.post-content h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; color: var(--text); }
.post-content h4 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; color: var(--text); }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0.75rem 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.35rem; }
.post-content blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.5rem 1rem;
  margin: 1.25rem 0;
  color: #555;
  background: var(--brand-light);
}
.post-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 1rem 0; }
.post-content a { color: var(--brand); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
.post-content a:hover { border-bottom-color: var(--brand); }

/* ── Code ───────────────────────────────────── */
.post-content code {
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  color: var(--brand-dark);
}
.post-content pre {
  background: var(--code-dark);
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.25rem 0;
  line-height: 1.5;
  border-left: 3px solid var(--brand);
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

/* ── Tables ─────────────────────────────────── */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
.post-content th, .post-content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content th { background: var(--brand-light); font-weight: 600; color: var(--text); }
.post-content tr:nth-child(even) { background: #FAFAFA; }

/* ── Diagrams & Figures ─────────────────────── */
.post-content figure {
  margin: 2rem 0;
  text-align: center;
}
.post-content figure img {
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  background: var(--bg);
}
.post-content figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-style: italic;
}
.post-content figcaption a { color: var(--muted); border-bottom-color: var(--muted); }
.post-content figcaption a:hover { color: var(--brand); }

/* ── Tags ───────────────────────────────────── */
.post-tags { margin-top: 0.5rem; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--brand-light);
  color: var(--brand);
  padding: 0.15em 0.55em;
  border-radius: 3px;
  margin-right: 0.35rem;
  font-weight: 500;
}

/* ── Pagination ─────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.pagination a { color: var(--brand); text-decoration: none; }
.pagination a:hover { color: var(--brand-dark); }
.pagination span { color: var(--muted); font-size: 0.9rem; }

/* ── Search ─────────────────────────────────── */
.search-input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s ease;
}
.search-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(0, 150, 255, 0.1); }
.search-results { list-style: none; }
.search-results li { margin-bottom: 1.5rem; }
.search-results h3 { font-size: 1.1rem; }
.search-results time { font-size: 0.85rem; color: var(--muted); }

/* ── Footer ─────────────────────────────────── */
.site-footer { border-top: 2px solid var(--brand); padding: 1.5rem 0; text-align: center; color: var(--muted); font-size: 0.85rem; }

/* ── Strong / Bold accent ───────────────────── */
.post-content strong { color: var(--text); }

/* ── Horizontal rules ───────────────────────── */
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 600px) {
  .site-header nav { flex-direction: column; align-items: flex-start; }
  .nav-links { flex-wrap: wrap; gap: 0.75rem; }
  .post-header h1 { font-size: 1.5rem; }
  .post-content figure img { padding: 0.5rem; }
}
