/* ==========================================================================
   philmareu.com
   The look of Phil's 2016 site, lightly modernized: a white top bar, a photo
   hero under a copper wash, light uppercase headings over a thick pale rule,
   cards with a dark code strip, circle-cropped images and sage bands.
   No forms: people reach Phil by email or social.
   Flat colour and square corners throughout. No gradients, no shadows.
   ========================================================================== */

:root {
  /* Fonts. Swap these two properties to drop in the real faces
     (Brandon Grotesque for the sans). */
  --font-sans: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Colour. Measured from the 2016 screenshots, then adjusted for contrast. */
  --copper: #AF622B;        /* 2016 copper #B0632C, one step deeper: white text sits at 4.56:1 */
  --copper-dark: #96511F;   /* hover on copper fills */
  --copper-ink: #A85C27;    /* copper used as text on white and pale grey (4.7:1 or better) */
  --sage: #67AD8F;          /* the 2016 sage, unchanged */
  --sage-dark: #5A9F81;     /* hover on sage fills */
  --on-sage: #11271D;       /* text on sage: white was 2.6:1, this deep green ink is 6:1 */
  --sage-deep: #3F8267;     /* same hue, deepened: checkbox marks (4.6:1 on white) */
  --sage-light: #A6D6C1;    /* sage for accents on the dark strip */
  --strip: #4B4B4B;         /* the dark code strip */
  --ink: #1C1C1C;           /* headings */
  --text: #3A3A3A;          /* body */
  --muted: #666666;         /* dates, meta */
  --white: #FFFFFF;
  --paper: #F9F9F9;         /* the alternating pale-grey section */
  --rule: #E7E7E7;          /* the thick rule under headings */
  --line: #D9D9D9;          /* hairlines */

  /* Type scale. The desktop sizes are the ones measured from the 2016 site
     (14, 18, 21, 27, 40px, plus 16 for secondary text); each step is fluid
     between a 390px and a 1440px viewport. */
  --fs-meta: 0.875rem;                                          /* 14 */
  --fs-small: 1rem;                                             /* 16 */
  --fs-body: clamp(1.0625rem, 1.04rem + 0.1vw, 1.125rem);       /* 17 to 18 */
  --fs-lead: clamp(1.15rem, 1.08rem + 0.33vw, 1.3125rem);       /* 18.5 to 21 */
  --fs-title: clamp(1.1875rem, 1.15rem + 0.17vw, 1.3125rem);    /* 19 to 21 */
  --fs-h2: clamp(1.375rem, 1.26rem + 0.5vw, 1.6875rem);         /* 22 to 27 */
  --fs-h1: clamp(1.875rem, 1.64rem + 1vw, 2.5rem);              /* 30 to 40 */

  /* Spacing scale. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --section: clamp(3rem, 2.4rem + 2.4vw, 4.5rem);
  --gutter: clamp(1.25rem, 0.5rem + 3.2vw, 2.5rem);

  --control: 2.5rem;   /* one height for buttons */
  --wrap: 70.625rem;   /* 1130px, the 2016 content width */
  --measure: 38rem;    /* about 75 characters of running text */
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 300 var(--fs-body)/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 400; line-height: 1.25; }
p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong, b { font-weight: 500; color: var(--ink); }

a { color: var(--copper-ink); text-decoration: none; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.on-colour :focus-visible { outline-color: var(--white); }

code, pre, kbd { font-family: var(--font-mono); font-weight: 400; font-variant-ligatures: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--s4); top: -4rem;
  padding: var(--s3) var(--s4); background: var(--ink); color: var(--white);
}
.skip:focus { top: var(--s4); color: var(--white); z-index: 10; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.icon { width: 1.125em; height: 1.125em; flex: none; fill: currentColor; }

/* --------------------------------------------------------------------------
   Top bar and hero: taken from 01-copper-restored, which follows the 2016
   screenshots (58px bar, photo under the copper wash, name, one wide
   paragraph, 100px avatar at the right, small round social buttons).
   These two blocks keep 01's weights and tracking. Everything below the hero
   uses the type and spacing scales above.
   -------------------------------------------------------------------------- */

.top, .hero { --w-regular: 420; --track: -0.01em; letter-spacing: var(--track); }

.top { background: var(--white); }
.top-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 0 16px; }
.top .home { display: flex; align-items: center; min-height: 58px; padding: 0 8px; margin-left: -8px; color: var(--strip); }
.top .home svg { width: 25px; height: 25px; }
.nav { display: flex; align-items: center; }
.nav a { display: block; padding: 4px 15px; color: var(--strip); font-size: 1.125rem; line-height: 30px; font-weight: var(--w-regular); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--copper-ink); }
.nav .cta { margin-left: 15px; padding: 0 9px; background: var(--sage); color: var(--on-sage); }
.nav .cta:hover, .nav .cta[aria-current="page"] { background: var(--sage-dark); color: var(--on-sage); }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; margin-right: -10px; border: 0; background: none; color: var(--strip); font: var(--w-regular) 1.125rem/1 var(--font-sans); letter-spacing: var(--track); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 700px) {
  /* Without JavaScript the links simply stack under the mark. */
  .js .menu-btn { display: inline-flex; }
  .js .nav { display: none; }
  .nav { flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 4px 0 16px; border-top: 1px solid var(--rule); }
  .js .nav.open { display: flex; }
  .nav a { padding: 9px 4px; }
  .nav .cta { margin: 10px 0 0; padding: 7px 9px; text-align: center; }
}

/* --------------------------------------------------------------------------
   Buttons: flat, square, one height
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--control); padding: 0.375rem 1.75rem;
  border: 0; border-radius: 0;
  background: var(--copper); color: var(--white);
  font: 400 1.0625rem/1.2 var(--font-sans); text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--copper-dark); color: var(--white); }
.btn--wide { min-width: 11.5rem; }
.btn--sage { background: var(--sage); color: var(--on-sage); }
.btn--sage:hover { background: var(--sage-dark); color: var(--on-sage); }
.btn--sm { min-height: 2.25rem; padding: 0.25rem 1.125rem; }
.btn--line { background: transparent; color: var(--copper-ink); border: 1px solid currentColor; }
.btn--line:hover { background: transparent; color: var(--ink); }
.on-colour .btn--line { color: var(--white); }
.on-colour .btn--line:hover { background: var(--white); color: var(--copper-ink); border-color: var(--white); }
.on-colour .btn--white { background: var(--white); color: var(--copper-ink); }
.on-colour .btn--white:hover { background: var(--paper); color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* --------------------------------------------------------------------------
   Hero (from 01): photo under a flat copper wash. The photo is multiplied
   into the copper, so the wash never gets lighter than the copper itself and
   white text keeps its contrast wherever it sits.
   -------------------------------------------------------------------------- */

.hero { position: relative; isolation: isolate; overflow: clip; padding: clamp(44px, 6.4vw, 82px) 0; background: var(--copper); color: var(--white); }
.hero::before { content: ""; position: absolute; inset: 0 -6%; z-index: -1; background: url(/assets/phil-in-the-office.jpeg) 50% 50% / cover no-repeat; filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; opacity: 0.3; }
.hero .mark { width: clamp(40px, 4vw, 50px); height: auto; }
.hero h1 { margin: 25px 0 14px; color: var(--white); font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.3125rem); line-height: 1.17; font-weight: var(--w-regular); letter-spacing: 0.02em; text-transform: uppercase; }
.hero-intro { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 32px; align-items: center; }
.hero-intro p { font-size: clamp(1.1875rem, 1.05rem + 0.65vw, 1.3125rem); line-height: 1.6667; font-weight: var(--w-regular); text-wrap: pretty; }
.avatar { order: 2; width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }
.social { display: flex; gap: 5px; margin-top: 16px; }
.social a { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: #EEE; color: var(--strip); }
.social a:hover { background: var(--white); color: var(--ink); }
.social svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 700px) {
  .hero-intro { display: block; }
  .avatar { float: right; width: 84px; height: 84px; margin: 4px 0 6px 16px; shape-outside: circle(50%); shape-margin: 12px; }
  .social { gap: 8px; clear: both; padding-top: 4px; }
  .social a { width: 44px; height: 44px; }
  .social svg { width: 20px; height: 20px; }
}

/* --------------------------------------------------------------------------
   Page header for inner pages: a short flat copper band
   -------------------------------------------------------------------------- */

.page-head { background: var(--copper); color: var(--white); padding-block: clamp(2.25rem, 1.5rem + 3.4vw, 4rem); }
.page-head a { color: var(--white); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.page-head a:hover { color: var(--white); text-decoration-thickness: 2px; }
.page-head .btn { text-decoration: none; }

.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--fs-meta); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }

.page-head h1 {
  margin-top: var(--s4); max-width: 24em;
  color: var(--white); font-size: var(--fs-h1); font-weight: 300; line-height: 1.15;
  letter-spacing: 0.02em; text-transform: uppercase; text-wrap: balance;
}
.page-head h1 .keep { text-transform: none; }
.page-head .lede { margin-top: var(--s4); max-width: 38rem; font-size: var(--fs-lead); font-weight: 400; line-height: 1.6; text-wrap: pretty; }

.byline { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); font-size: var(--fs-small); font-weight: 400; line-height: 1.5; }
.byline img { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }

/* --------------------------------------------------------------------------
   Sections and the heading over the thick pale rule
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }

.sec-title {
  margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  padding-bottom: 1.125rem;
  border-bottom: 8px solid var(--rule);
  font-size: var(--fs-h2); font-weight: 400; line-height: 1.2;
  letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance;
}
.sec-title .keep { text-transform: none; }
.sec-title--sub { font-size: var(--fs-title); border-bottom-width: 4px; padding-bottom: var(--s3); margin-bottom: var(--s5); }
.sec-intro { max-width: var(--measure); margin-top: calc(-1 * var(--s3)); margin-bottom: var(--s6); }

.lead { max-width: var(--measure); font-size: var(--fs-lead); line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.meta { font-size: var(--fs-meta); font-weight: 400; color: var(--muted); }
.measure { max-width: var(--measure); }

/* --------------------------------------------------------------------------
   Cards: dark strip, copper title, date
   The strip carries a line of code for writing, a play time for videos and
   a status or a command for sandbox items. The type sits at its right end.
   -------------------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) clamp(1.5rem, 3vw, 2.5rem); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.cards--1 { grid-template-columns: minmax(0, 1fr); }

.card { position: relative; display: flex; flex-direction: column; background: var(--white); }
.section:not(.section--paper) .card { border: 1px solid var(--rule); }

.card__strip {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 2.5rem; padding: 0.5rem 1.25rem;
  background: var(--strip); color: var(--white);
}
.card__strip code {
  display: flex; align-items: center; gap: var(--s2); min-width: 0;
  font-size: 0.8125rem; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__strip code > span { overflow: hidden; text-overflow: ellipsis; }
.card__strip svg { width: 0.75rem; height: 0.75rem; flex: none; fill: currentColor; }
.card__strip .dot { width: 0.5rem; height: 0.5rem; flex: none; border-radius: 50%; background: var(--sage-light); }
.card__type { flex: none; color: #D6D6D6; font-size: 0.6875rem; font-weight: 400; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; }

.card__body { flex: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); padding: 1.125rem 1.25rem 1.25rem; }
.card__text { min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.card__title { font-size: var(--fs-title); font-weight: 400; line-height: 1.25; text-wrap: balance; }
.card__title a { color: var(--copper-ink); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__title a { color: var(--ink); }
.card__title a:focus-visible { outline: none; }
.card:has(.card__title a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.card__excerpt { margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.55; max-width: 34rem; }
.card__meta { margin-top: auto; padding-top: var(--s3); font-size: var(--fs-meta); font-weight: 400; color: var(--muted); }
.card .card__thumb { display: block; width: 5.5rem; }

.card ul { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.5; }
.card ul li { position: relative; padding-left: 1.125rem; }
.card ul li + li { margin-top: var(--s1); }
.card ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.5rem; height: 2px; background: var(--copper); }
.card__foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: auto; padding-top: var(--s4); font-size: var(--fs-small); }
.card__foot dt { font-size: var(--fs-meta); color: var(--muted); }
.card__foot dd { color: var(--ink); font-weight: 400; }
.card--plain .card__title { color: var(--ink); }
.card--feature .card__title { font-size: var(--fs-h2); }
.card--feature .card__body { padding-block: 1.5rem; }

@media (max-width: 56rem) { .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 47.99rem) {
  .cards, .cards--3 { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .card .card__thumb { width: 4.5rem; }
}

/* --------------------------------------------------------------------------
   Band: full-width sage, one centred link
   -------------------------------------------------------------------------- */

.band { background: var(--sage); }
.band a {
  display: flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 3.25rem; padding: var(--s3) var(--gutter);
  color: var(--on-sage); font-size: var(--fs-body); font-weight: 400; line-height: 1.3; text-align: center;
}
.band a:hover { background: var(--sage-dark); color: var(--on-sage); }
.band a:focus-visible { outline-color: var(--on-sage); outline-offset: -6px; }

/* --------------------------------------------------------------------------
   Rows: text beside a circle-cropped image
   -------------------------------------------------------------------------- */

.rows { display: grid; gap: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }

.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(1.75rem, 5vw, 4.5rem); }
.row--left { grid-template-columns: auto minmax(0, 1fr); }
.row--left .circle { order: -1; }
.row__text { max-width: var(--measure); }
.row__text h3 { font-size: var(--fs-title); }
.row__text h3 + p, .row__text p + p { margin-top: var(--s3); }
.row__text .btn { margin-top: var(--s5); }
.row__text .actions .btn { margin-top: 0; }  /* two buttons side by side share the one gap above them */
.row__note { font-size: var(--fs-meta); font-weight: 400; color: var(--muted); }

.circle {
  flex: none; width: clamp(11rem, 6rem + 17vw, 18.5rem); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; background: var(--rule);
}
.circle img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--x, 50%) var(--y, 50%);
  transform: scale(var(--zoom, 1)); transform-origin: var(--x, 50%) var(--y, 50%);
}
.circle--sm { width: clamp(7.5rem, 4.5rem + 9vw, 11.5rem); }

@media (max-width: 40rem) {
  .row, .row--left { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .row .circle { order: -1; width: 11rem; }
}

/* --------------------------------------------------------------------------
   Simple grids of short text blocks
   -------------------------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: var(--s6) clamp(1.5rem, 3vw, 2.5rem); }
.grid h3 { font-size: 1.1875rem; line-height: 1.3; }
.grid h3 + p { margin-top: var(--s2); }
.grid p { font-size: var(--fs-small); line-height: 1.6; }
.label { display: block; margin-bottom: var(--s2); color: var(--copper-ink); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 56rem) { .grid--4 { --cols: 2 !important; } .grid--3 { --cols: 2 !important; } }
@media (max-width: 36rem) { .grid, .grid--4, .grid--3 { --cols: 1 !important; gap: var(--s5); } }

/* Services beside the office circle on the home page */
.plug { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.plug .grid { margin-top: var(--s6); }
.plug .btn { margin-top: var(--s6); }
@media (max-width: 56rem) {
  .plug { grid-template-columns: minmax(0, 1fr); }
  .plug .circle { order: -1; width: 11rem; }
}

/* Personal block: text and two small circles */
.life { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.life__photos { display: flex; gap: clamp(1rem, 2.5vw, 2rem); }
.life__photos figcaption { margin-top: var(--s3); text-align: center; font-size: var(--fs-meta); font-weight: 400; color: var(--muted); }
@media (max-width: 47.99rem) { .life { grid-template-columns: minmax(0, 1fr); } }

/* Figures in a row: light numerals over a label */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5) clamp(1.5rem, 3vw, 2.5rem); }
.stats > div { padding-top: var(--s4); border-top: 4px solid var(--rule); }
.stats b { display: block; color: var(--ink); font-size: var(--fs-h2); font-weight: 300; line-height: 1.2; }
.stats span { display: block; margin-top: var(--s1); font-size: var(--fs-small); line-height: 1.5; text-wrap: balance; }
@media (max-width: 47.99rem) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Definition rows: small label, value */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s5) clamp(1.25rem, 2.5vw, 2rem); }
.facts > div { padding-top: var(--s4); border-top: 4px solid var(--rule); }
.facts dt { font-size: var(--fs-meta); color: var(--muted); }
.facts dd { color: var(--ink); font-weight: 400; line-height: 1.45; }

/* --------------------------------------------------------------------------
   Contact: text on the left, ways to reach me on the right. No form.
   The 2016 phone | email line, turned into rows with the same hairline.
   -------------------------------------------------------------------------- */

.hire { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hire__text > * + * { margin-top: var(--s4); }
.hire__text h3 { font-size: 1.1875rem; margin-top: var(--s6); }

.reach { border-top: 1px solid var(--line); }
.reach a { display: grid; grid-template-columns: 1.25rem auto minmax(0, 1fr); align-items: center; gap: 0 var(--s4); min-height: 3.5rem; padding: var(--s3) var(--s1); border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 400; }
.reach .icon { width: 1.125rem; height: 1.125rem; color: var(--strip); }
.reach span { color: var(--copper-ink); font-weight: 300; text-align: right; overflow-wrap: anywhere; }
.reach a:hover span { color: var(--ink); }
.reach .first { min-height: 4rem; }
.reach .first span { font-size: var(--fs-title); font-weight: 400; }

.steps { counter-reset: step; }
.steps li { position: relative; padding-left: 2rem; counter-increment: step; }
.steps li + li { margin-top: var(--s2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; color: var(--copper-ink); font-weight: 400; }

/* the checklist in a post */
input[type="checkbox"] { width: 1.125rem; height: 1.125rem; margin: 0; flex: none; accent-color: var(--sage-deep); border-radius: 0; }

@media (max-width: 47.99rem) {
  .hire { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   Footer: one centred line
   -------------------------------------------------------------------------- */

.foot { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem); background: var(--paper); text-align: center; }
.foot p { max-width: 46rem; margin-inline: auto; text-wrap: balance; }
.foot a { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Running text on inner pages
   -------------------------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.25em; }
.prose a:not(.btn), .text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.prose .pager a { text-decoration: none; }
.prose h2 { margin-top: var(--s8); }
.prose h3 { margin-top: var(--s7); font-size: var(--fs-title); scroll-margin-top: var(--s5); }
.prose h3 .num { margin-right: 0.625rem; color: var(--copper-ink); font: 400 0.8125rem/1 var(--font-mono); vertical-align: 0.2em; }
/* The same numeral in front of a numbered h2 over the thick rule. */
.prose h2 .num { margin-right: var(--s3); color: var(--copper-ink); font: 400 0.8125rem/1 var(--font-mono); vertical-align: 0.4em; }
.prose h3 + * { margin-top: var(--s4); }
/* Inline code stays in one piece, so a method name such as ->visible() is never
   split after its hyphen. One too long for the line still breaks. */
.prose :not(pre, .card__strip) > code { display: inline-block; padding: 0.1em 0.35em; background: #EFEFEF; color: var(--ink); font-size: 0.78em; line-height: 1.32; word-break: break-all; overflow-wrap: anywhere; }

/* Code block in the dark-strip style */
.code { background: var(--strip); color: #F4F4F4; }
.code__bar { display: flex; justify-content: space-between; gap: var(--s4); padding: 0.75rem 1.25rem 0; color: #D6D6D6; font-size: 0.6875rem; font-weight: 400; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; }
.code__bar span:first-child { min-width: 0; overflow-wrap: anywhere; }  /* a long file path may break anywhere */
.code pre { padding: 0.875rem 1.25rem 1rem; overflow-x: auto; font-size: 0.8125rem; line-height: 1.75; tab-size: 2; }
.code pre:focus-visible { outline-offset: -4px; outline-color: var(--white); }
.code .k { color: var(--sage-light); }

/* Aside set off by the thick pale rule, turned on its side */
.note { padding: 0.125rem 0 0.125rem 1.125rem; border-left: 8px solid var(--rule); font-size: var(--fs-small); line-height: 1.6; }
.note b { color: var(--copper-ink); font-weight: 500; }

/* Post layout: article at a readable measure, contents beside it on wide screens */
.post { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 17rem); justify-content: space-between; gap: var(--s7) clamp(2rem, 6vw, 5rem); align-items: start; }
.toc { position: sticky; top: var(--s5); font-size: var(--fs-small); }
.toc h2 { padding-bottom: var(--s3); border-bottom: 4px solid var(--rule); font-size: var(--fs-meta); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.toc ol { margin-top: var(--s3); }
.toc li a { display: grid; grid-template-columns: 2rem 1fr; padding: 0.3rem 0; color: var(--text); }
.toc li a:hover { color: var(--copper-ink); }
.toc li a span { color: var(--copper-ink); font: 400 0.8125rem/2 var(--font-mono); }
.toc p { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-meta); line-height: 1.5; }
@media (max-width: 60rem) {
  .post { grid-template-columns: minmax(0, var(--measure)); justify-content: start; }
  .toc { position: static; order: -1; max-width: 22rem; }
}

.struck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s6); }
.struck s { display: block; color: var(--ink); font-weight: 400; line-height: 1.35; text-decoration-color: var(--copper); text-decoration-thickness: 2px; }
.struck p { margin-top: var(--s1); font-size: var(--fs-small); line-height: 1.55; }
@media (max-width: 36rem) { .struck { grid-template-columns: minmax(0, 1fr); } }

.panel { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); background: var(--paper); }
.panel h3 { margin-top: 0; }
.panel .actions { margin-top: var(--s4); }

.checks { counter-reset: check; }
.checks li + li { border-top: 1px solid var(--line); }
.checks label { display: grid; grid-template-columns: 1.125rem minmax(0, 1fr); gap: var(--s4); padding: var(--s4) 0; cursor: pointer; }
.checks input { margin-top: 0.35em; }
.checks label > span { display: block; }
.checks strong { display: block; font-weight: 400; line-height: 1.4; }
.checks strong + span { display: block; margin-top: var(--s1); font-size: var(--fs-small); line-height: 1.5; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); padding-top: var(--s5); border-top: 8px solid var(--rule); }
.pager a { display: block; }
.pager a span { display: block; color: var(--muted); font-size: var(--fs-meta); }
.pager a strong { color: inherit; font-weight: 400; line-height: 1.35; }
.pager a:last-child { text-align: right; }
@media (max-width: 36rem) { .pager { grid-template-columns: minmax(0, 1fr); } .pager a:last-child { text-align: left; } }

/* --------------------------------------------------------------------------
   Writing index: list of posts under a year heading
   -------------------------------------------------------------------------- */

.posts li { border-bottom: 1px solid var(--line); }
.posts li:first-child { border-top: 0; }
.posts a { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: var(--s2) var(--s5); align-items: baseline; padding: var(--s4) 0 1.125rem; color: var(--text); }
.posts time { color: var(--muted); font-size: var(--fs-meta); font-weight: 400; white-space: nowrap; }
.posts h3 { color: var(--copper-ink); font-size: var(--fs-title); line-height: 1.3; }
.posts a:hover h3 { color: var(--ink); }
/* An entry with no page yet has no link, so its title is plain ink instead of copper. */
.posts a:not([href]) h3, .card__title a:not([href]) { color: var(--ink); }
.posts p { margin-top: var(--s1); max-width: 38rem; font-size: var(--fs-small); line-height: 1.55; }
.posts .side { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: var(--fs-meta); font-weight: 400; white-space: nowrap; }
.tag { display: inline-block; padding: 0.3rem 0.5rem; background: var(--strip); color: var(--white); font: 400 0.6875rem/1 var(--font-mono); }
.year + .year { margin-top: var(--s8); }
.year .sec-title { margin-bottom: var(--s2); }
@media (max-width: 40rem) {
  .posts a { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .posts .side { margin-top: var(--s2); }
}

/* --------------------------------------------------------------------------
   Project page pieces
   -------------------------------------------------------------------------- */

.shot { border: 1px solid var(--rule); background: var(--white); }
.shot img { width: 100%; }
.shot--pins { position: relative; }
.pin {
  position: absolute; display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem; margin: -0.875rem 0 0 -0.875rem; border-radius: 50%;
  background: var(--copper); color: var(--white); font-size: 0.875rem; font-weight: 500; line-height: 1;
  outline: 2px solid var(--white);
}
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.split--top { align-items: start; }
.stack > * + * { margin-top: var(--s4); }
@media (max-width: 56rem) { .split, .split--wide-left { grid-template-columns: minmax(0, 1fr); } }

.legend { counter-reset: pin; }
.legend li { position: relative; padding-left: 2.75rem; counter-increment: pin; }
.legend li + li { margin-top: var(--s5); }
.legend li::before {
  content: counter(pin); position: absolute; left: 0; top: 0.1rem;
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--copper); color: var(--white); font-size: 0.875rem; font-weight: 500; line-height: 1;
}
.legend h3 { font-size: 1.1875rem; }
.legend p { margin-top: var(--s1); font-size: var(--fs-small); line-height: 1.6; }

.people { display: grid; gap: var(--s6); }
.person { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--s4); }
.person img { width: 3rem; height: 3rem; border-radius: 50%; }
.person h3 { font-size: 1.1875rem; }
.person .meta { display: block; }
.person p { margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.6; }

.board { width: 100%; border-collapse: collapse; background: var(--white); font-size: var(--fs-small); }
.board caption { padding: 0.625rem 1.25rem; background: var(--strip); color: var(--white); font: 400 0.8125rem/1.4 var(--font-mono); text-align: left; }
.board th, .board td { padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--rule); text-align: right; font-weight: 300; }
.board th:first-child, .board td:first-child { text-align: left; }
.board thead th { color: var(--muted); font-size: var(--fs-meta); }
.board tbody th { color: var(--ink); font-weight: 400; }

.calls { background: var(--white); }
.section:not(.section--paper) .board, .section:not(.section--paper) .calls { border: 1px solid var(--rule); }
.board + .calls { margin-top: var(--s5); }
.calls li { padding: var(--s4) 1.25rem; border-bottom: 1px solid var(--rule); }
.calls li:last-child { border-bottom: 0; }
.calls .who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); color: var(--muted); font-size: var(--fs-meta); }
.calls p { margin-top: var(--s2); color: var(--ink); line-height: 1.55; }

.pull { max-width: 30rem; color: var(--ink); font-size: var(--fs-h2); font-weight: 300; line-height: 1.35; text-wrap: balance; }

.next li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.next li:first-child { padding-top: 0; }
.next .label { margin: 0.35em 0 0; }
.next b { display: block; font-weight: 400; }
.next span:not(.label) { font-size: var(--fs-small); }

/* FAQ, all answers open */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) clamp(2rem, 5vw, 4.5rem); }
.faq dt { color: var(--ink); font-size: 1.1875rem; font-weight: 400; line-height: 1.3; }
.faq dd { margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.6; }
@media (max-width: 47.99rem) { .faq { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }

/* Spacing helpers used between stacked blocks inside a section */
.mt-6 { margin-top: var(--s6); }
.mt-7 { margin-top: var(--s7); }
.mt-8 { margin-top: clamp(3rem, 2rem + 4vw, 4.5rem); }

/* Touch screens get taller controls */
@media (pointer: coarse) {
  :root { --control: 2.75rem; }
  .btn--sm { min-height: 2.5rem; }
}
