/* Dark engineering theme: charcoal surfaces, white line drawings, one restrained accent.
   Mobile-first; breakpoints 768px and 1100px. */
:root {
  --bg: #141414;
  --bg-2: #181818;
  --panel: #1e1e1e;
  --panel-2: #262626;
  --stage: #121212;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --ink: #f4f4f4;
  --ink-soft: #bdbdbd;
  --muted: #9b9b9b;
  --accent: #ffffff;
  --amber: #f5b942;
  --good: #8fd8a8;
  /* one accent per project type, each at least 4.5:1 on the dark surfaces */
  --t-power: #f5b942; --t-mechanical: #a9c1dc; --t-sustain: #8fd8a8; --t-automation: #ff9b5e; --t-lab: #8fd3e6;
  --t-software: #ffffff; --t-brand: #e8d3a8; --t-assistant: #9be3b7; --t-growth: #f0c8a0; --t-anon: #bdbdbd;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Manrope", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --gutter: 20px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }

/* Long words, URLs and e-mail addresses never push the page sideways. */
.card, h1, h2, h3, p, li, td, th, dd, .tb-cell { overflow-wrap: anywhere; }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; padding: 8px 12px; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 8px; }

/* Navigation */
.site-nav {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px;
  padding: 14px max(var(--gutter), calc((100% - 1100px) / 2));
  background: rgba(20, 20, 20, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand::before { content: ""; width: 14px; height: 10px; background: linear-gradient(var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 6px, transparent 6px 8px, var(--ink) 8px 10px); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.site-nav ul a { color: var(--ink-soft); text-decoration: none; }
.site-nav ul a:hover { color: var(--ink); }
.nav-cta { padding: 9px 16px; background: var(--ink); color: var(--bg) !important; border-radius: 3px; font-weight: 600; text-decoration: none; }
.nav-cta:hover { background: #fff; }
.sheet-counter { display: none; }
@media (max-width: 760px) { .site-nav ul { order: 3; width: 100%; } .nav-cta { padding: 7px 12px; } }

/* Sheets: each section is a calm band; the old drawing title block survives as a small caption. */
.sheet { position: relative; padding: 72px var(--gutter) 96px; }
.sheet[id] { scroll-margin-top: 84px; }
.sheet-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.sheet + .sheet { border-top: 1px solid var(--line); }
.kicker { margin: 0 0 .9em; font: 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kicker a { color: var(--ink-soft); }
.dim-line { display: none; }
.sec-head { max-width: 620px; margin-bottom: 36px; }
.sec-head p { color: var(--muted); font-size: .95rem; }
.title-block { position: absolute; right: var(--gutter); bottom: 22px; display: flex; flex-wrap: wrap; gap: 0 14px; max-width: calc(100% - 2 * var(--gutter)); font: 10px/1.6 var(--mono); letter-spacing: .1em; color: var(--muted); }
.tb-cell { white-space: nowrap; }
.tb-sheet { color: var(--ink-soft); }

/* Buttons */
.btn { display: inline-block; padding: 11px 20px; border: 1px solid transparent; border-radius: 3px; font: 600 13px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.btn-primary { background: #e6e6e6; color: #111; }
.btn-primary:hover { background: #fff; color: #111; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }

/* Hero */
.sheet-hero { padding-top: 56px; padding-bottom: 64px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-text h1 { margin-bottom: .4em; }
.tagline { max-width: 34ch; color: var(--ink-soft); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-scope { margin-top: 14px; border: 1px solid var(--line); background: var(--stage); border-radius: var(--radius); overflow: hidden; }
.hero-scope:not(.lab-ready) { display: none; }
.hero-scope canvas { display: block; }
.tools { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; margin: 44px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); color: var(--muted); font: 700 clamp(.95rem, 2.4vw, 1.25rem)/1 var(--sans); letter-spacing: -.01em; }
.tools li { opacity: .75; }

/* Project bento grid */
.group { margin-top: 40px; }
.group:first-of-type { margin-top: 0; }
.group > h3 { margin: 0 0 14px; font: 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.card:hover, .card:has(a:focus-visible) { transform: translateY(-3px); border-color: var(--line-2); }
.card:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.card h4 a { color: var(--ink); text-decoration: none; }
.card h4 a::after { content: ""; position: absolute; inset: 0; }
.card h4 a:focus-visible { outline: none; }
.card-art { display: grid; place-items: center; background: var(--stage); aspect-ratio: 3 / 2; padding: 14px; border-bottom: 1px solid var(--line); }
.card-art img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 16px 18px 20px; }
.card-body h4 { margin-bottom: .4em; }
.card-body p { margin: 0 0 .5em; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.tag-progress { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; font: 11px/1.3 var(--mono); letter-spacing: .06em; color: var(--amber); }
.tag-progress::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.next-step { font: 11px/1.5 var(--mono); color: var(--ink-soft) !important; }

/* Approach: numbered list beside a drawing */
.approach { display: grid; gap: 12px; }
.approach-art { background: var(--stage); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 18px; }
.approach-art img { width: 100%; max-height: 380px; object-fit: contain; }
.approach-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; }
.steps b { font: 300 2.1rem/1 var(--sans); letter-spacing: -.03em; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; }
.steps strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* About + tables */
.panel { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-width: 760px; }
.panel p { color: var(--ink-soft); }
.panel p:last-child { margin-bottom: 0; }
.schedule { margin-top: 20px; overflow-x: auto; }
.schedule table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.schedule caption { caption-side: top; text-align: left; padding: 0 0 10px; font: 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.schedule th, .schedule td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.schedule thead th { font: 600 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.schedule tbody th { font-weight: 600; color: var(--ink); }
.schedule td { color: var(--ink-soft); }
@media (max-width: 767.98px) {
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .schedule table, .schedule caption, .schedule tbody, .schedule tr, .schedule th, .schedule td { display: block; width: 100%; }
  .schedule table { background: transparent; border: 0; }
  .schedule tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
  .schedule th, .schedule td { border: 0; border-bottom: 1px solid var(--line); }
  .schedule td::before { content: attr(data-label); display: block; font: 10px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
}

/* Contact + footer */
.contact-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.contact-list .label { display: inline-block; min-width: 7em; font: 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.big-art { background: var(--stage); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.big-art img { display: block; width: 100%; max-height: 460px; object-fit: contain; }
.site-footer { padding: 56px var(--gutter) 32px; border-top: 1px solid var(--line); }
.foot-grid { max-width: 1100px; margin: 0 auto; display: grid; gap: 32px; }
.foot-grid p { color: var(--muted); font-size: .88rem; max-width: 34ch; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-cols .foot-h { margin: 0 0 12px; font-size: .95rem; font-weight: 600; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .85rem; }
.foot-cols a { color: var(--muted); text-decoration: none; }
.foot-cols a:hover { color: var(--ink); }
.foot-base { max-width: 1100px; margin: 36px auto 0; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.noscript-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Project page */
.sheet-head { padding-top: 44px; padding-bottom: 72px; }
.head-grid { display: grid; gap: 22px; align-items: center; }
.sheet-head h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); }
.head-art { background: var(--stage); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; max-width: 420px; }
.head-art img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.page-main { max-width: 900px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.page-main section { margin-top: 32px; }
.page-main ul { padding-left: 1.2em; color: var(--ink-soft); }
.summary { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; margin-top: 8px; }
.page-main h2 { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-main li { margin-bottom: .35em; }
.status-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; padding: 12px 14px; border: 1px solid rgba(245, 185, 66, .45); border-left-width: 4px; border-radius: var(--radius); background: rgba(245, 185, 66, .07); font-family: var(--mono); font-size: .85rem; }
.status-banner .tag-progress { margin-bottom: 0; }
.visual { margin: 16px 0; }
.visual img { display: block; border: 1px solid var(--line); border-radius: var(--radius); }
.visual figcaption { font: 12px/1.5 var(--mono); color: var(--muted); margin-top: 8px; }
.visual-placeholder svg { color: var(--muted); display: block; width: 100%; max-width: 480px; }
.page-main .schedule td:nth-child(2) { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.project-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; max-width: 900px; margin: 0 auto; padding: 18px var(--gutter); border-top: 1px solid var(--line); }
.project-nav a { padding: 8px 0; }
.project-nav .all-projects { margin-left: auto; }

/* Reveal: visible by default; only hidden once motion.js marks <html class="js">. */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(22px); }

/* Page transition: leave fades out, enter fades in (only when motion.js marks <html class="js">). */
/* Never put a transform (or an animation that keeps one) on body: it turns every position:fixed child (crosshair, progress bar, gears) into a document-relative element, so they drift away as the page scrolls. Opacity only. */
body { transition: opacity .18s var(--ease); }
body.is-leaving { opacity: 0; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.js body { animation: page-in .4s var(--ease) backwards; }

/* Tablet and up */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .sheet { padding-top: 96px; padding-bottom: 110px; }
  .sheet-hero { padding-top: 64px; padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .cards .card:last-child:nth-child(odd) .card-art { width: 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .cards .card:last-child:nth-child(odd) .card-body { flex: 1; align-self: center; padding: 22px 26px; }
  .group-in-progress .cards { grid-template-columns: repeat(3, 1fr); }
  .group-in-progress .cards .card:last-child:nth-child(odd) { grid-column: auto; flex-direction: column; }
  .group-in-progress .cards .card:last-child:nth-child(odd) .card-art { width: auto; aspect-ratio: 3 / 2; border-right: 0; border-bottom: 1px solid var(--line); }
  .approach { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.1fr 1.4fr; }
  .head-grid { grid-template-columns: 1.3fr 1fr; }
}
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* Reduced motion: no drawing, rising or hover movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .card:hover, .card:has(a:focus-visible), .btn:hover { transform: none; }
  body.is-leaving { opacity: 1; }
  .js body { animation: none; }
}
@media print { .reveal, .js .reveal:not(.is-visible) { opacity: 1; transform: none; } }

/* ===== Workbench: live instruments ===== */
.lead { max-width: 64ch; font-size: 1.02rem; color: var(--ink-soft); }
.numbers { list-style: none; margin: 26px 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.numbers li { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.num { font: 300 clamp(2rem, 5vw, 2.8rem)/1 var(--sans); letter-spacing: -.03em; }
.num i { font-style: normal; font-size: .4em; margin-left: .3em; letter-spacing: .08em; color: var(--muted); }
.num-label { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.instruments { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 960px) { .instruments { grid-template-columns: 1fr 1fr; } }
.instrument { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; transition: border-color .3s var(--ease); }
.instrument:hover { border-color: var(--line-2); }
.instrument h3 { margin: 0; font-size: 1.1rem; }
.inst-tag { margin: 0; font: 10px/1.2 var(--mono); letter-spacing: .18em; color: var(--muted); }
.inst-desc { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.55; }
.lab-stage { border: 1px solid var(--line); background: var(--stage); border-radius: 4px; overflow: hidden; }
.lab-stage svg, .lab-stage canvas { display: block; }
.lab-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.ctl { display: flex; flex-direction: column; gap: 4px; font: 11px/1.2 var(--mono); letter-spacing: .06em; color: var(--muted); min-width: min(100%, 190px); flex: 1 1 190px; }
.ctl input[type=range] { width: 100%; accent-color: #fff; }
.ctl select, .lab-btn { font: 12px/1 var(--mono); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 9px 12px; }
.lab-btn { cursor: pointer; letter-spacing: .06em; text-transform: uppercase; transition: background .2s var(--ease); }
.lab-btn:hover { background: #333; }
.lab-btn[aria-pressed="true"] { background: var(--amber); color: #111; border-color: var(--amber); }
.lab-btn[data-ctl="estop"] { border-color: #e5484d; color: #ff9a9d; }
.ctl select:focus-visible, .lab-btn:focus-visible, .ctl input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lab-readouts { display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0; }
.lab-readouts dt { font: 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lab-readouts dd { margin: 3px 0 0; font: 600 13px/1.3 var(--mono); color: var(--ink); }
.inst-link { margin: auto 0 0; font-size: .82rem; }
.inst-link a { color: var(--ink-soft); }
.instrument:not(.lab-ready) .lab-stage, .instrument:not(.lab-ready) .lab-controls, .instrument:not(.lab-ready) .lab-readouts { display: none; }
.instrument.lab-ready .lab-fallback { display: none; }
.lab-fallback { margin: 0; font-size: .88rem; color: var(--muted); }

/* ===== Site-wide motion layer ===== */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40; transform-origin: 0 50%; transform: scaleX(0); background: #fff; pointer-events: none; }
.bg-gears { position: fixed; inset: 0; z-index: 0; pointer-events: none; color: #fff; overflow: hidden; }
.bg-gears .gear { position: absolute; opacity: .05; will-change: transform; }
.bg-gears .g1 { width: min(46vw, 420px); right: -8vw; bottom: -8vh; transform: rotate(var(--spin, 0deg)); }
.bg-gears .g2 { width: min(30vw, 280px); left: -6vw; top: 26vh; transform: rotate(calc(var(--spin, 0deg) * -1.6)); }
main, .site-footer, header.sheet, footer { position: relative; z-index: 1; }
.crosshair { position: fixed; inset: 0; z-index: 15; pointer-events: none; opacity: 0; transition: opacity .3s; }
.crosshair.on { opacity: 1; }
.crosshair .cx, .crosshair .cy { position: absolute; background: rgba(255, 255, 255, .12); }
.crosshair .cx { top: 0; bottom: 0; width: 1px; left: 0; }
.crosshair .cy { left: 0; right: 0; height: 1px; top: 0; }
.crosshair b { position: absolute; left: 0; top: 0; font: 10px/1 var(--mono); letter-spacing: .08em; color: var(--ink-soft); background: rgba(20, 20, 20, .85); padding: 3px 6px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .bg-gears .gear { transform: none; } }

/* ===== Project banners, sample-data demos, timeline, real-values panels ===== */
.proj-anim { margin-top: 20px; max-width: 960px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--stage); overflow: hidden; }
.proj-anim:not(.anim-ready) { display: none; }
.proj-anim canvas { display: block; }
.demo { margin-top: 28px; }
.demo-note { color: var(--muted); max-width: 70ch; font-size: .9rem; }
.demo.anim-ready .lab-fallback { display: none; }
.demo:not(.anim-ready) .demo-stage { display: none; }
.dash, .crm { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); max-width: 960px; overflow: hidden; }
.dash-pill { position: absolute; top: 10px; right: 12px; margin: 0; padding: 2px 8px; font: 700 10px/1.4 var(--mono); letter-spacing: .14em; background: var(--amber); color: #111; border-radius: 2px; }
.dash-kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 18px; }
.dash-kpi { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--stage); display: flex; flex-direction: column; gap: 4px; }
.dash-kpi span { font: 10px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dash-kpi b { font: 500 1.15rem/1.1 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.dash-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 14px; padding: 8px 4px 0; border-bottom: 1px solid var(--line-2); }
.dash-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.dash-col i { display: block; width: 100%; min-height: 2px; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .15)); border-radius: 2px 2px 0 0; }
.dash-col em { font: normal 10px/1 var(--mono); color: var(--muted); }
.dash-feed { list-style: none; margin: 12px 0 0; padding: 0; font: 12px/1.7 var(--mono); color: var(--ink-soft); }
.dash-feed li { animation: feed-in .5s var(--ease); }
@keyframes feed-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.crm-cols { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; }
.crm-col span { display: block; font: 600 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 4px; border-bottom: 1px solid var(--line-2); color: var(--muted); }
.crm-area { position: relative; margin-top: 8px; min-height: 120px; overflow: hidden; }
.crm-card { position: absolute; left: 0; top: 0; padding: 6px 8px; font: 11px/1.3 var(--mono); color: var(--ink); background: var(--stage); border: 1px solid var(--line-2); border-radius: 3px; transition: transform .7s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-card.won { border-color: var(--good); box-shadow: inset 3px 0 0 var(--good); }
@media (max-width: 560px) { .crm-col span { font-size: 8px; letter-spacing: 0; } .crm-card { font-size: 9px; padding: 5px 4px; } }
.timeline { --tl: 0; position: relative; list-style: none; margin: 8px 0 0; padding: 0 0 0 30px; max-width: 880px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.timeline.tl-live::after { content: ""; position: absolute; left: 7px; top: 6px; width: 3px; height: calc((100% - 12px) * var(--tl)); background: #fff; border-radius: 2px; }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 6px 18px; padding: 0 0 22px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 6px; width: 9px; height: 9px; border: 1px solid #fff; background: var(--bg); border-radius: 50%; }
.tl-work::before { background: #fff; }
.tl-project::before { background: var(--amber); border-color: var(--amber); }
.tl-study::before { background: var(--good); border-color: var(--good); }
.tl-date { font: 11px/1.7 var(--mono); letter-spacing: .08em; color: var(--muted); }
.tl-body { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.tl-body h3 { margin: 2px 0 4px; font-size: 1.02rem; }
.tl-body p { margin: 0; color: var(--muted); font-size: .88rem; }
.tl-kind { font: 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; } }
.real { border: 1px solid var(--line); border-radius: 4px; background: var(--stage); }
.real summary { cursor: pointer; padding: 8px 10px; font: 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.real summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.real table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.real th, .real td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.real thead th { font: 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.real tbody th { font-weight: 600; }
.real td { color: var(--ink-soft); }
@media (max-width: 560px) { .real table, .real tbody, .real tr, .real th, .real td { display: block; } .real thead { display: none; } .real tr { border-top: 1px solid var(--line); padding: 6px 0; } .real th, .real td { border: 0; padding: 2px 10px; } }
@media (prefers-reduced-motion: reduce) { .dash-feed li { animation: none; } .crm-card { transition: none; } }

/* ===== Interactive line drawings ===== */
.art-fig { position: relative; margin: 0; width: 100%; cursor: zoom-in; }
.art-fig svg { display: block; width: 100%; height: auto; }
.art .d { fill: none; stroke: #fff; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: none; }
.art .f { stroke-opacity: .38; }
.art .hit, .hero-motor .hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.art .ax { stroke: #fff; stroke-opacity: .35; stroke-width: 1; stroke-dasharray: 10 4 2 4; fill: none; }
.art text { fill: #fff; fill-opacity: .6; font: 10px var(--mono); letter-spacing: .12em; }
.js .art-fig:not(.in) .art .d { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .art-fig.in .art .d { animation: art-dr 2.4s ease backwards; animation-delay: calc(var(--i) * 32ms); }
@keyframes art-dr { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
.art .part, .hero-motor .part { cursor: pointer; }
.art .part:hover .d, .hero-motor .part:hover .d { stroke-opacity: 1; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .65)); }
.art-fig:has(.part:hover) .part:not(:hover) .d { opacity: .3; }
.art-open { position: absolute; right: 8px; bottom: 8px; padding: 5px 10px 5px 8px; font: 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: rgba(30, 30, 30, .92); border: 1px solid var(--line-2); border-radius: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.art-open::before { content: ""; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: 4px 4px 0 -1.5px currentColor; }
.art-open:hover, .art-fig:hover .art-open { background: #fff; color: #111; }
.art-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.card-art { position: relative; z-index: 2; }
.card-art .art-fig, .head-art .art-fig, .approach-art .art-fig, .big-art .art-fig { max-height: 100%; }
.art-tip { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; padding: 5px 9px; font: 11px/1.3 var(--mono); background: #fff; color: #111; border-radius: 3px; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.art-tip.on { opacity: 1; }

dialog.viewer { width: min(1200px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink); overflow: hidden; }
dialog.viewer::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(3px); }
html.viewer-open { overflow: hidden; }
.v-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.v-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.v-body { display: grid; grid-template-columns: 1fr; max-height: calc(94vh - 54px); overflow: auto; }
.v-stagewrap { position: relative; padding: 10px; background: var(--stage); }
.v-stage { position: relative; width: 100%; max-height: 66vh; overflow: hidden; cursor: grab; touch-action: none; border: 1px solid var(--line); border-radius: 4px; background: radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .05), rgba(0, 0, 0, 0)); }
.v-stage:active { cursor: grabbing; }
.v-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.v-stage svg { display: block; width: 100%; height: 100%; }
.v-zoom { position: absolute; top: 20px; right: 20px; display: flex; gap: 6px; }
.v-btn { font: 12px/1 var(--mono); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 8px 12px; cursor: pointer; }
.v-btn:hover { background: #333; }
.v-btn:focus-visible, .v-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.v-hint { margin: 8px 2px 0; font: 11px/1.4 var(--mono); color: var(--muted); }
.v-tip { position: absolute; left: 0; top: 0; pointer-events: none; padding: 4px 8px; font: 11px/1.3 var(--mono); background: #fff; color: #111; border-radius: 3px; opacity: 0; white-space: nowrap; }
.v-tip.on { opacity: 1; }
.v-side { padding: 16px 18px 20px; overflow: auto; border-top: 1px solid var(--line); }
.v-intro { margin: 0; color: var(--muted); font-size: .85rem; }
.v-pname { margin: 16px 0 6px; font-size: 1.15rem; }
.v-ptext { margin: 0; color: var(--ink-soft); font-size: .93rem; min-height: 5.5em; }
.v-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.v-item { font: 11px/1.2 var(--mono); color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.v-item:hover { color: var(--ink); border-color: var(--ink); }
.v-item.on { background: #fff; color: #111; border-color: #fff; }
.viewer .d { animation: none !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; vector-effect: non-scaling-stroke; }
.viewer .hit { vector-effect: non-scaling-stroke; }
.viewer .part { cursor: pointer; }
.viewer .part:hover .d { stroke-opacity: 1; stroke-width: 2; }
.viewer .part.sel .d { stroke-opacity: 1; stroke-width: 2.6; filter: drop-shadow(0 0 5px #fff); }
.viewer svg.has-sel .part:not(.sel) .d { opacity: .28; }
.viewer .hm-live { opacity: 1 !important; }
@media (min-width: 900px) {
  .v-body { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); overflow: hidden; }
  .v-side { border-top: 0; border-left: 1px solid var(--line); max-height: calc(94vh - 54px); }
}
@media (prefers-reduced-motion: reduce) { .art-tip { transition: none; } }

/* ===== Standalone viewer: cinematic skin and 3D stage ===== */
dialog.viewer { background: #0a0a0a; }
.v-head { align-items: flex-start; }
.v-title { display: flex; flex-direction: column; gap: 4px; }
.v-kicker { font: 10px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.v-head h2 { font: 500 .95rem/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.v-btn { background: transparent; border: 0; border-radius: 0; padding: 6px 4px; font: 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.v-btn:hover:not(:disabled) { background: transparent; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.v-btn:disabled { opacity: .4; cursor: default; }
.v-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.v-bar [hidden] { display: none; }
.v-stage.is3d { aspect-ratio: auto; cursor: grab; background: radial-gradient(90% 80% at 62% 30%, rgba(255, 255, 255, .09), rgba(0, 0, 0, 0) 70%), #080808; }
.v-3d { position: relative; }
.v-3d[hidden] { display: none; }
.v3d { display: block; touch-action: none; cursor: grab; outline: none; }
.v3d:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.v-line { position: absolute; z-index: 3; pointer-events: none; background: rgba(255, 255, 255, .32); }
.v-line-h { left: 0; right: 0; top: 70%; height: 1px; }
.v-line-v { top: 0; bottom: 0; left: 76%; width: 1px; }
.v-cross { position: absolute; z-index: 3; pointer-events: none; left: 76%; top: 70%; width: 7px; height: 7px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.v-stage svg { position: relative; z-index: 1; }
.v-hint { font-size: 10px; letter-spacing: .06em; }
.v-pname { font: 500 1rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.v-item { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border-radius: 0; }

/* ===== Cinematic hero ===== */
.sheet-hero { min-height: 100vh; min-height: 100svh; padding: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: radial-gradient(70% 90% at 68% 45%, #1c1c1c 0%, #0b0b0b 72%); }
.sheet-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 100% at 60% 45%, transparent 45%, rgba(0, 0, 0, .7)); }
.sheet-hero .hero-cin { position: relative; z-index: 4; width: 100%; max-width: 1180px; padding: 110px var(--gutter) 190px; }
.hero-bg { position: absolute; inset: 0; z-index: 1; }
.hero-stage { position: absolute; inset: 0; transition: opacity .22s var(--ease); }
.hero-stage.swap { opacity: 0; }
.hero-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
html:not(.hero3d-on) .hero-bg, html:not(.hero3d-on) .hero-cell, html:not(.hero3d-on) .hero-bottom, html:not(.hero3d-on) .hero-guides { display: none; }
.hero3d-on .hero-fallback { display: none; }
.hero-fallback { position: relative; z-index: 4; max-width: 520px; margin: 0 auto 20px; padding: 0 var(--gutter); }
.hero-guides i { position: absolute; z-index: 3; pointer-events: none; background: rgba(255, 255, 255, .3); }
.hg-h { left: 0; right: 0; top: 82%; height: 1px; }
.hg-v { top: 0; bottom: 0; left: 76%; width: 1px; }
.hg-x { left: 76%; top: 82%; width: 8px; height: 8px; background: #fff !important; transform: translate(-50%, -50%) rotate(45deg); }
.hero-tag { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 56px; font: 11px/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.hero-tag b { border: 1px solid var(--line-2); padding: 8px 10px; font-weight: 400; color: var(--ink); }
.sheet-hero h1 { font: 500 clamp(1.5rem, 4.6vw, 3.7rem)/1.18 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 30px; }
.sheet-hero h1 span { display: block; }
.sheet-hero h1 span:nth-child(2) { padding-left: 3ch; }
.sheet-hero h1 span:nth-child(3) { padding-left: 1ch; }
.sheet-hero h1 span:nth-child(4) { padding-left: 4ch; }
.js .sheet-hero h1.is-visible span { animation: line-in 1s var(--ease) both; }
.js .sheet-hero h1.is-visible span:nth-child(2) { animation-delay: .12s; }
.js .sheet-hero h1.is-visible span:nth-child(3) { animation-delay: .24s; }
.js .sheet-hero h1.is-visible span:nth-child(4) { animation-delay: .36s; }
@keyframes line-in { from { opacity: 0; transform: translateY(22px); letter-spacing: .32em; } to { opacity: 1; transform: none; letter-spacing: .14em; } }
.hero-lines p { margin: 0; font: 11px/1.7 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); max-width: 36ch; }
.hero-lines .hl-2 { padding-left: 4ch; margin-top: .9em; }
.hero-lines .hl-3 { padding-left: 9ch; }
.sheet-hero .hero-actions { margin-top: 34px; }
.hero-cell { position: absolute; z-index: 4; left: 76%; right: 0; top: 30%; padding: 18px 22px 20px; border-top: 1px solid rgba(255, 255, 255, .3); display: flex; flex-direction: column; gap: 10px; }
.hc-count { margin: 0; font: 10px/1 var(--mono); letter-spacing: .22em; color: var(--muted); }
.hc-name { margin: 0; font: 500 .95rem/1.35 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.hc-text { margin: 0; font-size: .8rem; line-height: 1.55; color: var(--ink-soft); }
.hc-nav { display: flex; align-items: center; gap: 8px; }
.hc-btn { background: none; border: 0; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.hc-btn:hover { color: #fff; transform: scale(1.2); }
.hc-dots { display: inline-flex; align-items: center; }
.hc-dot { width: 7px; height: 7px; margin: 0 4px; padding: 0; border-radius: 50%; border: 1px solid #fff; background: transparent; cursor: pointer; }
.hc-dot.on { background: #fff; }
.hc-open, .hc-toggle { background: none; border: 0; color: var(--ink); font: 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; padding: 6px 0; text-align: left; }
.hc-open:hover, .hc-toggle:hover { text-decoration: underline; text-underline-offset: 5px; }
.hc-btn:focus-visible, .hc-dot:focus-visible, .hc-open:focus-visible, .hc-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-cell .hero-scope { margin-top: 4px; }
.hero-bottom { position: absolute; z-index: 4; left: 0; right: 0; bottom: 34px; text-align: center; }
.hc-toggle[aria-pressed="false"] { color: var(--muted); }
.sheet-hero .tools { position: absolute; z-index: 4; left: 0; right: 0; bottom: 84px; max-width: 1100px; margin: 0 auto; padding: 16px var(--gutter) 0; }
@media (max-width: 899.98px) {
  .sheet-hero { min-height: auto; padding-bottom: 20px; }
  .sheet-hero .hero-cin { padding: 80px var(--gutter) 24px; }
  .hero-stage { opacity: .5; }
  .hero-guides, .hero-bg ~ .hero-guides { display: none; }
  .hero-cell { position: relative; z-index: 4; left: auto; right: auto; top: auto; margin: 0 var(--gutter) 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 14, 14, .8); }
  .hero-bottom { position: relative; bottom: auto; margin: 0 0 16px; }
  .sheet-hero .tools { position: relative; bottom: auto; margin: 0 auto; }
  .hero-tag { margin-bottom: 32px; }
}

/* ===== Cinematic section styling ===== */
.sec-head h2 { font: 500 clamp(1.25rem, 3vw, 1.9rem)/1.25 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.kicker::before { content: "[ "; }
.kicker::after { content: " ]"; }
.sheet:not(.sheet-hero)::before { content: ""; position: absolute; top: 0; bottom: 0; left: 76%; width: 1px; background: rgba(255, 255, 255, .05); pointer-events: none; }
.sheet-inner { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-stage { transition: none; } .js .sheet-hero h1.is-visible span { animation: none; } }
.sheet-hero h1, .hero-lines { text-shadow: 0 2px 18px rgba(0,0,0,.85); }
dialog.viewer[open] { animation: v-in .5s var(--ease) both; }
dialog.viewer[open]::backdrop { animation: v-fade .5s ease both; }
@keyframes v-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Flat software visuals: screenshots with a zoom lightbox ===== */
.art-fig.shot { cursor: zoom-in; height: 100%; }
.art-fig.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card-art:has(.shot), .head-art:has(.shot) { padding: 0; overflow: hidden; }
.head-art:has(.shot) { max-width: 460px; }
.head-art .shot img { max-height: 280px; }
.visual img.zoomable { cursor: zoom-in; }
.v-stage.v-shot { cursor: grab; background: #080808; }
.v-stage.v-shot img { display: block; width: 100%; height: 100%; object-fit: fill; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.v-stage.v-shot.zoomed { cursor: grab; }

/* WhatsApp assistant demo */
.wa { max-width: 640px; margin: 12px 0; display: grid; gap: 10px; }
.wa-body { background: var(--stage); border: 1px solid #333; border-radius: 12px; padding: 12px; height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.wa-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.wa-msg.me { align-self: flex-end; background: #2b2b2b; color: var(--ink); }
.wa-msg.bot { align-self: flex-start; background: var(--panel); border: 1px solid #3a3a3a; color: var(--ink); }
.wa-msg.bot.blocked { border-color: var(--amber); }
.wa-trace { margin: 8px 0 0; padding-left: 18px; font: 12px/1.5 "Courier New", monospace; color: var(--muted); }
.wa-tag { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--amber); }
.wa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-chips button, .wa-form button { background: transparent; color: var(--ink); border: 1px solid #555; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.wa-chips button:hover, .wa-form button:hover, .wa-chips button:focus-visible, .wa-form button:focus-visible { border-color: var(--ink); }
.wa-form { display: flex; gap: 6px; }
.wa-form input { flex: 1; min-width: 0; background: var(--panel); color: var(--ink); border: 1px solid #444; border-radius: 8px; padding: 8px 10px; font: inherit; }
.wa-sheet { font-size: 14px; color: var(--muted); }
.wa-sheet summary { cursor: pointer; }

/* contact message form */
.msg-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid #333; display: grid; gap: 10px; max-width: 520px; }
.msg-form h3 { margin: 0; }
.msg-note { margin: 0; color: var(--muted); font-size: 14px; }
.msg-form .ctl { display: grid; gap: 4px; }
.msg-form input, .msg-form select, .msg-form textarea { background: var(--panel); color: var(--ink); border: 1px solid #444; border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; box-sizing: border-box; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* print: plain pages that are cheap to print or save as PDF */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .site-nav, .nav-cta, .scroll-progress, .bg-gears, .crosshair, .art-open, .lab-controls, .msg-form, .proj-anim, canvas, dialog, .title-block, nav { display: none !important; }
  .instrument, .panel, .card, .sheet { background: none !important; border-color: #999 !important; color: #000 !important; box-shadow: none !important; }
  a { color: #000 !important; text-decoration: underline; }
  .sheet, .instrument, .card { break-inside: avoid; }
  * { animation: none !important; transition: none !important; }
}

/* hire strip and project filters */
.hire-strip { background: var(--panel); border-top: 1px solid #2c2c2c; border-bottom: 1px solid #2c2c2c; padding: 22px 16px; }
.hire-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hire-grid p { margin: 0; color: var(--ink); line-height: 1.45; }
.hire-grid .hire-k { color: var(--muted); font: 12px "Courier New", monospace; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 6px; }
.hire-actions { max-width: 1100px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .hire-grid { grid-template-columns: 1fr; gap: 14px; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; }
.chip { background: transparent; color: var(--ink); border: 1px solid #555; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #141414; border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.filter-count { color: var(--muted); font-size: 13px; margin-left: 6px; }
.card[hidden], .group[hidden] { display: none; }
@media print { .hire-strip { border-color: #999; } .filters { display: none !important; } }

/* scroll-driven motor tour */
.tour { position: relative; height: 340vh; background: #0e0e0e; border-top: 1px solid #2c2c2c; border-bottom: 1px solid #2c2c2c; }
.tour[hidden] { display: none; }
.tour-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; }
.tour-stage { position: relative; height: 100%; min-height: 320px; }
.tour-cap { padding: 24px 28px 24px 8px; max-width: 460px; }
.tour-cap h2 { font: 12px "Courier New", monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.tour-cap h3 { font-size: 1.6rem; margin: 0 0 10px; }
.tour-cap p { color: var(--ink); line-height: 1.5; margin: 0 0 12px; }
.tour-k { font: 13px "Courier New", monospace; color: var(--amber) !important; }
.tour-nav { display: flex; gap: 8px; margin: 14px 0; }
.tour-hint { color: var(--muted) !important; font-size: 13px; }
@media (max-width: 900px) {
  .tour-pin { grid-template-columns: 1fr; grid-template-rows: 52% 48%; }
  .tour-cap { padding: 8px 18px 18px; max-width: none; align-self: start; }
  .tour-cap h3 { font-size: 1.25rem; }
}
.tour-static { height: auto; }
.tour-static .tour-pin { position: static; height: 100vh; }
@media (prefers-reduced-motion: reduce) { .tour { height: auto; } .tour-pin { position: static; } }
@media print { .tour { display: none !important; } }

/* project at-a-glance, Arabic draft page */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 22px; padding: 14px 16px; background: var(--panel); border: 1px solid #2c2c2c; border-radius: 10px; }
.glance dt { color: var(--muted); font: 12px "Courier New", monospace; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.glance dd { margin: 0; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.ar-page { max-width: 900px; margin: 0 auto; padding: 32px 18px 60px; }
.ar-draft { background: #3a2f12; color: #f5b942; border: 1px solid #f5b942; border-radius: 8px; padding: 10px 14px; }
.ar-head h1 { font-size: 2.4rem; margin: 6px 0; }
.ar-tag { color: var(--muted); font-size: 1.15rem; }
.ar-grid { max-width: none; margin: 22px 0; }
.ar-skills ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.ar-skills li { border: 1px solid #555; border-radius: 999px; padding: 6px 14px; }
.ar-contact { margin-top: 24px; }
.nav-lang { color: var(--ink); margin-inline-end: 10px; font-size: 14px; }
@media (max-width: 760px) { .ar-grid { grid-template-columns: 1fr; } }
.ar-page .hire-k, .ar-page .kicker, .ar-page h2, .ar-page .label { letter-spacing: 0; text-transform: none; font-family: inherit; font-size: 14px; }

/* ---------- art style per project type ---------- */
[data-type] { --t: var(--t-software); }
[data-type="power"] { --t: var(--t-power); } [data-type="mechanical"] { --t: var(--t-mechanical); }
[data-type="sustain"] { --t: var(--t-sustain); } [data-type="automation"] { --t: var(--t-automation); }
[data-type="lab"] { --t: var(--t-lab); } [data-type="software"] { --t: var(--t-software); }
[data-type="brand"] { --t: var(--t-brand); } [data-type="assistant"] { --t: var(--t-assistant); }
[data-type="growth"] { --t: var(--t-growth); } [data-type="anon"] { --t: var(--t-anon); }
.type-chip { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 6px; font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t, var(--muted)); }
.type-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--t); display: inline-block; }
.card[data-type]:hover, .card[data-type]:has(a:focus-visible) { border-color: var(--t); }

/* power and circuits: blueprint grid, amber dimension marks */
[data-type="power"] .card-art, [data-type="power"].head-art { background-image: linear-gradient(rgba(245,185,66,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(245,185,66,.07) 1px, transparent 1px); background-size: 22px 22px; }
[data-type="power"] .art .ax, [data-type="power"] .art text { stroke: var(--t); fill: var(--t); fill-opacity: .85; }
/* mechanical CAD: cool steel line, soft gradient stage */
[data-type="mechanical"] .art .d { stroke: var(--t-mechanical); }
[data-type="mechanical"] .card-art, [data-type="mechanical"].head-art { background: radial-gradient(80% 90% at 50% 40%, #1d2630 0%, var(--stage) 75%); }
/* sustainable energy: green line, faint horizon */
[data-type="sustain"] .art .d { stroke: var(--t-sustain); }
[data-type="sustain"] .card-art, [data-type="sustain"].head-art { background: linear-gradient(180deg, var(--stage) 55%, rgba(143,216,168,.09) 100%); }
/* automation: signal orange labels, HMI scanlines */
[data-type="automation"] .art text { fill: var(--t-automation); fill-opacity: .9; }
[data-type="automation"] .card-art, [data-type="automation"].head-art { background-image: repeating-linear-gradient(0deg, rgba(255,155,94,.05) 0, rgba(255,155,94,.05) 1px, transparent 1px, transparent 4px); }
/* materials lab: millimetre graph paper */
[data-type="lab"] .art .d { stroke: #e9f4f8; }
[data-type="lab"] .card-art, [data-type="lab"].head-art { background-image: linear-gradient(rgba(143,211,230,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(143,211,230,.08) 1px, transparent 1px); background-size: 8px 8px; }
/* business software: screenshot in a window frame (flat, never 3D) */
[data-type="software"] .art-fig.shot, [data-type="brand"] .art-fig.shot { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
[data-type="software"] .art-fig.shot::before, [data-type="brand"] .art-fig.shot::before { content: ""; display: block; height: 14px; background: #262626; border-bottom: 1px solid var(--line); background-image: radial-gradient(circle, #555 2.5px, transparent 3px), radial-gradient(circle, #555 2.5px, transparent 3px), radial-gradient(circle, #555 2.5px, transparent 3px); background-size: 14px 14px; background-position: 8px 50%, 22px 50%, 36px 50%; background-repeat: no-repeat; }
/* brand and web (Vintage Click): film-strip edges, cream accent */
[data-type="brand"] .card-art, [data-type="brand"].head-art { background: #17140f; border-left: 10px dashed rgba(232,211,168,.35); border-right: 10px dashed rgba(232,211,168,.35); }
[data-type="brand"] .art-fig.shot { box-shadow: 0 0 0 1px rgba(232,211,168,.4), 0 10px 28px rgba(0,0,0,.5); }
/* AI assistant: phone-frame feel, soft green */
[data-type="assistant"] .art .d { stroke: var(--t-assistant); }
[data-type="assistant"] .card-art, [data-type="assistant"].head-art { background: radial-gradient(60% 80% at 50% 50%, rgba(155,227,183,.10), var(--stage) 70%); }
/* growth plan: editorial rule */
[data-type="growth"] .art .d { stroke: var(--t-growth); }
[data-type="growth"] .card-art, [data-type="growth"].head-art { border-top: 3px solid var(--t-growth); }
/* anonymous employer work: neutral monochrome, no brand cues */
[data-type="anon"] .art .d { stroke: #d0d0d0; }
@media print { .type-chip i { border: 1px solid #000; background: none; } }

/* featured projects and case strip */
.featured { margin: 0 0 30px; }
.featured[hidden] { display: none; }
.featured h3 { margin: 0 0 14px; }
.cards-featured { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .cards-featured { grid-template-columns: repeat(3, 1fr); } }
.card-featured { border-color: var(--line-2); }
.case-strip { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; counter-reset: none; }
.case-strip li { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--t, var(--accent)); border-radius: 8px; padding: 12px 14px; }
.case-strip b { font: 12px var(--mono); color: var(--t, var(--muted)); margin-right: 8px; }
.case-strip span { font: 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case-strip p { margin: 8px 0 0; color: var(--ink); line-height: 1.45; }
@media print { .featured { display: none !important; } .case-strip li { border-color: #999; } }

/* ---------- light mode: light paper, dark "screens" for drawings, instruments, hero and tour ---------- */
.theme-toggle { background: transparent; color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font: 12px var(--mono); letter-spacing: .08em; cursor: pointer; min-height: 32px; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef; --bg-2: #efece5; --panel: #ffffff; --panel-2: #efece5; --stage: #121212;
  --line: rgba(20,20,20,.14); --line-2: rgba(20,20,20,.28);
  --ink: #171717; --ink-soft: #3b3b3b; --muted: #595959; --accent: #171717; --amber: #8a5a00; --good: #1d6a3a;
  --t-power: #8a5a00; --t-mechanical: #2f5a85; --t-sustain: #1d6a3a; --t-automation: #a8480f; --t-lab: #1b6579;
  --t-software: #171717; --t-brand: #7a5a1c; --t-assistant: #1d6a3a; --t-growth: #8a4a16; --t-anon: #4a4a4a;
}
:root[data-theme="light"] .site-nav { background: rgba(246, 244, 239, .88); }
:root[data-theme="light"] .nav-cta:hover { background: #000; color: #fff !important; }
:root[data-theme="light"] .brand::before { filter: none; }
:root[data-theme="light"] :is(.sheet-hero, .tour, .instrument, .card-art, .head-art, dialog.viewer, .proj-anim, .demo-stage, .wa-body, .art-fig.hero-fig, .big-art, .approach-art) { --bg: #141414; --bg-2: #181818; --panel: #1e1e1e; --panel-2: #262626; --stage: #121212; --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.2); --ink: #f4f4f4; --ink-soft: #bdbdbd; --muted: #9b9b9b; --accent: #ffffff; --amber: #f5b942; --good: #8fd8a8; --t-power: #f5b942; --t-mechanical: #a9c1dc; --t-sustain: #8fd8a8; --t-automation: #ff9b5e; --t-lab: #8fd3e6; --t-software: #ffffff; --t-brand: #e8d3a8; --t-assistant: #9be3b7; --t-growth: #f0c8a0; --t-anon: #bdbdbd; color: var(--ink); }
:root[data-theme="light"] .instrument { background: #1e1e1e; border-color: rgba(255,255,255,.12); }
:root[data-theme="light"] .tour { background: #0e0e0e; }
:root[data-theme="light"] .hire-strip { background: var(--panel); }
:root[data-theme="light"] .card[data-type]:hover { border-color: var(--t); }
:root[data-theme="light"] .chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
:root[data-theme="light"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="light"] .btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
:root[data-theme="light"] .btn-primary:hover { background: #000; }
:root[data-theme="light"] .btn-ghost { color: var(--ink); border-color: var(--line-2); }
:root[data-theme="light"] .sheet-hero .btn-primary { background: #fff; color: #141414; border-color: #fff; }
:root[data-theme="light"] .sheet-hero .btn-ghost { color: #f4f4f4; border-color: rgba(255,255,255,.35); }
/* touch targets: at least 44 px on touch screens */
@media (pointer: coarse) { .chip, .hc-btn, .lab-btn, .theme-toggle, .btn, .wa-chips button, .wa-form button, .hc-toggle, .hc-open { min-height: 44px; } .hc-btn { min-width: 44px; } }

.more-projects { margin: 26px 0 0; text-align: center; }
.all-projects-page { max-width: 1100px; margin: 0 auto; padding: 28px var(--gutter) 60px; }
.all-projects-page h1 { margin: 4px 0 8px; }

/* Vintage Click gallery */
.gallery-note { color: var(--muted); margin: 0 0 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: start; }
.visual-gallery { margin: 0; border: 1px solid rgba(232, 211, 168, .35); border-radius: 8px; overflow: hidden; background: #17140f; }
.visual-gallery img, .visual-gallery video { display: block; width: 100%; height: auto; }
.visual-video video { background: #17140f; }
@media print { .visual-video { display: none; } }

/* ---------- CTO review fixes ---------- */
/* [hidden] must always win: .filters and .msg-form set display and would show their JS-only UI without JavaScript */
[hidden] { display: none !important; }
/* touch: the hero and tour canvases must not trap vertical page scrolling (only the dialog viewer needs touch-action none) */
.hero-stage .v3d, .tour-stage .v3d { touch-action: pan-y; }
/* Explore / Zoom buttons do nothing without JavaScript */
html:not(.viewer-on) .art-open { display: none; }
/* nav links: at least 24 px tall, 44 px on touch screens */
.site-nav ul a { display: inline-block; padding: 5px 2px; min-height: 24px; }
@media (pointer: coarse) { .site-nav a { display: inline-flex; align-items: center; min-height: 44px; } }
/* crosshair label readable in both themes */
.crosshair b, :root[data-theme="light"] .crosshair b { color: #e2e2e2; background: rgba(20, 20, 20, .88); }
/* form and chip borders: at least 3:1 against the surface */
.wa-chips button, .wa-form button, .chip, .ar-skills li, .wa-form input, .msg-form input, .msg-form select, .msg-form textarea { border-color: #7d7d7d; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* reserve space so the no-JS text swapping for a live instrument does not shift the layout */
.instrument:not(.lab-ready) .lab-fallback { min-height: 200px; }

/* round-three: restored and extended */
:root[data-theme="light"] .crosshair .cx, :root[data-theme="light"] .crosshair .cy { background: rgba(20, 20, 20, .18); }
.ar-tools { margin: 0 0 8px; text-align: end; }
.foot-base .theme-toggle { margin-inline-start: 12px; }
