/* ---------- MBK Agent · Blog ---------- */
:root {
  --brown-900: #1E1915;
  --brown-800: #2A241F;   /* brand dark — from hero-card */
  --brown-700: #3A3229;
  --brown-600: #564a3f;
  --cream-50:  #FAF5EC;
  --cream-100: #F5EDE2;
  --cream-200: #ECDFCB;
  --cream-300: #D9C6A8;
  --orange:    #FF6A2B;
  --orange-soft:#FF8A4F;
  --yellow:    #FFC24D;
  --yellow-soft:#FFD680;
  --ink:       #1E1915;
  --ink-60:    rgba(30,25,21,0.6);
  --ink-40:    rgba(30,25,21,0.4);
  --ink-12:    rgba(30,25,21,0.12);
  --ink-06:    rgba(30,25,21,0.06);
  --paper:     var(--cream-100);

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-card: 0 1px 0 rgba(30,25,21,0.04), 0 8px 24px -12px rgba(30,25,21,0.15);
  --shadow-hover: 0 2px 0 rgba(30,25,21,0.05), 0 24px 48px -20px rgba(30,25,21,0.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: -0.01em; }

/* Reading-progress bar at very top */
.reading-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  z-index: 100;
  transition: width 120ms linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,237,226,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-06);
}
.site-header__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
}
.logo__mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brown-800);
  display: grid; place-items: center;
  position: relative;
  color: var(--cream-50);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; font-weight: 600;
}
.logo__mark::after {
  content: ''; position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--paper);
}
.logo__sub { font-size: 11px; font-weight: 500; color: var(--ink-60); letter-spacing: 0.02em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-60);
  transition: all 160ms ease;
}
.nav__link:hover { color: var(--ink); background: var(--ink-06); }
.nav__link--active { color: var(--ink); background: var(--brown-800); color: var(--cream-50); }
.header-cta {
  padding: 10px 18px; border-radius: 999px;
  background: var(--brown-800); color: var(--cream-50);
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.header-cta__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(255,106,43,0.25); }

/* ---------- Hero ---------- */
.blog-hero {
  max-width: 1280px; margin: 28px auto 0;
  padding: 0 32px;
}
.blog-hero__card {
  background: var(--brown-800);
  color: var(--cream-50);
  border-radius: var(--radius-l);
  padding: 56px 56px 48px;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  min-height: 420px;
}
.blog-hero__eyebrow {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.blog-hero__eyebrow::before {
  content: ''; width: 28px; height: 1px; background: var(--yellow); opacity: 0.6;
}
.blog-hero__title {
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 700; margin: 0 0 20px;
}
.blog-hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--orange) 0%, var(--yellow) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.blog-hero__desc {
  font-size: 17px; line-height: 1.55;
  color: rgba(245,237,226,0.7);
  max-width: 520px; margin: 0 0 28px;
}
.hero-stats {
  display: flex; gap: 40px; margin-top: auto;
  padding-top: 24px; border-top: 1px solid rgba(245,237,226,0.12);
}
.hero-stat__n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px; font-weight: 500; letter-spacing: -0.03em;
  color: var(--cream-50);
}
.hero-stat__l { font-size: 12px; color: rgba(245,237,226,0.55); margin-top: 2px; }

/* Hero right column — latest article teaser */
.hero-latest {
  display: flex; flex-direction: column;
  background: rgba(245,237,226,0.05);
  border: 1px solid rgba(245,237,226,0.1);
  border-radius: var(--radius-m);
  padding: 24px; position: relative;
  transition: all 260ms ease; cursor: pointer;
}
.hero-latest:hover { background: rgba(245,237,226,0.08); transform: translateY(-2px); }
.hero-latest__tag {
  align-self: flex-start;
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: var(--orange); color: var(--brown-900); font-weight: 700;
  margin-bottom: 16px;
}
.hero-latest__title {
  font-size: 22px; line-height: 1.2; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 12px;
}
.hero-latest__meta {
  font-size: 12px; color: rgba(245,237,226,0.6);
  display: flex; gap: 12px; margin-top: auto;
  padding-top: 16px; border-top: 1px solid rgba(245,237,226,0.08);
}
.hero-latest__arrow {
  position: absolute; top: 24px; right: 24px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream-50); color: var(--brown-900);
  display: grid; place-items: center;
  transition: transform 220ms cubic-bezier(.5,0,.2,1);
}
.hero-latest:hover .hero-latest__arrow { transform: rotate(-45deg) scale(1.05); }

/* Decorative grid pattern in hero */
.hero-pattern {
  position: absolute; top: -40px; right: -40px;
  width: 320px; height: 320px; pointer-events: none;
  opacity: 0.08;
}

/* ---------- Filters bar ---------- */
.filters {
  max-width: 1280px; margin: 48px auto 0;
  padding: 0 32px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.filters__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  background: transparent; color: var(--ink-60);
  border: 1px solid var(--ink-12);
  transition: all 160ms ease;
  display: flex; align-items: center; gap: 8px;
}
.chip:hover { color: var(--ink); border-color: var(--ink-40); }
.chip--active {
  background: var(--brown-800); color: var(--cream-50);
  border-color: var(--brown-800);
}
.chip__count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; opacity: 0.7;
}
.filters__spacer { flex: 1; }
.search-wrap {
  position: relative; display: flex; align-items: center;
  min-width: 260px;
}
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 38px;
  border-radius: 999px; border: 1px solid var(--ink-12);
  background: rgba(255,255,255,0.5); font-size: 14px;
  outline: none; transition: border-color 160ms ease, background 160ms ease;
}
.search-wrap input:focus { border-color: var(--brown-800); background: #fff; }
.search-wrap svg { position: absolute; left: 14px; color: var(--ink-40); pointer-events: none; }

.sort-btn {
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--ink-12); font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  background: transparent;
}
.sort-btn:hover { border-color: var(--ink-40); }
.sort-btn .mono { color: var(--ink); font-weight: 500; }

/* ---------- Grid ---------- */
.grid {
  max-width: 1280px; margin: 28px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.grid.compact { gap: 16px; }

.article {
  grid-column: span 4;
  background: #fff;
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--ink-06);
  transition: transform 260ms cubic-bezier(.5,0,.2,1), box-shadow 260ms ease;
  cursor: pointer; position: relative;
}
.article:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.article--featured { grid-column: span 8; grid-row: span 2; }
.article--wide { grid-column: span 6; }

.article__cover {
  aspect-ratio: 16/9;
  position: relative; overflow: hidden;
  background: var(--cream-200);
}
.article--featured .article__cover { aspect-ratio: 16/10; }
.article__cover-label {
  position: absolute; left: 14px; top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; padding: 4px 10px;
  background: rgba(30,25,21,0.85); color: var(--cream-50);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.article__save {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: grid; place-items: center;
  color: var(--ink-60);
  transition: all 180ms ease;
  backdrop-filter: blur(4px);
}
.article__save:hover { background: #fff; color: var(--ink); transform: scale(1.08); }
.article__save.on { background: var(--orange); color: #fff; }

.article__body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; flex: 1;
}
.article__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-60); margin-bottom: 10px;
}
.article__cat {
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 11px; color: var(--orange); font-weight: 600;
}
.article__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-40); }
.article__title {
  font-size: 19px; line-height: 1.25; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 10px;
  text-wrap: pretty;
}
.article--featured .article__title { font-size: 32px; line-height: 1.1; letter-spacing: -0.025em; }
.article--wide .article__title { font-size: 22px; }
.article__excerpt {
  font-size: 14px; line-height: 1.5;
  color: var(--ink-60); margin: 0 0 auto;
}
.article--featured .article__excerpt { font-size: 16px; }

/* Featured-card "what's inside" preview — extracted from article H2s.
   Fills the dead vertical space the wider featured layout left behind
   when the cover was tall but body was just title+excerpt+footer. */
.article__highlights {
  margin: 18px 0 0;
  padding: 16px 18px;
  background: rgba(247, 119, 0, 0.04);
  border-left: 2px solid var(--orange);
  border-radius: 0 8px 8px 0;
}
.article__highlights-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-60);
  margin-bottom: 10px; font-weight: 600;
}
.article__highlights-list {
  margin: 0; padding: 0; list-style: none;
}
.article__highlights-list li {
  position: relative;
  padding: 4px 0 4px 18px;
  font-size: 13.5px; line-height: 1.4;
  color: var(--ink-80);
  border-bottom: 1px dashed rgba(0,0,0,0.05);
}
.article__highlights-list li:last-child { border-bottom: none; }
.article__highlights-list li::before {
  content: "·";
  position: absolute; left: 6px; top: 4px;
  color: var(--orange);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

/* Standalone CTA between excerpt/highlights and the footer */
.article__cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 16px 0 0;
  font-size: 13px; font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.01em;
  align-self: flex-start;
}
.article--featured:hover .article__cta {
  gap: 10px;
  transition: gap .18s ease;
}
.article__footer {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--ink-06);
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
}
.author-chip {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink);
}
.author-chip__avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--brown-900);
}
.read-time {
  margin-left: auto; color: var(--ink-60);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
}
.like-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--ink-60); font-size: 12px;
  padding: 4px 8px; border-radius: 999px;
  transition: all 160ms ease;
}
.like-btn:hover { background: var(--ink-06); color: var(--ink); }
.like-btn.on { color: var(--orange); }
.like-btn.on svg { fill: var(--orange); stroke: var(--orange); }
.like-btn .n { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }

/* ---------- Covers (placeholder styles) ---------- */
.cover-art {
  width: 100%; height: 100%; position: relative;
  display: grid; place-items: center;
}
.cover-art__label {
  position: absolute; inset: auto 0 14px 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: rgba(30,25,21,0.55); letter-spacing: 0.02em;
}
.cover-gradient-orange {
  background:
    radial-gradient(120% 90% at 20% 100%, #FFD680 0%, transparent 50%),
    radial-gradient(120% 90% at 80% 0%, #FF6A2B 0%, transparent 60%),
    linear-gradient(135deg, #FFA046, #FF6A2B);
}
.cover-gradient-yellow {
  background:
    radial-gradient(100% 100% at 0% 0%, #FFD680 0%, transparent 60%),
    linear-gradient(135deg, #FFC24D, #FF9E2C);
}
.cover-stripes-orange {
  background-color: #FF6A2B;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.15) 0px, rgba(255,255,255,0.15) 2px,
    transparent 2px, transparent 14px
  );
}
.cover-stripes-yellow {
  background-color: #FFC24D;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(30,25,21,0.12) 0px, rgba(30,25,21,0.12) 2px,
    transparent 2px, transparent 14px
  );
}
.cover-numbered {
  background: var(--brown-800); color: var(--cream-50);
  display: grid; place-items: center;
  overflow: hidden;
}
.cover-numbered__bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(245,237,226,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245,237,226,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.cover-numbered__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 500; letter-spacing: -0.04em;
  color: var(--cream-50);
  position: relative; z-index: 1;
}
.cover-numbered__num em { font-style: normal; color: var(--orange); }

/* Animated covers */
.cover-art.animate::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.2) 0%, transparent 40%);
  opacity: 0; transition: opacity 300ms ease;
  pointer-events: none;
}
.article:hover .cover-art.animate::after { opacity: 1; }

/* ---------- Load more / footer ---------- */
.load-more-wrap {
  max-width: 1280px; margin: 48px auto 0;
  padding: 0 32px; text-align: center;
}
.load-more {
  padding: 16px 28px; border-radius: 999px;
  background: var(--brown-800); color: var(--cream-50);
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.load-more:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Subscribe CTA block */
.subscribe {
  max-width: 1280px; margin: 80px auto 60px;
  padding: 0 32px;
}
.subscribe__card {
  background: var(--cream-50);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-l);
  padding: 44px 56px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  position: relative; overflow: hidden;
}
.subscribe__title {
  font-size: 32px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.1;
  margin: 0 0 12px;
}
.subscribe__desc { color: var(--ink-60); font-size: 15px; line-height: 1.55; margin: 0; max-width: 380px; }
.subscribe__form {
  display: flex; gap: 8px;
  background: #fff; padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--ink-12);
}
.subscribe__form input {
  flex: 1; padding: 10px 16px; border: none; outline: none;
  font-size: 14px; background: transparent;
}
.subscribe__form button {
  padding: 10px 20px; border-radius: 999px;
  background: var(--brown-800); color: var(--cream-50);
  font-weight: 600; font-size: 14px;
}
.subscribe__form button:hover { background: var(--brown-900); }
.subscribe__note { font-size: 11px; color: var(--ink-40); margin: 10px 0 0; }
.subscribe__shape {
  position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  opacity: 0.15;
  filter: blur(2px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink-06);
  padding: 40px 32px;
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--ink-60);
}
.site-footer__links { display: flex; gap: 24px; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px; background: var(--brown-800); color: var(--cream-50);
  border-radius: var(--radius-m); padding: 18px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
  z-index: 90; font-size: 13px;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.tweaks-panel p { margin: 0 0 14px; font-size: 11px; color: rgba(245,237,226,0.5); }
.tweak-group { margin-bottom: 14px; }
.tweak-group__label {
  font-size: 11px; color: rgba(245,237,226,0.6);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace;
}
.tweak-options { display: flex; gap: 4px; background: rgba(245,237,226,0.06); padding: 3px; border-radius: 10px; }
.tweak-options button {
  flex: 1; padding: 7px 6px; border-radius: 8px; font-size: 12px;
  color: rgba(245,237,226,0.6);
  transition: all 160ms ease;
}
.tweak-options button:hover { color: var(--cream-50); }
.tweak-options button.active { background: var(--orange); color: var(--brown-900); font-weight: 600; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 600ms cubic-bezier(.2,.8,.2,1) forwards; }

@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.like-btn.pop svg { animation: like-pop 380ms ease; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .blog-hero__card { grid-template-columns: 1fr; padding: 32px 28px; min-height: 0; }
  .hero-stats { gap: 24px; }
  .article, .article--wide, .article--featured { grid-column: span 12; }
  .subscribe__card { grid-template-columns: 1fr; padding: 32px; }
  .nav { display: none; }
  .site-header__inner { padding: 14px 20px; gap: 16px; }
}
@media (max-width: 640px) {
  .blog-hero { padding: 0 16px; }
  .filters { padding: 0 16px; }
  .grid { padding: 0 16px; }
  .blog-hero__title { font-size: 34px; }
}
