/* ─────────────────────────────────────────────
   Bryant Nankee — Blog
   Shares the portfolio palette + type, but its
   own editorial layout (distinct blog look).
   ───────────────────────────────────────────── */

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

:root {
  --bg:           #F4F0E6;
  --bg-card:      #EDE9DF;
  --bg-card-alt:  #E5E1D6;
  --text:         #1C1916;
  --text-muted:   #7A6E5F;
  --text-sub:     #5A5047;
  --accent:       #C85218;
  --accent-dark:  #A84010;
  --accent-bg:    rgba(200, 82, 24, 0.07);
  --border:       #CEC8B4;
  --border-mid:   #AEA896;
  --rule:         #D0CAB8;
  --r:            4px;
  --measure:      66ch;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

a { color: inherit; }
img { max-width: 100%; }

.mono {
  font-family: 'DM Mono', monospace;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-left { display: flex; align-items: center; gap: 16px; }
.nav-monogram {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 900; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.nav-sep { width: 1px; height: 16px; background: var(--border); }
.nav-role {
  font-family: 'DM Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-link {
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--text-muted); text-decoration: none;
  padding: 6px 14px; transition: color 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-cta {
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bg); background: var(--text);
  padding: 8px 18px; text-decoration: none;
  border-radius: var(--r); transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px; margin-right: -8px;
  background: none; border: none;
}
.nav-hamburger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
  border-radius: 1px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 13px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s, background 0.15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); background: var(--bg-card); }
.mobile-menu a.active { color: var(--accent); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-role { display: none; }
  .nav-hamburger { display: flex; }
  nav { padding: 0 20px; }
}

/* ─── SCROLL PROGRESS ─── */
#scroll-progress {
  position: fixed; top: 56px; left: 0;
  height: 3px; width: 0%;
  background: var(--accent); z-index: 101;
  transition: width 0.08s linear; pointer-events: none;
}

/* ─── SHELL ─── */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 128px 32px 96px;
}
@media (max-width: 600px) { .wrap { padding: 96px 20px 72px; } }

/* ─── BLOG INDEX ─── */
.blog-masthead { margin-bottom: 64px; }
.blog-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.blog-masthead h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(48px, 9vw, 84px);
  font-weight: 900; line-height: 0.92; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.blog-masthead p {
  font-size: 18px; color: var(--text-sub);
  max-width: 52ch; line-height: 1.6;
}

.post-list { display: flex; flex-direction: column; }
.post-item {
  display: block;
  text-decoration: none;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.2s ease;
}
.post-item:last-child { border-bottom: 1px solid var(--rule); }
.post-item:hover { padding-left: 10px; }
.post-item:hover .post-item-title { color: var(--accent); }
.post-item-thumb-wrap {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 22px;
}
.post-item-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.9 / 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.post-item:hover .post-item-thumb { transform: scale(1.03); }
@media (max-width: 640px) {
  .post-item:hover { padding-left: 0; }
}
.post-meta-row {
  display: flex; gap: 14px; align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.post-tag { color: var(--accent); }
.post-item-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 10px;
  transition: color 0.15s;
}
.post-item-excerpt {
  font-size: 16px; color: var(--text-sub); max-width: 60ch; line-height: 1.6;
}
.post-item-more {
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: var(--accent); margin-top: 14px;
  display: inline-block;
}

/* ─── ARTICLE ─── */
.article-header { margin-bottom: 40px; }
.article-hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.9 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 6px 0 28px;
}
.back-link {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 40px; transition: color 0.15s, gap 0.15s;
}
.back-link:hover { color: var(--accent); gap: 12px; }
.article-dateline {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 22px;
}
.article-header h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 900; line-height: 0.98; letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.article-standfirst {
  font-size: clamp(19px, 2.4vw, 22px);
  color: var(--text-sub); line-height: 1.55;
  font-weight: 400; max-width: 60ch;
}

/* Body typography */
.article-body { font-size: 18px; color: var(--text); }
.article-body > * { max-width: var(--measure); }
.article-body p { margin: 0 0 24px; line-height: 1.72; }
.article-body h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.01em;
  margin: 56px 0 18px;
}
.article-body h3 {
  font-family: 'Barlow', sans-serif;
  font-size: 20px; font-weight: 600;
  margin: 36px 0 12px;
}
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { color: var(--accent-dark); }
.article-body strong { font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 24px; }
.article-body li { margin-bottom: 10px; line-height: 1.65; }
.article-body ul li::marker { color: var(--accent); }

/* Section rule / lede label */
.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); display: block;
  margin: 56px 0 -6px;
}

/* Figures / inline diagrams — allowed wider than the text measure */
.article-body .figure { max-width: 100%; margin: 44px 0; }
.figure svg { width: 100%; height: auto; display: block; }
.figure-caption {
  font-family: 'DM Mono', monospace;
  font-size: 12px; line-height: 1.5;
  color: var(--text-muted);
  margin-top: 14px; text-align: center;
  max-width: 54ch; margin-left: auto; margin-right: auto;
}

/* Pull quote */
.pull {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 36px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
  color: var(--text);
}

/* Callout / aside box */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 32px 0;
}
.callout .callout-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.callout p { margin: 0; font-size: 16px; color: var(--text-sub); }

/* Code / terminal block */
.terminal {
  background: #1C1916;
  border-radius: 8px;
  margin: 32px 0;
  overflow: hidden;
  max-width: 100%;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dot.r { background: #E06A54; }
.terminal-dot.y { background: #E0B23C; }
.terminal-dot.g { background: #6FB86B; }
.terminal-title {
  font-family: 'DM Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.4);
  margin-left: 8px; letter-spacing: 0.04em;
}
.terminal pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'DM Mono', monospace;
  font-size: 13.5px; line-height: 1.7;
  color: #E5E1D6;
}
.terminal pre .c { color: #8FA88C; }   /* comment */
.terminal pre .p { color: #E0965A; }   /* prompt / accent */
.terminal pre .k { color: #E0B23C; }   /* keyword */

/* Stack / spec grid */
.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  margin: 32px 0;
  max-width: 100%;
}
.spec-cell { background: var(--bg-card); padding: 18px 20px; }
.spec-cell .spec-k {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.spec-cell .spec-v { font-size: 16px; font-weight: 600; color: var(--text); }
.spec-cell .spec-note { font-size: 13px; color: var(--text-sub); margin-top: 3px; }

/* Article footer / next steps */
.article-foot {
  margin-top: 72px; padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.article-foot .foot-cta {
  font-size: 17px; color: var(--text-sub);
}
.article-foot .foot-cta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.article-foot .foot-cta a:hover { text-decoration: underline; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--rule);
  padding: 24px 48px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 11px; color: var(--text-muted);
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
@media (max-width: 600px) { footer { padding: 16px 20px; flex-direction: column; gap: 8px; align-items: flex-start; } }
