/* Blog (/news and /news/*), loaded after style.css and using its brand
   tokens. Same Deep Teal opener and Warm Ivory reading ground as the rest
   of the site. */

:root {
  --mono: ui-monospace, monospace;
}

.blog-wrap {
  max-width: 1240px;
  margin: auto;
  padding-inline: clamp(1.2rem, 4vw, 4rem);
}

/* --- index page hero + list ------------------------------------------- */
.blog-hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.blog-hero h1 {
  color: var(--on-dark);
}

.blog-lede {
  color: var(--on-dark-muted);
  max-width: 55ch;
  font: 400 1.1rem/1.55 var(--font-sub);
}

.blog-index-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}

.blog-index {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.blog-entry {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

/* Scoped to .js so a no-JS visitor sees every entry. */
.js .blog-entry {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}

.js .blog-entry.is-visible {
  opacity: 1;
  transform: none;
}

.blog-entry-date {
  font: 400 .88rem var(--font-sub);
  color: var(--text-muted);
  padding-top: .35rem;
}

.blog-entry-body h2 {
  font-size: 1.6rem;
  margin: 0 0 .5rem;
}

.blog-entry-body h2 a {
  text-decoration: none;
}

.blog-entry-body h2 a:hover {
  text-decoration: underline;
}

.blog-entry-body p {
  color: var(--text-muted);
  margin: 0 0 .6rem;
  max-width: 65ch;
}

.blog-entry-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font: 400 .82rem var(--font-sub);
  color: var(--text-muted);
  margin: 0 !important;
}

.blog-entry-meta svg {
  width: 14px;
  height: 14px;
}

.blog-empty {
  color: var(--text-muted);
  padding: 2rem 0;
}

/* --- article page ------------------------------------------------------ */
.blog-masthead {
  position: relative;
  background-image: var(--blog-cover-url, none);
  background-size: cover;
  background-position: center;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.blog-masthead:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 47, 54, .4), rgba(24, 47, 54, .93));
}

.blog-masthead .blog-wrap {
  position: relative;
  z-index: 1;
}

.blog-masthead .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.blog-masthead h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--on-dark);
  max-width: 22ch;
  margin: 0 0 1.1rem;
}

.blog-byline {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 400 .88rem var(--font-sub);
  color: var(--on-dark-muted);
}

.blog-byline svg {
  width: 14px;
  height: 14px;
}

.blog-byline-sep {
  opacity: .6;
}

.blog-article-section {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
}

.blog-article-wrap {
  max-width: 760px;
}

.blog-body {
  font-size: 1.08rem;
  line-height: 1.75;
}

.blog-body h2 {
  font-size: 1.6rem;
  margin: 2.2rem 0 .9rem;
}

.blog-body h3 {
  font-size: 1.25rem;
  margin: 1.8rem 0 .7rem;
}

.blog-body p {
  margin: 0 0 1.2rem;
}

.blog-body ul,
.blog-body ol {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.blog-body li {
  margin-bottom: .4rem;
}

/* GitHub-style task lists (- [ ] / - [x]): no bullet, checkbox inline. */
.blog-body li.task-list-item {
  list-style: none;
  margin-left: -1.4rem;
}

.blog-body li.task-list-item input[type="checkbox"] {
  margin-right: .5rem;
  accent-color: var(--deep-teal);
}

.blog-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.6rem 0;
  border-radius: var(--radius);
}

.blog-body code {
  font: .9em var(--mono);
  background: var(--cool-silver);
  padding: .1em .35em;
  border-radius: .3rem;
}

.blog-body pre {
  background: var(--deep-teal);
  color: var(--on-dark);
  padding: 1rem;
  border-radius: .75rem;
  overflow-x: auto;
  font: .85rem var(--mono);
}

.blog-body pre code {
  background: none;
  padding: 0;
}

.blog-body blockquote {
  margin: 1.2rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--deep-teal);
  color: var(--text-muted);
}

.blog-back-link {
  display: inline-flex;
  margin-top: 2.5rem;
  font: 400 .95rem var(--font-sub);
  text-decoration: none;
}

.blog-back-link:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .blog-entry {
    grid-template-columns: 1fr;
    gap: .4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-entry {
    transition: none;
  }
}
