/* Multi-Strategy Portfolio Construction Under EVAR Constraints — white paper (layout from the research notes).
   Ink editorial plate: the note's own photograph as a navy duotone hero, the breadcrumb set on it.
   Long-form serif reading with heads in the margin and a drop cap; a second duotone plate opens the
   middle of the note (a risk estimate that updates in real time); the risks close as a three-column ledger; the closing line as a
   pull statement; the next-note panel carries the next note's own plate. */

body[data-page="evar-portfolio-construction"] {
  --hero: url("../img/photos/about-scales.jpg"); --hero-pos: 68% 50%; --hero-blend: luminosity;
  --plate: url("../img/photos/dc-corridor.jpg"); --plate-pos: 50% 50%;
  --next-img: url("../img/photos/paper.jpg"); --next-pos: 50% 50%;
}

/* breadcrumb on the plate: main's left edge is the page column, which the core gutter now matches */
body[data-page="evar-portfolio-construction"] main { position: relative }
body[data-page="evar-portfolio-construction"] .back {
  position: absolute; z-index: 3; top: clamp(1.2rem, 3vh, 2rem); left: 0;
  padding: .4rem 0; color: #fff;
}
body[data-page="evar-portfolio-construction"] .back:hover { color: #fff; text-decoration: underline }
body[data-page="evar-portfolio-construction"] .hero { min-height: clamp(480px, 70vh, 720px) }
body[data-page="evar-portfolio-construction"] .hero h1 { max-width: 12ch }

/* the reading column: heads in the margin, serif prose */
body[data-page="evar-portfolio-construction"] .prose { margin-top: clamp(2.8rem, 5vw, 4.6rem) }
body[data-page="evar-portfolio-construction"] .prose section {
  grid-template-columns: minmax(0, 15rem) minmax(0, 44rem) minmax(0, 1fr);
  gap: 0 4rem; padding: clamp(2.4rem, 4vw, 3.4rem) 0;
}
body[data-page="evar-portfolio-construction"] .prose section > p + p { margin-top: 1.15rem }
body[data-page="evar-portfolio-construction"] .prose section:first-child { border-top: 2px solid var(--fg) }
body[data-page="evar-portfolio-construction"] .prose section > h2::before {
  content: ""; display: block; width: 2rem; height: 3px; background: var(--red); margin-bottom: 1rem;
}
body[data-page="evar-portfolio-construction"] .prose section:first-child > p:first-of-type { font-size: 1.32rem; line-height: 1.55; color: var(--fg) }
body[data-page="evar-portfolio-construction"] .prose section:first-child > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-weight: 500; font-size: 3.55em; line-height: .84;
  margin: .06em .1em 0 -.02em; color: var(--fg);
}

/* a second plate opens the middle of the note */
body[data-page="evar-portfolio-construction"] .prose section:nth-child(2)::before {
  content: ""; grid-column: 1 / -1; grid-row: 1; aspect-ratio: 12 / 5; border-radius: 14px;
  margin-bottom: clamp(1.8rem, 3.4vw, 3rem);
  background-color: var(--navy);
  background-image: linear-gradient(var(--navy), var(--navy)), var(--plate);
  background-size: cover; background-position: center, var(--plate-pos); background-repeat: no-repeat;
  background-blend-mode: screen, luminosity;   /* duotone: the photo's tones in navy, shadows lifted to navy */
}
body[data-page="evar-portfolio-construction"] .prose section:nth-child(2) > h2 { grid-row: 2 / span 20 }

/* the risks: a three-column ledger */
body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) {
  grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(1.6rem, 3vw, 2.8rem); row-gap: 0;
}
body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) > h2 {
  grid-column: 1 / -1; grid-row: 1; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1; margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) > p {
  grid-column: auto; max-width: none; margin: 0; padding-top: 1.2rem; border-top: 2px solid var(--fg);
  font-size: 1.1rem; line-height: 1.6;
}
body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) > p > strong:first-child {
  display: block; margin-bottom: .7rem; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.25rem, 1.7vw, 1.45rem); letter-spacing: -.02em; line-height: 1.15;
}

/* the closing line */
body[data-page="evar-portfolio-construction"] .poster > .firm {
  position: relative; max-width: 26ch; margin: clamp(1.6rem, 3vw, 2.6rem) 0 0; padding: 1.6rem 0 0; border-top: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.2; letter-spacing: -.01em; color: var(--fg);
}
body[data-page="evar-portfolio-construction"] .poster > .firm::before { content: ""; position: absolute; top: 0; left: 0; width: 3rem; height: 3px; background: var(--red) }

/* the close: Home's band, full bleed. The next note's own photograph as a navy duotone under the house
   veil, the text on the page column, and the footer straight after (no paper, no rule between). */
body[data-page="evar-portfolio-construction"] .poster > section.next {
  position: relative; isolation: isolate;
  width: 100vw; margin: clamp(3.2rem, 6vw, 5.5rem) 0 0 calc(50% - 50vw);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: clamp(420px, 56vh, 560px);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  border: 0; border-radius: 0; color: #fff;
  background-color: var(--navy);
  background-image: linear-gradient(90deg, rgba(11, 19, 34, .94) 0%, rgba(11, 19, 34, .8) 40%, rgba(11, 19, 34, .3) 100%), var(--next-img);
  background-size: cover; background-position: center, var(--next-pos); background-repeat: no-repeat;
  background-blend-mode: normal, luminosity;
}
body[data-page="evar-portfolio-construction"] .poster > section.next p {
  margin: 0; max-width: 24ch; color: #fff; font-family: var(--serif); font-size: clamp(1.9rem, 3.3vw, 2.8rem); line-height: 1.18; letter-spacing: -.01em;
}
body[data-page="evar-portfolio-construction"] .poster > section.next .actions { margin-top: 2rem }
body[data-page="evar-portfolio-construction"] .poster > section.next .btn { background: #fff; color: var(--black); border: 1.5px solid #fff }
body[data-page="evar-portfolio-construction"] .poster > section.next .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6) }
body[data-page="evar-portfolio-construction"] .poster > section.next .btn:hover { background: var(--red); border-color: var(--red); color: #fff }
body[data-page="evar-portfolio-construction"] footer { margin-top: 0; border-top: 0 }

/* ── responsive ── */
@media (max-width: 1000px) {
  body[data-page="evar-portfolio-construction"] .prose section { grid-template-columns: minmax(0, 1fr); column-gap: 0 }
  body[data-page="evar-portfolio-construction"] .prose section > h2 { margin-bottom: 1rem }
  body[data-page="evar-portfolio-construction"] .prose section:nth-child(2)::before { grid-column: 1; aspect-ratio: 16 / 9 }
  body[data-page="evar-portfolio-construction"] .prose section:nth-child(2) > h2 { grid-row: auto }
  body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  /* tablet: the lede runs across most of the plate, so the side veil holds its strength further right */
  body[data-page="evar-portfolio-construction"] .hero {
    background-image: linear-gradient(90deg, rgba(11, 19, 34, .88) 0%, rgba(11, 19, 34, .74) 55%, rgba(11, 19, 34, .42) 100%),
      linear-gradient(0deg, rgba(11, 19, 34, .55), rgba(11, 19, 34, 0) 45%), var(--hero, none);
  }
  body[data-page="evar-portfolio-construction"] .poster > section.next { min-height: 0; padding-block: 5rem; background-image: linear-gradient(90deg, rgba(11, 19, 34, .92), rgba(11, 19, 34, .74)), var(--next-img) }
}
@media (max-width: 860px) {
  body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) { grid-template-columns: minmax(0, 1fr); row-gap: 1.8rem }
  body[data-page="evar-portfolio-construction"] .prose section:last-child:not(.important) > h2 { margin-bottom: 0 }
}
@media (max-width: 640px) {
  body[data-page="evar-portfolio-construction"] .hero {
    min-height: 540px;   /* phone: the core veil rises from the foot; a second veil from the top keeps the breadcrumb legible on light plates */
    background-image: linear-gradient(0deg, rgba(11, 19, 34, .92) 0%, rgba(11, 19, 34, .7) 55%, rgba(11, 19, 34, .25) 100%),
      linear-gradient(180deg, rgba(11, 19, 34, .74) 0%, rgba(11, 19, 34, .3) 22%, rgba(11, 19, 34, 0) 38%), var(--hero, none);
  }
  body[data-page="evar-portfolio-construction"] .prose section:first-child > p:first-of-type { font-size: 1.16rem }
  body[data-page="evar-portfolio-construction"] .prose section:nth-child(2)::before { aspect-ratio: 4 / 3; border-radius: 12px }
  body[data-page="evar-portfolio-construction"] .poster > section.next {
    min-height: 0; padding: 4.4rem var(--gutter);
    background-image: linear-gradient(180deg, rgba(11, 19, 34, .86), rgba(11, 19, 34, .74) 55%, rgba(11, 19, 34, .9)), var(--next-img);
  }
  body[data-page="evar-portfolio-construction"] .poster > section.next p { font-size: 1.75rem; line-height: 1.22 }
}
