/* Captive Eyeballs — Journal (blog). Layered on /styles.css tokens.

   Two article layouts (chosen per post via the `layout` frontmatter):
     .post-editorial — contained hero + centred masthead + open editorial body.
                       Default; used for team / AI ("Captive Eyeballs team") posts.
                       Text flows on the page over a faint eye-field.
     .post-hero      — full-bleed magazine hero with the headline overlaid, then an
                       opaque "paper" body pushed up over the image. Used for Jay's
                       own by-lined posts (`layout: hero`). The paper occludes the
                       eyes; they stay in the gutters (hidden on narrow screens).

   A faded, fixed eye-field sits behind everything. */

/* Finer, smaller eyes here than the homepage — reads as background texture. */
:root { --eye-size-min: 15; --eye-size-max: 126; }

.blog-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.blog-page #eye-field { position: fixed; inset: 0; z-index: 0; opacity: 0.2; pointer-events: none; }
.post-editorial #eye-field { opacity: 0.13; }
.post-hero #eye-field { opacity: 0.16; }

/* Content sits above the eyes. */
.blog-topbar, .blog-header, .blog-list, .blog-foot,
.post, .ed-hero, .ed-masthead, .ed-body, .more { position: relative; z-index: 1; }

/* ---- Shared bits -------------------------------------------------------- */
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid rgba(23, 19, 14, 0.16);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.dot { margin: 0 8px; color: var(--ink-soft); opacity: 0.6; }

.blog-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.blog-back {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(23, 19, 14, 0.28);
  padding-bottom: 2px;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.blog-back:hover { opacity: 0.7; border-color: var(--ink); }
.blog-mark {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- Index header (with a cream halo over the eyes) --------------------- */
.blog-header { max-width: 720px; margin: 0 auto; padding: 92px 32px 40px; text-align: center; }
.blog-halo {
  position: absolute; inset: -30px -14% 10px; z-index: -1;
  background: radial-gradient(ellipse 58% 62% at 50% 46%, var(--bg) 32%, rgba(252, 251, 249, 0.86) 56%, rgba(252, 251, 249, 0) 80%);
  pointer-events: none;
}
.blog-eyebrow {
  position: relative; display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; opacity: 0.9; transition: opacity 0.2s ease;
}
.blog-eyebrow:hover { opacity: 0.6; }
.blog-kicker { position: relative; margin-top: 20px; font-family: var(--font-mono); font-size: var(--text-micro); font-weight: 500; letter-spacing: 0.3em; color: var(--ink-soft); }
.blog-h1 { position: relative; margin: 14px 0 0; font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; line-height: 1.14; letter-spacing: -0.015em; text-wrap: balance; }
.blog-intro { position: relative; margin: 18px auto 0; max-width: 580px; font-size: var(--text-body); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

/* ---- Index list: card grid --------------------------------------------- */
.blog-list { max-width: 1120px; margin: 0 auto; padding: 8px 40px 48px; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.entry-link {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: inherit;
  background: #ffffff; border: 1px solid rgba(23, 19, 14, 0.10); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 19, 14, 0.04), 0 14px 34px rgba(23, 19, 14, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.entry-link:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23, 19, 14, 0.06), 0 24px 50px rgba(23, 19, 14, 0.10); }
.entry-cover { aspect-ratio: 16 / 9; overflow: hidden; background: #f4f0e8; border-bottom: 1px solid rgba(23, 19, 14, 0.08); }
.entry-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry-cover-mono { display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 140% at 30% 20%, #ffffff 0%, #f4f0e8 55%, #ece5d7 100%); }
.entry-cover-mono span { font-weight: 600; font-size: 40px; letter-spacing: 0.08em; color: rgba(23, 19, 14, 0.16); }
.entry-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 26px 26px; flex: 1; }
.entry-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-soft); }
.entry-title { margin: 2px 0 0; font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; transition: opacity 0.2s ease; }
.entry-link:hover .entry-title { opacity: 0.62; }
.entry-desc { margin: 0; font-size: 14.5px; line-height: 1.55; color: #40382e; text-wrap: pretty; }
.entry-tags { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-empty { grid-column: 1 / -1; }
.entry-empty p { color: var(--ink-soft); font-style: italic; padding: 30px 0; text-align: center; }

/* ======================================================================== */
/* ARTICLE                                                                   */
/* ======================================================================== */

.blog-topbar { max-width: 760px; margin: 0 auto; padding: 28px 32px 0; }
.blog-home { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; opacity: 0.9; transition: opacity 0.2s ease; }
.blog-home:hover { opacity: 0.6; }

/* ---- Shared masthead type (both layouts) ------------------------------- */
.post-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-soft); }
.post-title { margin: 16px 0 0; font-size: clamp(30px, 4.2vw, 44px); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
/* Faded "standfirst" / context line — understated grey, used in both layouts. */
.post-lede { margin: 20px 0 0; font-size: 19px; line-height: 1.55; font-weight: 400; color: var(--ink-soft); text-wrap: pretty; }
.post-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Editorial layout (default) ---------------------------------------- */
.post-editorial .post { max-width: 1000px; margin: 0 auto; padding: 20px 32px 0; }
.ed-hero { border-radius: 20px; overflow: hidden; aspect-ratio: 40 / 17; box-shadow: 0 26px 60px rgba(23, 19, 14, 0.14); }
.ed-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-masthead { max-width: 720px; margin: 0 auto; padding: 46px 20px 6px; text-align: center; }
.ed-halo { position: absolute; inset: -10px -16%; z-index: -1; background: radial-gradient(ellipse 58% 72% at 50% 48%, var(--bg) 34%, rgba(252, 251, 249, 0.85) 58%, rgba(252, 251, 249, 0) 82%); pointer-events: none; }
.ed-masthead .post-meta, .ed-masthead .post-title, .ed-masthead .post-lede, .ed-masthead .post-tags { position: relative; }
.ed-masthead .post-tags { justify-content: center; }
.ed-body { max-width: 680px; margin: 0 auto; padding: 6px 20px 0; }

/* ---- Hero layout (layout: hero) ---------------------------------------- */
.mag-topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 24px 40px; }
.mag-topbar .blog-home { color: #fff; opacity: 0.92; }
.mag-hero { position: relative; z-index: 1; height: 60vh; min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.mag-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Subtle scrim behind the headline — barely there on dark images, holds white text on lighter ones. */
.mag-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(12,9,5,0.16) 0%, rgba(12,9,5,0) 30%, rgba(12,9,5,0.34) 66%, rgba(12,9,5,0.62) 100%); }
.mag-hero-cap { position: relative; z-index: 2; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 40px 92px; color: #fff; }
.mag-hero-cap .post-meta { color: rgba(255,255,255,0.85); }
.mag-hero-cap .dot { color: rgba(255,255,255,0.6); }
.mag-hero-cap .post-title { color: #fff; max-width: 16ch; font-size: clamp(32px, 5vw, 56px); margin-top: 14px; text-shadow: 0 1px 28px rgba(0,0,0,0.30); }
.mag-hero-cap .post-tags { margin-top: 18px; }
.mag-hero-cap .tag { color: #fff; border-color: rgba(255,255,255,0.42); }
/* Opaque paper sheet, pushed up over the bottom of the hero. */
.post-hero .paper {
  box-sizing: border-box; position: relative; z-index: 2;
  max-width: 1280px;             /* was 808px — widened at Jay's request */
  margin: -60px auto 0;
  background: #fffefb;
  border: 1px solid rgba(23, 19, 14, 0.06); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 19, 14, 0.04), 0 22px 54px rgba(23, 19, 14, 0.08);
  padding: 52px 64px 58px;
}
/* On the paper the standfirst leads the body, with a clear gap before the article. */
.post-hero .paper .post-lede { margin: 0 0 26px; }
/* Keep a comfortable reading measure inside the wider paper — text column a touch
   narrower than the sheet, centred within it. */
.post-hero .paper .post-lede,
.post-hero .paper .prose,
.post-hero .paper .article-end,
.post-hero .paper .ed-byline { max-width: 808px; margin-left: auto; margin-right: auto; }

/* ---- Article end mark + byline ----------------------------------------- */
.article-end { margin: 34px 0 0; text-align: center; color: var(--ink-soft); }
.article-end::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0.55; }
.ed-byline { margin-top: 26px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Prose (Markdown body) --------------------------------------------- */
.prose { font-size: 18px; line-height: 1.75; color: #241d15; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.35em; text-wrap: pretty; }
.prose.dropcap > p:first-of-type::first-letter { float: left; font-size: 3.5em; line-height: 0.8; font-weight: 600; margin: 6px 12px 0 0; color: var(--ink); }
.prose h2 { margin: 2em 0 0.6em; padding-top: 0.9em; border-top: 1px solid rgba(23, 19, 14, 0.10); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 18px; font-weight: 600; color: var(--ink); }
.prose a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(23, 19, 14, 0.32); transition: opacity 0.2s ease, border-color 0.2s ease; }
.prose a:hover { opacity: 0.7; border-color: var(--ink); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.prose li { margin: 0.4em 0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid rgba(23, 19, 14, 0.24); color: var(--ink-soft); font-style: italic; }
.prose blockquote p { margin: 0.3em 0; }
.prose hr { border: 0; border-top: 1px solid rgba(23, 19, 14, 0.14); margin: 2.4em 0; }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: rgba(23, 19, 14, 0.06); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: #17130e; color: #f3efe7; padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 1.6em 0; }
.prose pre code { background: none; padding: 0; font-size: 13.5px; color: inherit; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.6em 0; }

/* ---- More from the Journal --------------------------------------------- */
.more { max-width: 1280px; margin: 56px auto 0; padding: 40px 32px 0; }
.post-editorial .more { max-width: 760px; }
.more-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 18px; }
.more-list { display: grid; gap: 16px; }
.more-card {
  display: flex; gap: 20px; align-items: stretch; text-decoration: none; color: inherit;
  background: #ffffff; border: 1px solid rgba(23, 19, 14, 0.10); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 19, 14, 0.04), 0 14px 34px rgba(23, 19, 14, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.more-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23,19,14,.06), 0 22px 46px rgba(23,19,14,.09); }
.more-thumb { flex: 0 0 210px; background: #f4f0e8; }
.more-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.more-info { padding: 18px 22px 18px 2px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.more-info .m { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--ink-soft); }
.more-info h4 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.more-info p { margin: 0; font-size: 14px; line-height: 1.5; color: #40382e; }

/* ---- Responsive: narrow < 1440, compact < 900 (Jay's 1366x768) ---------- */
@media (max-width: 1439px) { .blog-list { padding-left: 30px; padding-right: 30px; } }
/* Hero sheet + "More" footer: fixed max-width: 1280px means they hit both screen
   edges with 0 margin between 861px and 1439px (nothing handled this range before).
   Fluid gutter interpolates linearly so there's no jump at either boundary:
   16px margin at 861px (continuous with the <=860px rule below) up to 80px at
   1439px (continuous with the >=1440px auto-centered margin: (1440-1280)/2). */
@media (min-width: 861px) and (max-width: 1439px) {
  .post-hero .paper,
  .more {
    margin-left: calc(16px + (100vw - 860px) * 64 / 580);
    margin-right: calc(16px + (100vw - 860px) * 64 / 580);
  }
  /* Paper's side padding steps in tandem (36px -> 64px) so the reading column widens
     smoothly instead of overshooting past the <=860px rule's measure right above it. */
  .post-hero .paper {
    padding-left: calc(36px + (100vw - 860px) * 28 / 580);
    padding-right: calc(36px + (100vw - 860px) * 28 / 580);
  }
}
@media (max-height: 899px) {
  .blog-header { padding-top: 64px; }
  .post-editorial .post { padding-top: 14px; }
}
/* Hero: hide gutter eyes once the sheet no longer leaves room for them. */
@media (max-width: 920px) { .post-hero #eye-field { display: none; } }
@media (max-width: 860px) { .post-hero .paper { margin-left: 16px; margin-right: 16px; padding-left: 36px; padding-right: 36px; } }
@media (max-width: 760px) {
  .entries { grid-template-columns: 1fr; gap: 22px; }
  .blog-topbar { padding-left: 22px; padding-right: 22px; }
  .blog-foot { padding-left: 22px; padding-right: 22px; }
  .post-editorial .post { padding-left: 22px; padding-right: 22px; }
  .mag-topbar { padding: 18px 22px; }
  .mag-hero-cap { padding: 0 22px 40px; }
  .post-hero .paper { margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 34px 22px 40px; }
  .more { padding-left: 22px; padding-right: 22px; }
  .more-card { flex-direction: column; }
  .more-thumb { flex: none; aspect-ratio: 16/9; width: 100%; }
  .more-info { padding: 16px 20px 20px; }
  .prose { font-size: 16.5px; }
  .post-lede { font-size: 17px; }
}
@media (max-width: 620px) {
  .ed-masthead { padding-left: 14px; padding-right: 14px; }
  .ed-body { padding-left: 14px; padding-right: 14px; }
  .entry-title { font-size: 20px; }
}
