/* The site's type and palette, with a quieter measure for long-form reading. */

.blog-page {
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
}

.blog-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.notes-main,
.article-main {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 72px 0 112px;
}
.notes-main { max-width: 860px; }
.article-main { max-width: 680px; }

.notes-heading,
.article-heading {
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.notes-heading { margin-bottom: 48px; }

.notes-list { border-top: 1px solid var(--rule); }

.notes-list .note {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr) 216px;
  max-width: none;   /* styles.css caps a bare .note at 32em */
  margin-top: 0;
  gap: 32px;
  padding: 32px 0 36px;
  border-bottom: 1px solid var(--rule);
}

.note-meta,
.article-meta,
.article-masthead,
.article-return {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
}

.note-meta { padding-top: 5px; }
.note-meta span { display: block; margin-top: 3px; }

.note-title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.note-title a { text-decoration-color: transparent; }
.note-title a:hover,
.note-title a:focus-visible { text-decoration-color: var(--ink); }

.note-excerpt { margin-top: 14px; max-width: 36em; }

/* Each post's illustration, small and to the right of its title. */
.note-thumb {
  display: block;
  align-self: start;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
}
.note-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: brightness(var(--photo-dim));
  transition: transform 300ms ease;
}
.note:hover .note-thumb img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) {
  .note-thumb img { transition: none; }
  .note:hover .note-thumb img { transform: none; }
}

/* The older slash masthead and date line, still used by the Folio pages. */
.article-masthead {
  margin-bottom: 24px;
  font-size: 12px;
  letter-spacing: 0.015em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 24px;
}

/* Post header: topic, title, subtitle, then who wrote it and when. */
.article-kicker {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-deck {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}
.article-byline img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  filter: brightness(var(--photo-dim));
}
.article-byline p {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.byline-name { color: var(--ink); font-weight: 500; }
.byline-date { color: var(--muted); }

.article-body {
  margin-top: 40px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.65;
}

.article-body p + p { margin-top: 1.1em; }

.article-section { margin-top: 2.4em; }

.article-section h2 {
  margin-bottom: 24px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  scroll-margin-top: 32px;
}

.article-body blockquote {
  margin: 1.4em 0;
  padding-left: 24px;
  border-left: 2px solid var(--rule);
  color: var(--ink);
  font-style: italic;
}

/* Photos inside a post: full measure, the site's radius, dimmed a touch in dark mode like the home page. */
.article-figure { margin: 2em 0; }
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  filter: brightness(var(--photo-dim));
}
.article-figure figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* Two photos side by side under one caption; they stack on phones. */
.figure-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.figure-pair img { aspect-ratio: 6 / 5; object-fit: cover; }

/* One line lifted out of the paragraph before it, for the sentence a post turns on. */
.article-body .article-pull {
  margin: 1.4em 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 28px;
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}

/* A closing quote with its source, set apart from the last section. */
.article-epigraph {
  margin-top: 3.2em;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.article-epigraph blockquote { margin: 0; padding: 0; border: 0; }
.article-epigraph figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.article-epigraph figcaption::before { content: "— "; }

/* Email alerts for new posts. One field, one button, the promise underneath.
   The form posts to the newsletter service named in its action. */
.subscribe {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.notes-main .subscribe { margin: 48px 0 0 176px; }   /* lines up with the post titles: 144px meta + 32px gap */
.subscribe-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.subscribe-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.subscribe-form {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.subscribe-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.subscribe-form input::placeholder { color: var(--muted); }
.subscribe-form input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.subscribe-form button {
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}
.subscribe-form button:hover { opacity: 0.86; }
.subscribe-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.subscribe-fine {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.subscribe-fine a { color: var(--muted); }
.subscribe-fine a:hover { color: var(--ink); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.article-return {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.blog-footer { padding-top: 24px; }

@media (max-width: 760px) {
  .notes-main,
  .article-main { padding: 44px 0 72px; }
  .notes-heading { margin-bottom: 32px; }
  .notes-list .note { grid-template-columns: 1fr; gap: 14px; padding: 24px 0 28px; }
  .note-thumb { order: -1; margin: 0 0 6px; }
  .note-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; }
  .note-meta span { margin: 0; }
  .note-title { font-size: 25px; }
  .note-excerpt { margin-top: 12px; }
  .article-masthead { max-width: 28em; margin-bottom: 20px; }
  .article-meta { margin-top: 20px; }
  .article-kicker { margin-bottom: 14px; }
  .article-deck { margin-top: 14px; font-size: 19px; }
  .article-byline { margin-top: 24px; }
  .article-body { margin-top: 32px; font-size: 19px; }
  .article-section h2 { font-size: 25px; margin-bottom: 20px; }
  .article-body blockquote { padding-left: 20px; }
  .article-body .article-pull { padding-left: 20px; font-size: 24px; }
  .article-figure figcaption { margin-top: 10px; font-size: 12px; }
  .figure-pair-grid { grid-template-columns: 1fr; gap: 10px; }
  .subscribe { margin-top: 44px; padding: 22px 20px; }
  .notes-main .subscribe { margin: 40px 0 0; }
  .subscribe-form { flex-direction: column; }
}

@media print {
  .blog-page { display: block; background: white; color: black; }
  .site-header,
  .skip-link,
  .article-return,
  .subscribe,
  .blog-footer { display: none; }
  .article-main { max-width: none; padding: 0; }
  .article-heading,
  .article-section h2,
  .article-body blockquote { color: black; }
  .article-masthead,
  .article-meta,
  .article-kicker,
  .byline-date,
  .article-deck { color: #444; }
  .article-byline img { filter: none; }
  .article-body { font-size: 12pt; }
  .article-section h2 { break-after: avoid; }
  .article-figure { break-inside: avoid; }
  .article-body p { orphans: 3; widows: 3; }
}
