/* VOICE: a senior consultant's resume, set like a well-edited magazine profile.
   IDEA: an editorial page; the career is drawn as a 2005 to now ruler, one bar per role.
   PICTURE: the photo in the hero, then the career ruler.
   COLOUR and TYPE: white, ink, one cobalt accent; Newsreader for headings, Inter for text.
   LAYOUT: hero (text + photo), ruler, the two AI tools on a tinted band, then the full resume. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #121314);
  --ink: light-dark(#141516, #ececea);
  --mut: light-dark(#5b6168, #a4a9ae);
  --line: light-dark(#e2e3e0, #2c2f33);
  --band: light-dark(#f4f5f8, #191b1f);
  --card: light-dark(#ffffff, #1d2024);
  --acc: light-dark(#2340c8, #93a5ff);
  --acc-soft: light-dark(#e8ecfb, #232a48);
  --bar: light-dark(#bcc5ec, #3a4472);
  --good: light-dark(#1f7a4d, #6fd19c);
  --warn: light-dark(#8a6100, #e5c37a);
  --bad: light-dark(#a12c2c, #ff9a9a);
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  /* Three corner radii; nested elements derive theirs with calc(). */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  /* Hairline that keeps image edges crisp on any background. */
  --outline-image: light-dark(oklch(0 0 0 / 0.1), oklch(1 0 0 / 0.1));
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; }
a { color: var(--acc); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--acc-soft); color: var(--ink); }
input, textarea { caret-color: var(--acc); }
h1, h2, h3, h4 { text-wrap: balance; }
h2 { font: 600 clamp(28px, 3.4vw, 40px)/1.08 var(--serif); margin: 0 0 6px; }
h3 { font-size: 18px; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 max(4vw, 18px); }
.block { padding-top: clamp(40px, 6vw, 80px); }
.sub, .muted { color: var(--mut); }
.sub { margin: 0 0 22px; }
.h2-gap { margin-top: 56px; }
.h3-gap { margin-top: 30px; margin-bottom: 10px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--bg); padding: 8px 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font: 600 20px var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.bar nav a { flex: none; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: var(--r-sm); white-space: nowrap; }
.bar nav a:hover { background: var(--band); }
/* The menu scrolls sideways on narrow screens, which clips anything drawn outside a link; draw the ring inside. */
.bar nav a:focus-visible { outline-offset: -3px; }
.bar nav a.book { background: var(--ink); color: var(--bg); margin-left: 6px; }
.bar nav a.book:hover { background: var(--acc); }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; }
.menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.2s, opacity 0.2s; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; }
.menu-btn .bars::before { top: -6px; }
.menu-btn .bars::after { top: 6px; }
.bar.open .menu-btn .bars { background: transparent; }
.bar.open .menu-btn .bars::before { transform: translateY(6px) rotate(45deg); }
.bar.open .menu-btn .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: var(--r-sm); border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 15.5px Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn.solid { background: var(--acc); border-color: var(--acc); color: light-dark(#fff, #0e1328); }
.btn { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn:hover { background: var(--band); }
.btn.solid:hover { background: light-dark(#1b33a6, #b3c0ff); border-color: light-dark(#1b33a6, #b3c0ff); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn:disabled:hover { background: transparent; }
.btn.solid:disabled:hover { background: var(--acc); border-color: var(--acc); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-top: clamp(36px, 6vw, 84px); }
.name { font: 600 clamp(52px, 8vw, 96px)/0.98 var(--serif); letter-spacing: -0.02em; margin: 0; }
.name span { display: inline-block; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(35%); } }
.headline { font: 400 clamp(19px, 2.2vw, 26px)/1.3 var(--serif); color: var(--acc); margin: 14px 0 0; text-wrap: balance; }
.headline span { white-space: nowrap; }
.headline .hl-role { display: block; }
.summary { font-size: 17px; max-width: 64ch; margin: 20px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.contact { margin: 22px 0 0; color: var(--mut); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.contact a { color: var(--ink); }
.photo { margin: 0; justify-self: end; width: 100%; max-width: 380px; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); box-shadow: 0 24px 48px -24px rgba(20, 30, 70, 0.35); animation: fade 1.1s ease 0.2s both; }
@keyframes fade { from { opacity: 0; transform: scale(0.97); } }

/* Career ruler */
.axis, .rl-row { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; }
.axis { font-size: 13px; color: var(--mut); padding-bottom: 6px; }
.years { position: relative; height: 18px; }
.years span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.years span:last-child { transform: translateX(-100%); }
.ruler { border-top: 1px solid var(--line); }
.rl-row { width: 100%; align-items: center; padding: 10px 0; min-height: 48px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rl-row b { font-weight: 600; font-size: 15px; display: block; }
.rl-row small { color: var(--mut); font-size: 13px; }
.track { position: relative; height: 14px; }
.track .seg { position: absolute; top: 0; height: 14px; border-radius: 3px; background: var(--bar); transform-origin: left; animation: grow 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rl-row:hover .seg, .rl-row:focus-visible .seg { background: var(--acc); }
@keyframes grow { from { transform: scaleX(0); } }
/* Career views: by role (one row per role) or by country (one row per country, one bar per role) */
.rl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; margin: 0 0 20px; }
.rl-head .sub { margin: 0; }
.rl-switch { display: flex; gap: 24px; }
.rl-switch button { min-height: 44px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--mut); font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.rl-switch button:hover { color: var(--ink); }
.rl-switch button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.rl-country { cursor: default; }
.rl-country small span { white-space: nowrap; }
.rl-country:hover .seg { background: var(--bar); }
.seg-btn { position: absolute; top: -15px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.seg-btn .seg { top: 15px; left: 1px; right: 1px; }
.rl-country .seg-btn:hover .seg, .seg-btn:focus-visible .seg { background: var(--acc); }
.seg-btn:focus-visible { outline: none; }
.seg-btn:focus-visible .seg { outline: 3px solid var(--acc); outline-offset: 2px; }

/* Tools band */
.tools-band { background: var(--band); margin-top: clamp(48px, 7vw, 96px); padding: clamp(36px, 5vw, 64px) 0; border-block: 1px solid var(--line); }
.tools { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px); }
.tool h2 { font-size: clamp(24px, 2.6vw, 30px); }
.tool > p { color: var(--mut); margin: 0 0 6px; }
.tool > p.tech-link { color: var(--ink); font-weight: 500; }
.thinking p { color: var(--mut); font-style: italic; }
.thinking .word { color: var(--acc); font-style: normal; font-weight: 600; }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
textarea, input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid light-dark(#c3c8cf, #3b3f45); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); }
#tailor-form .btn { margin-top: 12px; }
.error { color: var(--bad); font-weight: 600; }
.how summary { cursor: pointer; font-weight: 600; margin: 16px 0 8px; }
.steps { list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; transform: translateY(1px); }
.step.running .dot { background: var(--acc); animation: pulse 1s ease-in-out infinite; }
.step.complete .dot { background: var(--good); }
.step.error .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: 0.35; } }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table.match { width: 100%; border-collapse: collapse; font-size: 15px; }
.match th, .match td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.match ul { margin: 0; padding-left: 18px; }
.note { margin: 6px 0 0; font-style: italic; color: var(--mut); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge.direct { background: light-dark(#e3f3ea, #183526); color: var(--good); }
.badge.closest { background: light-dark(#f8efd9, #3a3222); color: var(--warn); }
.badge.none { background: light-dark(#f6e3e3, #3d1f1f); color: var(--bad); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; margin: 14px 0 8px; }
.chat:empty { display: none; }
.msg { padding: 11px 15px; border-radius: var(--r-md); max-width: 88%; }
.msg p { margin: 0; }
.msg.you { align-self: flex-end; background: var(--acc-soft); }
.msg.bot { align-self: flex-start; background: var(--band); }
.sources { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--mut); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chips[hidden] { display: none; }
.chips button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--band); color: var(--ink); font: 500 14.5px Inter, system-ui, sans-serif; cursor: pointer; }
.chips button:hover { border-color: var(--acc); }
.ask-form { display: flex; gap: 8px; align-items: stretch; }
.turnstile { display: flex; justify-content: center; margin-top: 12px; }

/* Experience */
.employer { font: 600 26px/1.2 var(--serif); margin: 40px 0 4px; padding-top: 18px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.employer span { font: 400 15px Inter, system-ui, sans-serif; color: var(--mut); }
.role { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; transition: background 0.6s; border-radius: var(--r-sm); }
.role.flash { background: var(--acc-soft); }
.role-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.role h3 { font-size: 19px; }
.dates { color: var(--mut); font-size: 14.5px; white-space: nowrap; }
.meta { margin: 2px 0 8px; color: var(--mut); font-size: 15px; }
.role ul, .project ul { margin: 0; padding-left: 20px; max-width: 80ch; }
.role li, .project li { margin-bottom: 6px; }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 8px 40px; }
.project { border-top: 2px solid var(--ink); padding: 16px 0 12px; }
.project h3 { font: 600 20px/1.2 var(--serif); margin-bottom: 8px; }

/* Certifications */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.cert { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 10px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; transition: background-color 0.2s; }
.cert:hover { background: var(--band); }
.cert:hover b { text-decoration: underline; text-underline-offset: 3px; }
.cert b { text-wrap: balance; }
.cert img { width: 96px; height: 96px; object-fit: contain; }
.cert b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cert span { font-size: 13px; color: var(--mut); }
.cert.active span { color: var(--good); font-weight: 600; }
.cert.earlier img { filter: grayscale(0.55); opacity: 0.8; }
.plain-list { margin: 0; padding-left: 20px; }
.plain-list li { margin-bottom: 4px; }

/* Skills */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.strengths { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.strengths { gap: 0; }
.strengths li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.strengths li:first-child { border-top: 1px solid var(--line); }
.skills { margin: 14px 0 0; display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); gap: 10px 16px; font-size: 15px; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; color: var(--mut); }
.more summary { cursor: pointer; font-weight: 600; margin-top: 18px; min-height: 44px; display: flex; align-items: center; color: var(--acc); }

/* Tailored resume sheet: shown as a page preview, printed on its own */
.sheet { margin-top: 22px; background: #fff; color: #141516; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 18px 40px -24px rgba(20, 30, 70, 0.35); padding: 28px 30px; font-size: 13.5px; line-height: 1.5; }
.sheet h4 { font: 600 15px/1.2 var(--serif); color: #2340c8; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #e2e3e0; }
.sheet p { margin: 0 0 6px; }
.sheet ul { margin: 0; padding-left: 18px; }
.sheet li { margin-bottom: 3px; }
.sh-head { display: flex; gap: 18px; align-items: center; padding-bottom: 14px; border-bottom: 2px solid #141516; }
.sh-photo { width: 84px; height: 84px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.sh-name { font: 600 30px/1 var(--serif); margin: 0; }
.sh-headline { font: 400 15px/1.3 var(--serif); color: #2340c8; margin: 6px 0 4px !important; }
.sh-contact { color: #5b6168; font-size: 12.5px; white-space: pre-wrap; }
.sh-for { margin-top: 12px !important; color: #5b6168; font-size: 12.5px; }
.sh-match { width: 100%; border-collapse: collapse; }
.sh-title { font-size: 19px !important; color: #141516 !important; border: 0 !important; margin: 18px 0 4px !important; }
.sh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 14px; }
.sh-stats div { border-radius: var(--r-sm); padding: 10px 12px; background: #f4f5f8; }
.sh-stats b { display: block; font: 600 26px/1 var(--serif); }
.sh-stats span { font-size: 12px; color: #5b6168; }
.sh-stats .direct b { color: #1f7a4d; }
.sh-stats .closest b { color: #8a6100; }
.sh-stats .none b { color: #a12c2c; }
.sh-match th { text-align: left; font-size: 11.5px; color: #5b6168; font-weight: 600; padding: 4px 8px 4px 0; border-bottom: 1px solid #e2e3e0; }
.sh-match td { padding: 6px 8px 6px 0; border-bottom: 1px solid #eeeeec; vertical-align: top; font-size: 12.5px; }
.sh-match td:nth-child(1) { font-weight: 600; width: 30%; }
.sh-match td:nth-child(2) { width: 17%; white-space: nowrap; }
.sh-match td:nth-child(3) { color: #3a3f45; }
.sh-resume { margin-top: 26px; padding-top: 4px; border-top: 2px solid #141516; }
.sh-cols { columns: 2; column-gap: 24px; }
#print-root { display: none; }
.sheet .badge { font-size: 11.5px; padding: 1px 8px; }
.sh-role { margin: 10px 0; break-inside: avoid; }
.sh-role-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sh-role-head span { color: #5b6168; font-size: 12.5px; white-space: nowrap; }
.sh-meta { color: #5b6168; font-size: 12.5px; margin: 0 0 4px !important; }
.sh-other { color: #3a3f45; }
.sh-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; break-inside: avoid; }
.sh-badges { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.sh-badge { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.sh-badge img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.sh-small { font-size: 12px; color: #5b6168; margin-top: 8px !important; }
.sh-skills { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 12.5px; }
.sh-skills dt { font-weight: 600; }
.sh-skills dd { margin: 0; color: #3a3f45; }
.sh-gap { margin-top: 14px !important; }
@media screen and (max-width: 560px) { .sh-two { grid-template-columns: minmax(0, 1fr); } .sheet { padding: 20px 18px; } }

/* Footer */
.foot { margin-top: clamp(48px, 7vw, 96px); padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--mut); font-size: 14.5px; }
.foot p { margin: 4px 0; }
.print-only { display: none; }

/* Articles */
.article-page { max-width: 820px; padding-top: clamp(32px, 5vw, 64px); }
.article-head h1, .article h1 { font: 600 clamp(36px, 5.6vw, 60px)/1.04 var(--serif); letter-spacing: -0.015em; margin: 0 0 12px; }
.crumb { margin: 0 0 16px; font-size: 15px; }
.article-meta { color: var(--mut); font-size: 14.5px; margin: 0 0 8px; display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tags span { background: var(--acc-soft); color: var(--acc); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.prose { font-size: 18px; line-height: 1.7; margin-top: 28px; }
.prose h2 { font-size: 30px; margin: 40px 0 10px; }
.prose h3 { font-size: 21px; margin: 30px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--acc); font: 400 22px/1.45 var(--serif); }
.prose pre { background: var(--band); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; overflow-x: auto; font-size: 14.5px; line-height: 1.5; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.article-next { margin-top: 48px; padding: 24px; border-radius: var(--r-lg); background: var(--band); }
.article-next h2 { font-size: 26px; }
.article-next p { color: var(--mut); margin: 0 0 14px; }
.article-list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.article-list a { display: grid; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.article-list b { font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--serif); }
.article-list a:hover b { color: var(--acc); }
.article-sum { color: var(--mut); }
.empty { margin-top: 28px; font-size: 18px; }
.bar nav a[aria-current="page"] { color: var(--acc); }

/* Architecture page */
.scroll { overflow-x: auto; max-width: 100%; }
.arch { max-width: 1000px; padding-top: clamp(32px, 5vw, 64px); }
.arch .lead { font-size: 18px; max-width: 70ch; }
.arch section { padding-top: clamp(28px, 4vw, 48px); }
.arch p { max-width: 72ch; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; overflow: visible; }
.toc a { flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.fig-wrap { margin: 18px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow-x: auto; }
.fig-wrap img { display: block; width: 100%; height: auto; min-width: 560px; }
.fig-wrap.narrow img { max-width: 900px; margin: 0 auto; }
.arch-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.arch-table th { text-align: left; font-size: 13px; color: var(--mut); padding: 8px 10px 8px 0; border-bottom: 2px solid var(--ink); }
.arch-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.arch-table td:first-child { font-weight: 600; }
.arch-table td:nth-child(2) { color: var(--acc); font-weight: 600; }
.steps-list, .guards { padding-left: 22px; max-width: 75ch; }
.steps-list li, .guards li { margin-bottom: 10px; }

@media screen and (max-width: 900px) {
  .tools, .two { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .bar-in { flex-wrap: wrap; align-content: flex-start; padding-top: 8px; padding-bottom: 8px; }
  .bar nav { display: none; order: 2; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; overflow: visible; }
  .bar.open nav { display: flex; }
  .bar nav a { padding: 13px 4px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .bar nav a:hover { background: none; color: var(--acc); }
  .bar nav a.book { margin: 12px 0 0; text-align: center; border-radius: var(--r-sm); border-bottom: 0; }
}
@media screen and (max-width: 680px) {
  /* Phones: the photo sits beside the name, so the buttons reach the first screen. */
  .hero { grid-template-columns: 104px minmax(0, 1fr); gap: 0 18px; align-items: center; }
  .headline { margin-top: 20px; }
  .hero-text { display: contents; }
  .hero-text > * { grid-column: 1 / -1; }
  .hero-text > .name { grid-column: 2; grid-row: 1; }
  .photo { grid-column: 1; grid-row: 1; justify-self: start; max-width: 104px; }
  .photo img { border-radius: var(--r-md); box-shadow: 0 12px 24px -16px rgba(20, 30, 70, 0.35); }
  .axis, .rl-row { grid-template-columns: minmax(0, 132px) minmax(0, 1fr); }
  .skills { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .skills dd { margin-bottom: 10px; }
  .msg { max-width: 100%; }
  .ask-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  @page { size: letter; margin: 12mm 13mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; }
  #print-root .sheet { margin: 0; border: 0; box-shadow: none; padding: 0; font-size: 10pt; border-radius: 0; }
  #print-root .sh-page1 { break-after: page; }
  #print-root .sh-resume { margin-top: 0; border-top: 0; }
  #print-root .sh-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sh-role, .sh-badge, .sh-match tr { break-inside: avoid; }
  .sheet h4 { break-after: avoid; }
}

/* Private Architecture page notice */
.private-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }

/* Fit check: nice-to-have tag under a requirement */
#match-rows .nice { display: block; font-size: 12px; font-weight: 400; color: #5b6168; margin-top: 2px; }
#match-rows .src { display: block; font-size: 12px; color: #5b6168; margin-top: 2px; }

/* Running costs page (/usage/) */
.usage-page { padding-top: clamp(32px, 5vw, 64px); padding-bottom: 56px; }
.u-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin: 8px 0 34px; }
.u-bill, .u-status { background: var(--band); border-radius: var(--r-md); padding: 22px 24px; }
.u-label { font-size: 13px; font-weight: 600; color: var(--mut); margin: 0 0 6px; text-transform: none; }
.u-amount { font: 600 clamp(44px, 7vw, 72px)/1 var(--serif); color: var(--good); margin: 0 0 10px; }
.u-state { font: 600 30px/1.1 var(--serif); margin: 0 0 8px; }
.u-state.on { color: var(--good); }
.u-state.off { color: var(--warn); }
.u-note { color: var(--mut); font-size: 14.5px; margin: 0; }
.u-block { margin: 0 0 34px; }
.u-block h2 { font: 600 26px/1.2 var(--serif); margin: 0 0 4px; }
.u-help { color: var(--mut); margin: 0 0 14px; }
.u-meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.u-meter { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: var(--card); }
.u-mlabel { font-weight: 600; margin: 0 0 4px; }
.u-mval { margin: 0 0 10px; color: var(--mut); }
.u-mval b { font: 600 26px/1 var(--serif); color: var(--ink); }
.u-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.u-bar span { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width 0.6s ease; }
.u-bar span.warm { background: var(--warn); }
.u-bar span.hot { background: var(--bad); }
.u-mnote { font-size: 13px; color: var(--mut); margin: 8px 0 0; }
.u-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; padding: 12px 0 0; border-bottom: 1px solid var(--line); }
.u-col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.u-bars { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.u-b { position: relative; width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; min-height: 0; }
.u-b.ask { background: var(--acc); }
.u-b.fit { background: var(--good); }
.u-b i { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font: 600 11px Inter, system-ui, sans-serif; font-style: normal; color: var(--mut); }
.u-day { font-size: 11.5px; color: var(--mut); padding: 6px 0 4px; }
.u-legend { font-size: 13.5px; color: var(--mut); margin: 10px 0 0; }
.u-legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 6px 0 14px; vertical-align: -1px; }
.u-legend .k:first-child { margin-left: 0; }
.u-legend .k.ask { background: var(--acc); }
.u-legend .k.fit { background: var(--good); }
.u-table { width: 100%; border-collapse: collapse; }
.u-table th, .u-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.u-table th { font-size: 13px; color: var(--mut); font-weight: 600; }
.u-table td:first-child { font-weight: 600; white-space: nowrap; }
@media screen and (max-width: 720px) { .u-hero { grid-template-columns: minmax(0, 1fr); } .u-b i { display: none; } }

/* Polish pass (30 Nov 2026) */
.photo img, .sh-photo { outline: 1px solid var(--outline-image); outline-offset: -1px; }
.dates, .axis, .u-mval b, .u-day, .u-b i, .u-amount, .sh-stats b { font-variant-numeric: tabular-nums; }
.u-meters { gap: 0 32px; }
.u-meter { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 18px; background: none; }
.not-found { padding-top: clamp(48px, 8vw, 110px); padding-bottom: 80px; }
.not-found h1 { font: 600 clamp(36px, 5.6vw, 60px)/1.04 var(--serif); margin: 0 0 12px; }
