/* ==========================================================================
   Nathaniel Blog
   blog/blog.css

   Everything this section needs, and nothing another section needs. The first
   block is the section's identity: four tokens, and the whole design system
   re-colours itself around them. Below that are components unique to /blog/.
   ========================================================================== */

[data-section="blog"] {
  --brand: #e0a03c;            /* gold — mid-morning light */
  --brand-soft: #edbb6b;
  --brand-text-light: #a35a12; /* 4.7:1 on bone */
  --brand-text-dark: #edbb6b;  /* 11:1 on ink */
}

/* --------------------------------------------------------------------------
   INTENT — the statement pairing under the banner
   -------------------------------------------------------------------------- */

.intent {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.intent h2 {
  font-size: var(--step-3);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  line-height: 1.32;
  max-width: 22ch;
  margin-top: var(--sp-5);
}

.intent__body {
  display: grid;
  gap: var(--sp-5);
  max-width: 54ch;
  color: var(--text-muted);
}

@media (max-width: 52rem) {
  .intent { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   TOPICS — what the blog covers
   -------------------------------------------------------------------------- */

.topics {
  margin-top: clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  list-style: none;
  padding: 0;
  counter-reset: none;
}

.topic {
  padding: var(--sp-5) clamp(1rem, 2.5vw, 2rem) var(--sp-5) 0;
  border-right: 1px solid var(--line);
}

.topic:last-child { border-right: 0; }

.topic__idx {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  color: var(--accent-text);
}

.topic h3 {
  margin-top: var(--sp-3);
  font-size: var(--step-2);
}

.topic p {
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 32ch;
}

@media (max-width: 52rem) {
  .topic {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
  }
  .topic:last-child { border-bottom: 0; }
  .topic p { max-width: none; }
}

/* --------------------------------------------------------------------------
   POST PAGE
   A post is mostly the shared .article-head and .article. What belongs here
   is only what a blog needs and the rest of the site does not.
   -------------------------------------------------------------------------- */

/* Revision note. Posts get corrected in public rather than quietly edited, so
   there is a designed place to say what changed. */
.revision {
  max-width: var(--measure);
  margin-top: var(--sp-7);
  padding: var(--sp-4) var(--sp-5);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-muted);
}

.revision b {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--sp-2);
}

/* Previous / next, at the foot of a post. */
.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-4);
  max-width: var(--measure);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

.post-nav a {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}

.post-nav a:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.post-nav__dir {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--text-faint);
}

.post-nav__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.post-nav a[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   EMPTY STATE placement
   -------------------------------------------------------------------------- */

.empty { margin-top: clamp(3rem, 7vw, 5rem); }

.empty code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: rgba(11, 19, 26, 0.06);
}
