/* Flow pass (2026-11-18, after the design critique): one grid, one section opener, one rule system, a
   four-step serif scale. The Projects table's columns are the page grid: every section reuses them. */
:root {
  --cols: 1.3fr 1fr 1.3fr 1fr 90px 40px;   /* = .phead / .prow-main */
  --colgap: 20px;
  --sec-top: 150px;                          /* space above every section opener */
  --sec-gap: 64px;                           /* opener → content */
  --rule-h: 2px solid var(--ink);            /* heavy: opens a section */
  --rule-l: 1px solid rgba(22,22,20,.28);    /* hairline: inside a section */
  /* serif scale: 128 / 56 / 32 / 22 */
  --s1: clamp(72px, 8.9vw, 128px);
  --s2: clamp(40px, 3.9vw, 56px);
  --s3: clamp(26px, 2.2vw, 32px);
  --s4: 22px;
}

/* ---- the opener, identical for every section */
.projects, .about-f, .testimonials, .cta { padding-top: var(--sec-top) !important; border-top: 0 !important; }
.projects { padding-top: 120px !important; }
.title-row {
  display: grid !important; grid-template-columns: var(--cols); gap: 0 var(--colgap); align-items: end;
  margin: 0 var(--gutter); padding: 22px 0 0 !important; border-top: var(--rule-h);
}
.title-row .big-title { grid-column: 1 / 3; font: 400 var(--s1)/.92 var(--serif); letter-spacing: -.02em; margin: 0; }
.title-row .intro, .title-row .intro-wrap { grid-column: 3 / 5; margin: 0 0 12px !important; }
.title-row .intro { font-size: 17px; line-height: 1.5; max-width: 52ch; opacity: .85; }
.intro-wrap { display: grid; justify-items: start; gap: 18px; }
.intro-wrap .intro { margin: 0 !important; }
.testimonials .title-row { margin-bottom: 0; }
.title-row + * { margin-top: var(--sec-gap) !important; }

/* ---- one rule system: hairlines inside sections, all inset to the grid */
.ptable { border-top: 0 !important; }
.phead { border-top: 0; }
.phead > :first-child, .prow .cl { padding-left: 0 !important; }  /* text on the grid edge, no 6px inset */
.tape { border-block: var(--rule-l); }
.tape:not(.alt) { border-color: var(--ink); }

/* ---- serif scale */
.prow .cl { font-size: var(--s3) !important; }
.t-meta b { font: 400 var(--s3)/1.05 var(--serif) !important; }
.t-body p { font: 400 var(--s3)/1.28 var(--serif) !important; }
.t-full { grid-template-columns: var(--cols) !important; gap: 0 var(--colgap) !important; padding-top: var(--sec-gap) !important; }
.t-full .t-meta { grid-column: 1 / 3; }
.t-full .t-body { grid-column: 3 / 6; }

/* ---- contact: the same opener, left-aligned, email large */
.cta { text-align: left !important; padding-bottom: 140px !important; }
.cta > .mark { display: none; }
.cta .mail { margin: var(--sec-gap) var(--gutter) 0; font: 400 var(--s2)/1.05 var(--serif) !important; }

/* ---- footer on the same grid, no compass */
.foot { grid-template-columns: var(--cols) !important; gap: 40px var(--colgap) !important; }
.foot .lockup { grid-column: 1 / 3; }
.foot .fcols { grid-column: 3 / 6; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--colgap); }

/* ---- hero: keep the headline clear of the lit tower edge */
.hero-center::before { background: radial-gradient(closest-side, rgba(6,6,5,.7), rgba(6,6,5,.42) 55%, rgba(6,6,5,0)) !important; }

/* ---- phone */
.nav-menu { display: none; }
@media (max-width: 1000px) {
  .title-row { grid-template-columns: minmax(0, 1fr); gap: 18px 0; }
  .title-row .big-title, .title-row .intro, .title-row .intro-wrap { grid-column: 1; }
  .t-full { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
  .t-full .t-meta, .t-full .t-body { grid-column: 1; }
  .foot { grid-template-columns: minmax(0, 1fr) !important; }
  .foot .lockup, .foot .fcols { grid-column: 1; }
}
@media (max-width: 760px) {
  :root { --sec-top: 96px; --sec-gap: 40px; }
  .projects { padding-top: 80px !important; }
  #nav nav { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 18px; background: var(--paper) var(--noise); color: var(--ink); border-bottom: 1px solid var(--ink); }
  #nav nav a { padding: 12px 0; font-size: 13px; letter-spacing: .12em; width: 100%; border-bottom: var(--rule-l); text-shadow: none !important; color: var(--ink) !important; }
  #nav.menu-open nav { display: flex; }
  .nav-menu { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid currentColor; color: inherit; padding: 8px 12px; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
  .cta .mail { font-size: 30px !important; word-break: break-all; }
}
.title-row .intro-wrap .intro { grid-column: auto; }
.cta { padding-left: 0 !important; padding-right: 0 !important; }
.cta .mail span { font-size: .5em; }

/* ---- pass 2: one rhythm, one opener, a closing spread */
.projects, .about-f, .testimonials { padding-bottom: 0 !important; }
#about { padding-bottom: 0 !important; }
.projects, .about-f, .testimonials, .cta { padding-top: 160px !important; }
.title-row { align-items: end !important; padding-top: 28px !important; }
.title-row > * { align-self: end; }
.title-row .intro, .title-row .intro-wrap { margin-bottom: 14px !important; }
.pf-inline { font: 400 17px/1.4 var(--sans); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.pf-inline::after { content: " \2192"; }
.t-full { min-height: 0 !important; }
.t-idx { display: flex; align-items: center; gap: 12px; margin-top: 22px; font: 11px var(--mono); letter-spacing: .12em; }
.t-idx button { width: 34px; height: 34px; border: 1px solid currentColor; background: none; color: inherit; font: 14px var(--mono); cursor: pointer; }
.t-idx button:hover { background: var(--ink); color: var(--paper); }

/* closing spread: the hero's night returns; contact and footer are one dark piece */
.cta.close { position: relative; margin-top: 160px; padding: 140px 0 0 !important; background: var(--blk); color: var(--wh); overflow: hidden; isolation: isolate; }
.cta.close::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--blk) 0%, rgba(11,11,10,.86) 35%, rgba(11,11,10,.4) 62%, rgba(11,11,10,.85) 86%, #0b0b0a 100%), url("assets/hero.webp") center 88% / cover no-repeat; }
.cta.close::after { content: ""; position: absolute; inset: 0 0 -1px; z-index: -1; background: var(--noise); opacity: .35; pointer-events: none; }
.foot { background: #0b0b0a var(--noise) !important; }
.cta.close .title-row { border-top-color: rgba(242,240,232,.85); }
.cta.close .intro { opacity: .8; }
.cta.close .mail { display: block; margin: 64px var(--gutter) 0; padding-bottom: 120px; border: 0; font: 400 clamp(44px, 6.4vw, 96px)/1 var(--serif) !important; letter-spacing: -.015em; color: var(--wh); }
.cta.close .mail:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 10px; }
.foot { background: transparent !important; position: relative; padding-top: 0 !important; }
.cta.close + * , main + .foot { margin-top: 0; }
.foot { background: var(--blk) !important; border-top: 0 !important; }
.foot::before { display: none !important; }
.foot .fcols { grid-column: 3 / 6 !important; display: flex !important; gap: 28px; align-items: center; }
.foot .fcols a { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.foot .lockup { align-self: center; }
@media (max-width: 760px) {
  .projects, .about-f, .testimonials, .cta { padding-top: 96px !important; }
  .cta.close { margin-top: 96px; padding-top: 96px !important; }
  .cta.close .mail { font-size: 34px !important; word-break: break-all; padding-bottom: 80px; }
  .foot .fcols { grid-column: 1 !important; }
}

/* no heavy rule above section titles (2026-11-18): the titles and spacing open each section */
.title-row { border-top: 0 !important; padding-top: 0 !important; }

/* ---- pass 3: one opener, one measure, tighter ending */
.title-row { align-items: end !important; }
.title-row .intro, .title-row .intro-wrap { align-self: end !important; margin-bottom: 14px !important; }
.title-row + * { margin-top: 80px !important; }
#about .af { margin-top: 80px !important; }
/* one right measure: sans 560px, serif 640px */
.title-row .intro, #about .ab-p, .title-row .intro-wrap { max-width: 560px; }
#about .af-bio .lede, .t-body p { max-width: 640px; }
/* testimonials: name + pager sit with the quote; no dead left column */
.t-full { padding-bottom: 0; }
.testimonials { padding-bottom: 0 !important; }
.cta.close { margin-top: 140px; }
.cta.close .title-row { border-top: 0 !important; }
/* closing art: lamp and beam in shot */
.cta.close::before { background-position: center 22% !important; }
.cta.close .mail::after { content: " \2192"; font-size: .5em; opacity: 0; transition: opacity .2s; }
.cta.close .mail:hover::after { opacity: 1; }
/* footer on one baseline */
.foot { align-items: center !important; padding-top: 28px !important; padding-bottom: 28px !important; }
.foot .fl, .foot .fr { position: static !important; }
.foot { grid-template-columns: auto 1fr auto auto !important; gap: 0 36px !important; }
.foot .lockup { grid-column: auto !important; }
.foot .fcols { grid-column: auto !important; }
/* sticky table header: a solid ground and a rule so rows don't slice under it */
.phead { background: var(--paper) var(--noise) !important; box-shadow: 0 1px 0 var(--ink); }
.prow .yr, .prow .pm { padding-top: 6px; }
@media (max-width: 1000px) {
  .foot { grid-template-columns: 1fr auto !important; gap: 14px 24px !important; }
  .foot .fl { grid-column: 1; } .foot .fr { grid-column: 2; text-align: right; }
}
@media (max-width: 760px) { #about .af { margin-top: 40px !important; } .title-row + * { margin-top: 48px !important; } }
@media (max-width: 760px) {
  .foot { grid-template-columns: 1fr auto !important; gap: 18px 16px !important; padding-bottom: 32px !important; }
  .foot .lockup { grid-column: 1; } .foot .fcols { grid-column: 2 !important; gap: 16px; }
  .foot .fl, .foot .fr { grid-column: 1 / -1 !important; text-align: left; white-space: normal; }
  .foot .fr { margin-top: -8px !important; }
}
