:root {
  --p-bg: #eeecea; --p-surface: #e4e1dd; --p-ink: #333231; --p-muted: #625f5b;
  --p-accent: #5c6b54; --p-accent-ink: #ffffff; --p-action: #5c6b54; --p-action-ink: #ffffff;
  --p-inv-bg: #333231; --p-inv-surface: #3e3d3c; --p-inv-ink: #eeecea; --p-inv-muted: #c5c1ba;
  --p-inv-accent: #eeecea; --p-inv-accent-ink: #333231; --p-inv-action: #eeecea; --p-inv-action-ink: #333231;
  --font-display: "Zilla Slab", Georgia, serif; --font-text: "Rethink Sans", system-ui, sans-serif;
  --display-weight: 400; --display-tracking: -0.018em; --display-tracking-xl: -0.024em; --ly-scale: 1.02;
  --ly-h1: clamp(42px, 6.1vw, 88px);
}
html { color-scheme: light; }
::selection { color: var(--p-bg); background: var(--p-accent); }
a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 5px; }
.site-header { background: var(--p-bg); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); height: var(--nav); }
.site-name { display: inline-flex; align-items: center; min-height: 44px; font: 400 26px/1 var(--font-display); letter-spacing: -0.03em; }
.site-name span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: var(--s-6); }
.site-nav a, .header-contact { min-height: 44px; display: inline-flex; align-items: center; gap: var(--s-2); font-size: 15px; }
.header-contact { margin-left: var(--s-8); }
.brand-icon { width: 16px; height: 16px; flex: none; object-fit: contain; }
.hero h1 { text-wrap: initial; }
.hero h1 > span { display: block; }
.hero .hero__kicker { font-size: 14px; color: var(--ink); }
.hero .hero__lead { max-width: 41ch; margin-top: var(--s-6); }
.text-action { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-size: 15px; }
.hero__media.portrait-frame { border-radius: 0; background: transparent; }
.portrait-frame > picture { display: flex; width: 100%; height: 100%; align-items: center; }
.hero__media.portrait-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.hero .hero-contact { border-color: var(--accent); text-decoration: none; }
.hero-availability { margin-top: var(--s-4); padding-bottom: var(--s-5); max-width: 48ch; font-size: 15px; line-height: 1.5; color: var(--ink); }

main > section.practice { height: auto; min-height: 100svh; }
.practice-grid { margin-top: var(--s-7); align-items: start; }
.practice-intro { margin-top: var(--s-7); align-items: center; }
.practice-intro > p:last-child { max-width: 50ch; }
.practice .mo-wh__text { font-size: clamp(28px, 2.7vw, 38px); line-height: 1.2; max-width: 23ch; }
/* Keep the statement readable before its words darken. */
.practice.mo-wh .mo-w { color: #68645d; }
.practice.mo-wh .mo-w.is-on { color: var(--ink); }
.experience-note { margin-top: 0; }
.experience-heading .t-small { color: var(--muted); margin-bottom: var(--s-3); }
.career-notes { margin: 0; font-size: 16px; line-height: 1.55; }
.career-notes > div + div { margin-top: var(--s-5); }
.career-notes dt { display: inline; font-weight: 500; }
.career-notes dt::after { content: " / "; color: var(--muted); font-weight: 400; white-space: pre; }
.career-notes dd { display: inline; margin: 0; }
.career-period, .career-detail { display: block; margin-top: var(--s-1); }
.career-period { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.career-detail { font-size: 16px; }
.practice-list > li { padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.practice-list > li:first-child { padding-top: 0; }
.practice-list h3 { font-size: var(--t-h3); margin-bottom: var(--s-2); }
.practice-list p { line-height: 1.6; max-width: 58ch; }
.practice-list .personal-project-tools { margin-top: var(--s-3); }
.work-sample-entry { margin-top: var(--s-6); padding: var(--s-5); background: var(--p-bg); border-radius: var(--r-lg); align-items: start; }
.work-sample-entry .t-small { color: var(--muted); margin-bottom: var(--s-2); }
.work-sample-entry h3 { font-size: var(--t-h3); max-width: 28ch; margin-bottom: var(--s-3); }
.work-sample-copy > p + p { margin-top: var(--s-3); }
.work-sample-entry .btn { margin-top: var(--s-4); border-color: var(--accent); background: var(--p-bg); }
.regulatory-context { margin-top: var(--s-7); display: grid; gap: var(--s-3); }
.regulatory-context h3 { font-size: var(--t-h3); }
.regulatory-context > p { font-size: 16px; max-width: none; }
.standards-groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); font-size: 16px; line-height: 1.6; }
.standards-groups dt { font-weight: 500; }
.standards-groups dd { margin: var(--s-2) 0 0; }

.project-heading { max-width: none; gap: var(--s-4); }
.project-heading > p { max-width: none; }
main > section.projects { height: auto; min-height: 100svh; }
.project-grid { align-items: stretch; }
.project { display: flex; flex-direction: column; min-width: 0; gap: 0; }
.project.card--open > .project-art { margin: 0; }
.project-art { display: flex; align-items: center; overflow: hidden; border-radius: var(--r-lg); background: #081523; height: clamp(180px, 17vw, 244px); }
.project-art img { width: 100%; height: auto; }
.project:last-child .project-art { background: #ffffff; }
.project-meta { margin: var(--s-5) 0 var(--s-3); }
.project-meta h3 { font-size: var(--t-h3); }
.project > p { max-width: none; }
.project-status { font-size: 14px; margin-top: var(--s-4); color: var(--muted); }
.project-tagline { margin-bottom: var(--s-3); font-weight: 500; }
.project > p:last-of-type { margin-bottom: var(--s-5); }
.project-link { display: inline-flex; align-items: center; align-self: start; gap: var(--s-2); min-height: 44px; margin-top: auto; font-size: 15px; flex-shrink: 0; }

.about-copy > p { max-width: none; font-size: 18px; line-height: 1.65; }
.about-copy > .contact-invitation { margin-top: var(--s-5); font-size: 16px; }
/* This closing section follows the owner's compact-footer brief. */
.site-footer.closing { --padt: var(--s-8); --padb: var(--s-6); height: auto; min-height: 0; padding: var(--padt) 0 var(--padb); scroll-margin-top: var(--nav); }
.site-footer.closing > .wrap { display: block; height: auto; }
.site-footer .about-grid > h2 { max-width: none; }
.contact-email { min-height: 44px; display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); font-size: 18px; }
.contact-email .brand-icon { filter: invert(1); }
.footer-copyright { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); }
.error-page { min-height: 100svh; display: flex; flex-direction: column; align-items: start; justify-content: center; gap: var(--s-5); }

/* A reading page shares the site's type and edges, with natural document height. */
.sample-main { padding-top: calc(var(--nav) + var(--s-7)); }
.sample-article { max-width: 920px; padding-bottom: var(--s-8); }
.sample-heading .t-small { color: var(--muted); margin-bottom: var(--s-4); }
.sample-heading h1 { font: 400 clamp(36px, 5vw, 64px)/1.08 var(--font-display); letter-spacing: var(--display-tracking); max-width: 20ch; }
.sample-boundary { margin-top: var(--s-5); font-size: 16px; max-width: 68ch; color: var(--muted); }
.sample-background { margin-top: var(--s-4); font-size: 16px; max-width: 68ch; line-height: 1.6; }
.sample-prose { margin-top: var(--s-6); max-width: 68ch; }
.sample-prose p { font-size: 18px; line-height: 1.7; max-width: none; }
.sample-prose p + p { margin-top: var(--s-5); }
.sample-prose h2, .worked-example h2, .evidence-illustration h2 { font-size: var(--t-h3); line-height: 1.25; }
.sample-prose h2 { margin-top: var(--s-7); margin-bottom: var(--s-4); }
.sample-prose .sample-lead { font: 400 clamp(24px, 3vw, 30px)/1.35 var(--font-display); }
.evidence-illustration { margin-block: var(--s-6); padding-block: var(--s-5); border-block: 1px solid var(--line-strong); }
.evidence-illustration > .t-small { color: var(--muted); margin-bottom: var(--s-2); }
.decision-sketch { display: block; width: 100%; height: auto; max-width: 820px; margin: var(--s-5) auto var(--s-3); overflow: visible; }
.decision-sketch--narrow { display: none; max-width: 400px; }
.sketch-node, .sketch-decision { fill: var(--p-bg); stroke: var(--p-accent); stroke-width: 2; stroke-linejoin: round; }
.sketch-decision { fill: #e3e7dd; }
.sketch-reuse { fill: #e3e7dd; }
.sketch-final { fill: #d5ddce; }
.sketch-connectors, .decision-sketch marker path { fill: none; stroke: var(--p-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sketch-text { fill: var(--p-ink); font: 20px var(--font-text); text-anchor: middle; }
.sketch-branch { font-weight: 500; paint-order: stroke; stroke: var(--p-bg); stroke-width: 8; stroke-linejoin: round; }
.diagram-description { font-size: 16px; }
.diagram-description summary { width: fit-content; min-height: 44px; padding-block: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.diagram-description p { max-width: 68ch; padding-top: var(--s-3); line-height: 1.6; }
.worked-example { margin-top: var(--s-7); }
.example-boundary { color: var(--ink); font-size: 16px; margin-top: var(--s-3); }
.worked-example dl { margin: var(--s-5) 0 0; }
.worked-example dl > div { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: var(--s-5); padding-block: var(--s-4); border-top: 1px solid var(--line-strong); font-size: 17px; line-height: 1.6; }
.worked-example dt { font-weight: 500; }
.worked-example dd { margin: 0; }
.sample-footer.closing { --padt: var(--s-5); --padb: var(--s-5); height: auto; min-height: 0; border-top: 1px solid var(--line-strong); padding-block: var(--padt) var(--padb); color: var(--muted); font-size: 14px; }
.sample-footer.closing > .wrap { height: auto; display: block; }

@media (min-width: 1024px) and (max-height: 800px) {
  :root { --padt: 96px; --hgap: 32px; --hpadb: 48px; }
  .practice-grid { margin-top: var(--s-6); }
  .practice-list > li { padding-block: var(--s-4); }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .hero h1 { font-size: 56px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .header-contact { margin-left: 0; }
  .hero h1 { font-size: 64px; }
  .hero__media.portrait-frame { min-height: 280px; }
  .hero__media.portrait-frame > picture { max-width: 350px; margin-inline: auto; }
  .practice-intro > p, .practice-intro > .experience-heading { grid-column: auto / span 6; }
  .practice-context, .practice-grid > div:last-child { grid-column: 1 / -1; }
  .career-notes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
  .career-notes > div + div { margin-top: 0; }
  .practice-list { margin-top: var(--s-7); }
  .practice-list > li { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s-5); }
  .practice-list .personal-project-tools { grid-column: 2; margin-top: 0; }
  .project-grid > .project { grid-column: 1 / -1; }
  .project-grid { row-gap: var(--s-8); }
  .project-art { height: 240px; }
  .about-grid > h2, .about-grid > div { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  :root { --nav: 104px; --hgap: 24px; --padt: 80px; --padb: 64px; }
  .site-header__inner { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s-5); grid-template-rows: 60px 44px; }
  .site-name { justify-self: start; font-size: 25px; }
  .header-contact { grid-column: 2; grid-row: 1; margin: 0; font-size: 14px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; width: 100%; gap: var(--s-4); }
  .site-nav a { font-size: 14px; }
  .hero h1 { font-size: clamp(37px, 10.8vw, 57px); }
  .hero .hero__kicker { font-size: 13px; }
  .hero .hero__lead { font-size: 16px; margin-top: var(--s-5); line-height: 1.5; }
  .hero__text > .btn-row { margin-top: var(--s-5); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--s-3); }
  .hero .btn { padding-inline: 12px; font-size: 16px; }
  .hero-contact { justify-content: center; }
  .hero--split .hero__media { flex: 1 0 220px; min-height: 220px; margin-top: var(--s-5); }
  .hero--split > .wrap > .hero-text { min-height: calc(100svh - var(--nav) - var(--hgap) - var(--hpadb)); }
  main > section:not(.hero), footer.closing { min-height: 0; height: auto; }
  .practice-grid { margin-top: var(--s-6); }
  .practice-context, .practice-grid > div:last-child { grid-column: 1 / -1; }
  .practice .mo-wh__text { font-size: 30px; }
  .practice-intro { row-gap: var(--s-5); }
  .practice-intro > p, .practice-intro > .experience-heading { grid-column: 1 / -1; }
  .work-sample-entry { padding: var(--s-5) var(--s-4); row-gap: var(--s-4); }
  .regulatory-context { margin-top: var(--s-6); }
  .standards-groups { grid-template-columns: 1fr; gap: var(--s-4); }
  .practice-list { margin-top: var(--s-6); }
  .project-grid > .project { grid-column: 1 / -1; }
  .project-grid { row-gap: var(--s-8); }
  .project-art { height: 160px; }
  .about-grid > h2, .about-grid > div { grid-column: 1 / -1; }
  .about-copy > p { font-size: 16px; }
  .site-footer.closing { --padt: var(--s-7); --padb: var(--s-5); }
  .site-footer .about-grid { row-gap: var(--s-5); }
  .footer-copyright { margin-top: var(--s-6); }
  .error-page { padding-block: var(--s-8); }
  .sample-main { padding-top: calc(var(--nav) + var(--s-6)); }
  .sample-prose p { font-size: 17px; }
  .worked-example dl > div { grid-template-columns: 1fr; gap: var(--s-2); }
}
@media (max-width: 759px) {
  .decision-sketch--wide { display: none; }
  .decision-sketch--narrow { display: block; }
}
@media (max-width: 359px) {
  :root { --gut: 20px; }
  .hero--split .hero__media { flex-basis: 200px; min-height: 200px; }
  .hero__text > .btn-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
}
@media print {
  .site-header { position: static; }
  main > section, footer.closing { height: auto; min-height: 0; padding-block: 32px; }
  .hero__media { max-height: 360px; }
}
