/* Systems Detective — Writing (blog) stylesheet
   Shares the brand tokens with the main site so every post stays on-brand. */
:root {
  --navy: #0D1B2A;
  --navy-mid: #1B2A4A;
  --navy-light: #243B5E;
  --gold: #C5A55A;
  --gold-light: #D4C08A;
  --white: #F5F5F5;
  --text: #E8E8E8;
  --muted: #9AA5B4;
  --font-ui: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

/* NAV (mirrors the homepage) */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 27, 42, 0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-light);
  padding: 0 60px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono); font-size: 0.85em; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--white);
  display: inline-flex; align-items: center; gap: 11px;
}
.nav-logo-img { height: 32px; width: auto; display: block; flex-shrink: 0; }
.nav-logo .dot { color: var(--gold); margin: 0 6px; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--muted); font-size: 0.76em; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: var(--gold); color: var(--navy) !important;
  padding: 11px 24px; font-size: 0.74em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; border-radius: 3px;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--gold-light); color: var(--navy) !important; transform: translateY(-1px); }
@media (max-width: 768px) { nav { padding: 0 24px; height: 64px; } .nav-links { display: none; } }

/* SHELL */
.wrap { max-width: 860px; margin: 0 auto; padding: 150px 60px 90px; }
.accent-line { width: 60px; height: 3px; background: var(--gold); margin-bottom: 22px; }
.section-tag {
  font-family: var(--font-mono); font-size: 0.7em; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 16px;
}
@media (max-width: 768px) { .wrap { padding: 120px 24px 70px; } }

/* WRITING INDEX */
.writing-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: var(--white); line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.writing-intro { font-size: 1.1em; color: var(--muted); max-width: 620px; line-height: 1.8; margin-bottom: 64px; }
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-card {
  display: block; padding: 34px 0; border-top: 1px solid var(--navy-light);
  transition: padding-left 0.2s;
}
.post-card:last-child { border-bottom: 1px solid var(--navy-light); }
.post-card:hover { padding-left: 10px; }
.post-meta {
  font-family: var(--font-mono); font-size: 0.72em; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.post-card h2 {
  font-family: var(--font-display); font-size: 1.7em; color: var(--white);
  line-height: 1.25; margin-bottom: 12px; font-weight: 700;
}
.post-card:hover h2 { color: var(--gold-light); }
.post-card p { color: var(--text); font-size: 0.98em; line-height: 1.7; max-width: 640px; }
.post-card .more {
  display: inline-block; margin-top: 16px; font-family: var(--font-mono);
  font-size: 0.74em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
}
.empty-state {
  padding: 40px 0; border-top: 1px solid var(--navy-light);
  font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: 1.1em;
}

/* ARTICLE */
.article-head { margin-bottom: 48px; }
.article-meta {
  font-family: var(--font-mono); font-size: 0.74em; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.article-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800; color: var(--white); line-height: 1.12; letter-spacing: -0.02em;
}
.article-body { font-size: 1.08em; line-height: 1.85; color: var(--text); }
.article-body p { margin-bottom: 24px; }
.article-body h2 {
  font-family: var(--font-display); font-size: 1.55em; color: var(--gold);
  margin: 44px 0 18px; line-height: 1.3; font-weight: 700;
}
.article-body h3 {
  font-family: var(--font-display); font-size: 1.25em; color: var(--gold-light);
  margin: 32px 0 14px; line-height: 1.35; font-weight: 700;
}
.article-body ul, .article-body ol { margin: 0 0 24px 24px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
  border-left: 3px solid var(--gold); padding: 6px 0 6px 26px; margin: 0 0 24px;
  font-family: var(--font-display); font-style: italic; color: var(--gold-light); font-size: 1.1em;
}
.article-body strong { color: var(--white); font-weight: 600; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body figure {
  margin: 36px auto;
  max-width: 680px;            /* contained, never dominates the column */
  text-align: center;
}
.article-body img {
  max-width: 100%;             /* responsive: shrinks on mobile, never upscales */
  height: auto;
  display: inline-block;
  border-radius: 6px;
  border: 1px solid var(--navy-light);
}
.article-body figcaption {
  font-family: var(--font-mono); font-size: 0.72em; color: var(--muted);
  letter-spacing: 0.04em; margin-top: 10px; text-align: center; line-height: 1.5;
}
.article-hero { max-width: 760px; margin: 8px auto 44px; }
@media (max-width: 768px) {
  .article-body figure, .article-hero { max-width: 100%; }
}
.article-foot {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--navy-light);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 0.76em; letter-spacing: 0.10em; text-transform: uppercase;
}
.article-foot .syndication { color: var(--muted); text-transform: none; font-family: var(--font-ui); letter-spacing: 0; font-style: italic; }

/* FOOTER */
footer { padding: 56px 60px 44px; border-top: 1px solid var(--navy-light); background: var(--navy); }
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer-row-1 { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.footer-brand {
  font-family: var(--font-mono); font-size: 0.88em; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--white);
  display: inline-flex; align-items: center; gap: 11px;
}
.footer-logo-img { height: 28px; width: auto; display: block; }
.footer-brand .dot { color: var(--gold); margin: 0 6px; }
.footer-links { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-family: var(--font-mono); font-size: 0.7em; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { text-align: center; padding-top: 20px; font-family: var(--font-mono); font-size: 0.68em; color: var(--muted); letter-spacing: 0.12em; }
@media (max-width: 768px) { footer { padding: 48px 24px 32px; } .footer-row-1 { flex-direction: column; text-align: center; } }

/* ============================================
   PROJECTS + ABOUT pages
   ============================================ */
.page-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: var(--white); line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.page-intro { font-size: 1.1em; color: var(--muted); max-width: 640px; line-height: 1.8; margin-bottom: 56px; }

.proj-group { margin-bottom: 56px; }
.proj-group-tag {
  font-family: var(--font-mono); font-size: 0.72em; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 22px;
  padding-bottom: 12px; border-bottom: 1px solid var(--navy-light);
}
.proj-card {
  display: block; padding: 26px 28px; margin-bottom: 16px;
  background: var(--navy-mid); border: 1px solid var(--navy-light);
  border-left: 3px solid var(--gold); border-radius: 6px; transition: all 0.2s;
}
.proj-card:hover { border-color: rgba(197,165,90,0.4); transform: translateY(-2px); }
.proj-card h3 {
  font-family: var(--font-display); font-size: 1.3em; color: var(--white);
  margin-bottom: 10px; font-weight: 700; line-height: 1.3;
}
.proj-card p { color: var(--text); font-size: 0.97em; line-height: 1.7; margin-bottom: 14px; }
.proj-card .proj-link {
  font-family: var(--font-mono); font-size: 0.74em; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}

.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.about-mark {
  background: var(--navy-mid); border: 1px solid var(--navy-light);
  border-radius: 6px; padding: 44px 32px; text-align: center; position: sticky; top: 100px;
}
.about-mark img { width: 96px; height: 96px; margin: 0 auto 18px; display: block; }
.about-mark .name { font-family: var(--font-display); font-size: 1.3em; color: var(--white); font-weight: 700; margin-bottom: 4px; }
.about-mark .epithet { font-family: var(--font-mono); font-size: 0.72em; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-bottom: 22px; }
.about-mark .fact { font-family: var(--font-mono); font-size: 0.74em; color: var(--muted); line-height: 2; text-align: left; border-top: 1px solid var(--navy-light); padding-top: 18px; }
.about-mark .fact strong { color: var(--gold-light); font-weight: 600; }
.about-prose p { font-size: 1.04em; color: var(--text); line-height: 1.85; margin-bottom: 22px; }
.about-prose p:first-child { font-size: 1.18em; color: var(--white); }
.about-prose h2 { font-family: var(--font-display); font-size: 1.4em; color: var(--gold); margin: 38px 0 16px; font-weight: 700; }
.about-prose strong { color: var(--white); font-weight: 600; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-mark { position: static; max-width: 320px; }
}

/* ============================================
   About hero + stats + premium project cards (v3)
   ============================================ */
.epithet-line {
  font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin: -6px 0 30px;
}
.about-lead {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.5;
  color: var(--gold-light); margin: 0 0 44px; max-width: 760px;
}
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 54px; }
.stat {
  flex: 1 1 150px; min-width: 150px; background: var(--navy-mid);
  border: 1px solid var(--navy-light); border-left: 3px solid var(--gold);
  border-radius: 5px; padding: 16px 18px;
}
.stat .n { font-family: var(--font-display); font-weight: 700; font-size: 1.4em; color: var(--gold); line-height: 1.1; display: block; }
.stat .l { font-family: var(--font-mono); font-size: 0.66em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; display: block; line-height: 1.45; }
.stat.stat-wide { flex-basis: 100%; }
.about-prose .about-lead + p, .about-prose p:first-of-type { font-size: 1.04em; color: var(--text); }

/* premium project cards */
.proj-card { padding: 34px 32px; }
.proj-card .proj-tag { font-family: var(--font-mono); font-size: 0.7em; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 12px; }
.proj-card.featured { border-color: var(--gold); background: linear-gradient(135deg, var(--navy-mid) 0%, rgba(197,165,90,0.05) 100%); }
.proj-why { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--navy-light); }
.proj-why strong { display: block; font-family: var(--font-mono); font-size: 0.7em; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.proj-why span { color: var(--muted); font-size: 0.93em; line-height: 1.7; }
.proj-note {
  margin-top: 8px; padding: 28px 32px; background: rgba(197,165,90,0.04);
  border: 1px solid rgba(197,165,90,0.2); border-radius: 6px;
  font-family: var(--font-display); font-style: italic; font-size: 1.05em;
  color: var(--gold-light); line-height: 1.7;
}
