/* ==========================================================================
   luciusngo.com - personal writing & portfolio
   Clean editorial theme: light, serif-led, generous whitespace. Deliberately
   not a clone of quantscm.vn's dark SaaS system - this is a person, not a firm.
   ========================================================================== */

:root {
  --bg: #FDFCFA;
  --bg-raised: #F5F3EF;
  --border: #E4E0D8;
  --text: #1C1B19;
  --text-secondary: #5C574E;
  --text-muted: #8A8477;
  --accent: #A6432E;          /* muted brick - warm, not corporate blue */
  --accent-hover: #8A3625;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --measure: 680px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  background: var(--bg);
}
.header-row { display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--text); }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-secondary); font-size: 0.95rem; }
.nav a.is-active { color: var(--accent); }

/* --- Section / typography scaffolding --- */
.section { padding: 64px 0; }
.section-header { max-width: var(--measure); margin-bottom: 40px; }
.sub-heading {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.section-title {
  font-family: var(--font-serif); font-size: 2.25rem; font-weight: 600;
  margin: 10px 0 12px; line-height: 1.2;
}
.section-desc { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; }

/* --- Blog listing --- */
.blog-listing { padding-top: 56px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-card-link { color: inherit; display: block; }
.blog-card-link:hover { text-decoration: none; }
.blog-card-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.blog-card-img-blank {
  width: 100%; height: 160px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-raised); color: var(--text-muted); font-size: 1.8rem;
}
.blog-card-body { padding: 18px 20px 22px; }
.blog-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.blog-card-title { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 8px; line-height: 1.35; }
.blog-card-summary { font-size: 0.92rem; color: var(--text-secondary); margin: 0 0 12px; }
.blog-card-cta { font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.blog-empty { color: var(--text-muted); font-style: italic; }
.dot { margin: 0 6px; color: var(--text-muted); }

/* --- Article page --- */
.article { padding-top: 56px; }
.article-back { font-size: 0.9rem; color: var(--text-muted); display: inline-block; margin-bottom: 28px; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.article-title {
  font-family: var(--font-serif); font-size: 2.4rem; line-height: 1.2;
  margin: 0 0 16px; font-weight: 600;
}
.article-summary { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 16px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.article-tag {
  font-size: 0.75rem; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-raised); color: var(--text-secondary);
}
.article-hero { width: 100%; border-radius: var(--radius); margin: 8px 0 32px; }
.article-body { font-family: var(--font-serif); font-size: 1.15rem; color: var(--text); }
.article-body p { margin: 0 0 22px; }
.article-body h2 { font-size: 1.5rem; margin: 40px 0 16px; font-weight: 600; }
.article-body h3 { font-size: 1.2rem; margin: 32px 0 12px; font-weight: 600; }
.article-body blockquote {
  border-left: 3px solid var(--accent); margin: 24px 0; padding: 4px 0 4px 20px;
  color: var(--text-secondary); font-style: italic;
}
.article-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9em;
  background: var(--bg-raised); padding: 2px 6px; border-radius: 4px;
}
.article-body pre {
  background: var(--bg-raised); padding: 16px 20px; border-radius: var(--radius);
  overflow-x: auto; font-size: 0.9rem;
}
.article-body pre code { background: none; padding: 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-family: var(--font-sans); font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article-body img { max-width: 100%; border-radius: var(--radius); }

/* --- Homepage-specific blocks (index.html supplies its own sections) --- */
.hero { padding: 96px 0 64px; }
.hero-title { font-family: var(--font-serif); font-size: 3rem; font-weight: 600; line-height: 1.15; margin: 0 0 20px; }
.hero-lede { font-size: 1.2rem; color: var(--text-secondary); max-width: var(--measure); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .section-title { font-size: 1.8rem; }
  .article-title { font-size: 1.9rem; }
  .hero-title { font-size: 2.2rem; }
}
