/* Editorial dossier: paper, ink, navy, a little brass. Mobile first (360px), system fonts only. */
/* No web fonts, no third-party CSS; the CSP is self-only. */
:root {
  --paper: #faf8f2;            /* page background */
  --ink-h: #141c26;            /* headings */
  --ink: #17202a;              /* body text */
  --muted: #5a6472;            /* captions, secondary lines (5.6:1 on paper) */
  --navy: #173f5f;             /* primary: figures, buttons, practice line */
  --brass: #b07d2b;            /* accent: section numbers, rule segment, markers (large or decorative only) */
  --brass-text: #8a5f1c;       /* darker brass for small text: #b07d2b is 3.4:1 on paper, this is 5.3:1 */
  --rule: #ddd6c7;             /* strong hairline */
  --rule-2: #e4ddcd;           /* light hairline */
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  --dock-h: 76px;              /* space kept clear above the mobile dock */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));   /* nothing hides behind the dock */
}
/* top rule: 7px, ink for ~58%, brass for the rest */
body::before {
  content: ""; display: block; height: 7px;
  background: linear-gradient(to right, var(--ink-h) 58%, var(--brass) 58%);
}
a { color: var(--navy); }
h1, h2, h3, h4 { color: var(--ink-h); margin: 0; line-height: 1.2; }
p { margin: 0 0 0.75rem; }
ul { margin: 0; padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 12px; min-height: 44px; display: inline-flex; align-items: center; background: var(--paper); padding: 0 14px; border: 1px solid var(--rule); }
.skip:focus { left: 8px; z-index: 20; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* ===== Identity (hero on mobile, rail on desktop) ===== */
.rail-in { padding: 22px var(--gutter) 0; }
.eyebrow {
  font: 700 0.75rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brass-text); margin-bottom: 8px;
}
.name { font: 700 2.4rem/1.05 var(--serif); letter-spacing: -0.01em; margin-bottom: 10px; }
.practice { font: 600 0.84rem/1.4 var(--mono); color: var(--navy); margin-bottom: 10px; }
.lede { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }

/* ===== Headline numbers: 2x2, hairlines above and below the band, no boxes ===== */
.metrics {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 6px 0;
}
.metrics li { min-width: 0; }
.metrics li:has(details[open]) { grid-column: 1 / -1; }   /* an opened figure gets the full width for its sentence */
.metrics summary { padding: 8px 0; min-height: 44px; }
.fig { display: block; font: 800 1.25rem/1.2 var(--sans); color: var(--navy); }
.fig.word { font-size: 1rem; }
.cap { display: block; font-size: 0.8rem; line-height: 1.35; color: var(--muted); }
.metrics details p { font-size: 0.86rem; color: var(--ink); margin: 0 0 10px; }

/* native disclosures without the default triangle; small brass markers instead */
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ===== Numbered dossier sections ===== */
main { counter-reset: sec; padding: 0 var(--gutter); }
.sec { padding: 22px 0 18px; border-top: 1px solid var(--rule); }
main > .sec:first-child { border-top: 0; }   /* the metrics band already draws a rule */
.sh {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px;
  font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-h);
}
/* the section number is drawn here, not written in the HTML, so furniture stays digit-free */
.sh::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  font: 400 1.65rem/1 var(--serif); letter-spacing: 0; color: var(--brass); min-width: 2.1rem;
}
.sh.plain-h::before { content: none; counter-increment: none; }
/* section bodies line up under the title, not under the number (as in the reference) */
.sec > *:not(.sh) { margin-left: calc(2.1rem + 14px); }
.contact > *:not(.sh) { margin-left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: #fff; color: var(--ink-h);
  font: 700 0.9rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.stack { display: grid; gap: 10px; }
.stack .btn { min-height: 48px; }

/* ===== 01 Ask ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule);
  background: #fff; color: var(--ink); font: 0.88rem/1.3 var(--sans); cursor: pointer; text-align: left;
  max-width: 100%; white-space: normal;   /* long questions wrap inside the pill at 360px */
}
.chip:hover { border-color: var(--navy); }
.draft { margin-left: 8px; font: 700 0.7rem var(--mono); text-transform: uppercase; color: var(--brass-text); }
.more-chips { margin-bottom: 12px; }
.more-chips > summary {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 600 0.88rem var(--sans); color: var(--navy);
}
.more-chips > summary::after { content: "+"; margin-left: 8px; color: var(--brass); font-weight: 700; }
.more-chips[open] > summary::after { content: "-"; }
.askform { display: flex; gap: 8px; margin-bottom: 8px; }
.askform input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--rule); background: #fff; color: var(--ink); font: 16px var(--sans);   /* 16px: no iOS zoom */
}
.askform .btn { min-height: 48px; padding: 0 20px; border-radius: 10px; }
.answer {
  margin-top: 12px; padding: 14px 0 4px; border-top: 2px solid var(--navy);
  scroll-margin-bottom: calc(var(--dock-h) + 16px);   /* scrolled into view above the dock, not behind it */
}
.answer.loading .text { color: var(--muted); }
.asked { font: 600 0.8rem/1.4 var(--mono); color: var(--navy); }
.answer .text { font-size: 1rem; }
.hint, .sources, .fine { font-size: 0.82rem; color: var(--muted); }

/* ===== 02 Selected work ===== */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule);
  border-radius: 999px; overflow: hidden; margin-bottom: 6px; background: #fff;
}
.seg[hidden] { display: none; }
.seg button {
  min-height: 44px; border: 0; background: transparent; color: var(--ink-h);
  font: 700 0.85rem var(--sans); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.js-seg .chapter.is-off { display: none; }    /* only once site.js runs; without it both chapters stack */
.js-seg .chapter .ch { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ch { font: 400 1.15rem/1.3 var(--serif); margin: 6px 0 2px; }
.intro { color: var(--muted); font-size: 0.88rem; margin: 8px 0 4px; }

/* hairline rows: bold title, muted summary clamped to two lines; tap opens the full text */
.rows > li { border-bottom: 1px solid var(--rule-2); }
.rows > li:last-child { border-bottom: 0; }
.rows summary { display: block; padding: 12px 0; min-height: 44px; }
.rows .t { display: block; font-weight: 700; color: var(--ink-h); font-size: 0.97rem; }
.rows .s {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  color: var(--muted); font-size: 0.86rem; line-height: 1.45;
}
.rows details[open] .s { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; color: var(--ink); }
.rows .t::after { content: " +"; color: var(--brass); font-weight: 700; }
.rows details[open] .t::after { content: " -"; }
.sub { margin: 0 0 12px; padding-left: 18px; list-style: disc; color: var(--muted); font-size: 0.86rem; }

/* ===== 03 Experience ===== */
.profile { font-size: 0.92rem; color: var(--ink); }
.more { padding: 0 0 12px; font-size: 0.88rem; }
.where { color: var(--muted); font: 0.78rem/1.4 var(--mono); }
.roles li { display: flex; flex-direction: column; margin-bottom: 8px; }
.roles .title { font-weight: 600; color: var(--ink-h); }
.roles .dates { color: var(--muted); font: 0.78rem/1.4 var(--mono); }
.roles .func { color: var(--muted); }
.highlights { margin-top: 8px; padding-left: 18px; list-style: disc; }
.highlights li { margin-bottom: 6px; }

/* ===== 04-06 Skills, Education, Credentials ===== */
.plain li { padding: 8px 0; border-bottom: 1px solid var(--rule-2); font-size: 0.9rem; }
.plain li:last-child { border-bottom: 0; }

/* ===== Contact, footer ===== */
.contact { padding-bottom: 8px; }
.contact .fine { margin-top: 10px; font-family: var(--mono); }
.foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; padding: 16px 0 24px; }

/* ===== Mobile sticky dock: three targets, each at least 44px tall ===== */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 248, 242, 0.96); border-top: 1px solid var(--rule);
}
.dock .btn { min-height: 48px; padding: 4px 6px; font-size: 0.78rem; border-radius: 12px; }

.maint { max-width: 520px; margin: 0 auto; padding: 64px var(--gutter); }

/* ===== Desktop: the same design with a pinned identity rail; no buttons in the rail ===== */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .page { display: grid; grid-template-columns: 320px minmax(0, 1fr); max-width: 1120px; margin: 0 auto; }
  .rail { border-right: 1px solid var(--rule); }
  .rail-in { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 32px 28px 24px; }
  .name { font-size: 2.5rem; }
  .metrics { grid-template-columns: 1fr; border-bottom: 0; padding: 0; }
  .metrics li { border-bottom: 1px solid var(--rule-2); }
  .metrics li:last-child { border-bottom: 0; }
  main { padding: 18px 40px 0; max-width: 760px; }
  /* two chapters on desktop: control hidden, both chapters shown with their headings */
  .seg, .seg[hidden] { display: none; }
  .js-seg .chapter.is-off { display: block; }
  .js-seg .chapter .ch { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .chapter + .chapter { margin-top: 18px; }
  .stack { max-width: 420px; }
  .roles li { flex-direction: row; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
}

/* print: reads as one document; drop the interactive furniture */
@media print {
  body { padding: 0; background: #fff; }
  .dock, .askform, .chips, .more-chips, .seg, .skip, .stack .btn { display: none !important; }
  .js-seg .chapter.is-off { display: block; }
  .rows .s { -webkit-line-clamp: unset; line-clamp: none; display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
