/* A reference-manual layout: serif body in justified columns, mono labels, figures in dotted frames.
   Layout idea after makingsoftware.com (the structure only); palette is white, green and black. */
:root {
  --paper: #fafcfa;
  --ink: #0a0d0b;
  --ink-2: rgba(10, 13, 11, 0.62);
  --green: #0b8f3f;
  --green-deep: #06602b;
  --green-wash: rgba(11, 143, 63, 0.08);
  --rule: rgba(11, 143, 63, 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", "Departure Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Cline x1='0' y1='0' x2='0' y2='1' stroke='%230b8f3f' stroke-opacity='0.28'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-deep); background: var(--green-wash); }
::selection { background: var(--green); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; font-family: var(--mono); font-size: 12px; z-index: 10; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

main { max-width: 1536px; margin: 0 auto; padding: 16px 16px 80px; }
@media (min-width: 640px) { main { padding: 24px 24px 80px; } }
@media (min-width: 768px) { main { padding: 40px 40px 100px; } }

.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---- masthead ---- */
.mast { display: grid; gap: 16px 6%; align-items: end; padding-bottom: 40px; border-bottom: 1px solid var(--ink); position: relative; }
.mast::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: var(--ink); }
@media (min-width: 1024px) { .mast { grid-template-columns: 1fr 1fr; } .mast .tag { text-align: right; } }
.mast h1 { margin: 0; font-weight: 700; font-size: clamp(40px, 8.4vw, 118px); line-height: 0.88; letter-spacing: -0.035em; }
.mast h1 span { color: var(--green); }
.mast .tag p { margin: 0; text-wrap: pretty; }
.mast .tag .by { font-weight: 500; }
.mast .tag .loc { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.mast nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; margin-top: 8px; }
.mast nav a { text-decoration: none; padding: 2px 0; border-bottom: 1px solid transparent; }
.mast nav a:hover { border-color: var(--green); background: none; }
.mast nav a::before { content: "→ "; color: var(--green); }

/* ---- figures ---- */
.fig { position: relative; margin: 0 0 32px; background: var(--texture) repeat; color: var(--green); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.fig::before, .fig::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--texture); }
.fig::before { top: 0; } .fig::after { bottom: 0; }
.fig .side { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--texture); }
.fig .side.l { left: 0; } .fig .side.r { right: 0; }
.fig svg { display: block; width: 100%; height: auto; padding: 28px 28px 22px; }
.fig svg text { font-family: var(--mono); fill: var(--green-deep); text-transform: uppercase; }
.fig figcaption { position: absolute; background: var(--paper); color: var(--ink-2); padding: 0 4px; line-height: 1.2; }
.fig .c-id { top: 4px; left: 18px; transform-origin: top left; transform: rotate(90deg); }
.fig .c-name { top: 4px; right: 18px; transform-origin: bottom left; transform: translate(100%, -100%) rotate(90deg); }
.fig .c-year { bottom: 36px; right: 18px; transform-origin: bottom left; transform: translate(100%, -100%) rotate(90deg); display: none; }
@media (min-width: 640px) { .fig .c-year { display: block; } }
.fig .note { position: absolute; left: 36px; bottom: 6px; background: var(--paper); padding: 0 4px; color: var(--ink-2); }
.fig-wrap { margin-right: 22px; }   /* room for the rotated caption on the right edge */

.hero { position: relative; margin-top: 40px; }
.hero .fig-main { float: none; width: 100%; }
@media (min-width: 1024px) { .hero .fig-main { float: right; width: 47%; margin-left: 4%; } }
@media (min-width: 1280px) { .hero .fig-main { width: 58%; } }
.cols { text-align: justify; hyphens: auto; font-size: 14px; line-height: 160%; column-fill: balance; columns: 1; column-gap: 6%; }
@media (min-width: 640px) { .cols { columns: 2; } }
@media (min-width: 1280px) { .cols { columns: 3; } }
.cols p { margin: 0 0 24px; break-inside: avoid; }
.cols p:first-of-type::first-letter { -webkit-initial-letter: 2; initial-letter: 2; padding-right: 4px; color: var(--green); font-weight: 700; }
.cols b, .cols code { font-weight: 600; }
.cols code { font-family: var(--mono); font-size: 12px; background: var(--green-wash); padding: 0 3px; }
.cols .fig { break-inside: avoid; margin-bottom: 24px; }
.clear { clear: both; }

/* ---- section headings ---- */
h2.sec { font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin: 72px 0 20px; display: flex; gap: 12px; align-items: center; }
h2.sec::before { content: ""; width: 10px; height: 10px; background: var(--green); flex: none; }
h2.sec::after { content: ""; flex: 1; height: 1px; background: var(--ink); }

/* ---- the offer block (what the original sells, here the contact) ---- */
.offer { display: grid; gap: 24px 6%; border-top: 1px solid var(--ink); padding-top: 24px; }
@media (min-width: 900px) { .offer { grid-template-columns: 1.2fr 1fr; } }
.offer h3 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 700; }
.offer p { margin: 0 0 12px; max-width: 54ch; text-wrap: pretty; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { font-family: var(--mono); font-size: 12px; text-transform: uppercase; text-decoration: none; padding: 11px 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; gap: 10px; align-items: center; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.go { background: var(--green); border-color: var(--green); color: #fff; }
.btn.go:hover { background: var(--green-deep); border-color: var(--green-deep); }
.resumes { display: grid; gap: 10px; align-content: start; }
.resumes a { display: flex; justify-content: space-between; gap: 16px; text-decoration: none; padding: 14px 16px; border: 1px solid var(--ink); font-size: 14px; }
.resumes a span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--ink-2); }
.resumes a:hover { background: var(--green-wash); border-color: var(--green); }

/* ---- table of contents ---- */
.toc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.toc-head h2 { margin: 0; font-size: clamp(28px, 4vw, 52px); letter-spacing: -0.03em; line-height: 1; }
.toc-head span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-transform: uppercase; }
.toc { display: grid; gap: 0 6%; margin-top: 24px; }
@media (min-width: 900px) { .toc { grid-template-columns: 1fr 1fr; } }
.chap { border-top: 1px solid var(--ink); padding: 14px 0 28px; break-inside: avoid; }
.chap h3 { font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; margin: 0 0 8px; color: var(--green-deep); }
.chap h3 b { color: var(--ink); font-weight: 500; margin-right: 8px; }
.chap ul { list-style: none; margin: 0; padding: 0; }
.chap li a { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding: 7px 0; text-decoration: none; font-size: 17px; letter-spacing: -0.005em; }
.chap li a::after { content: ""; grid-column: 2; grid-row: 1; border-bottom: 1px dotted var(--ink-2); transform: translateY(-4px); }
.chap li a .t { grid-column: 1; grid-row: 1; }
.chap li a .m { grid-column: 3; grid-row: 1; font-family: var(--mono); font-size: 10px; text-transform: uppercase; color: var(--ink-2); text-align: right; }
.chap li a:hover { background: var(--green-wash); }
.chap li a:hover .t { color: var(--green-deep); }
.chap li p { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }

.progress { margin-top: 8px; border: 1px solid var(--ink); padding: 18px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; display: grid; gap: 14px; }
.progress .bar { font-size: clamp(12px, 2.4vw, 20px); letter-spacing: 0.1em; color: var(--green); white-space: nowrap; overflow: hidden; }
.progress dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 24px; margin: 0; }
.progress dt { color: var(--ink-2); } .progress dd { margin: 0; font-size: 16px; }

/* ---- tools ---- */
.tools { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.tools div { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 16px 18px; }
.tools h3 { font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; margin: 0 0 8px; color: var(--green-deep); }
.tools p { margin: 0; font-size: 16px; line-height: 1.5; }
.tools p i { font-style: normal; color: var(--green); padding: 0 5px; }

/* ---- IN / OUT questions ---- */
.qa { display: grid; gap: 0 6%; border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .qa { grid-template-columns: 1fr 1fr; } }
.qa-list { list-style: none; margin: 0; padding: 0; }
.qa-list button { all: unset; box-sizing: border-box; display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 18px; letter-spacing: -0.01em; }
.qa-list button::after { content: "↓"; font-family: var(--mono); color: var(--green); }
.qa-list button:hover { background: var(--green-wash); }
.qa-list button[aria-selected="true"] { color: var(--green-deep); font-weight: 600; }
.qa-list button[aria-selected="true"]::after { content: "→"; }
.term { margin-top: 16px; background: var(--ink); color: #e9f5ec; font-family: var(--mono); font-size: 13px; line-height: 1.6; padding: 18px 20px; min-height: 220px; align-self: start; position: sticky; top: 16px; }
.term .k { color: #5ee08a; }
.term .out { display: block; margin-top: 10px; font-family: var(--serif); font-size: 16px; line-height: 1.55; color: #fff; text-wrap: pretty; }
.term em { font-style: normal; background: var(--green); color: #fff; padding: 0 4px; }

footer { margin-top: 80px; border-top: 1px solid var(--ink); padding-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--ink-2); }
footer a { color: var(--ink); }

@media print { .skip, .term { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .fig svg .pulse { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.35; } }
}

.split { display: grid; gap: 24px 6%; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.5fr; } }
.cols.one { columns: 1 !important; }
.split .figs .fig { margin-bottom: 40px; }

/* ---- portfolio layout ---- */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.top nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.top nav a:hover { border-color: var(--green); background: none; }
.hero { display: grid; gap: 32px 5%; margin-top: 48px; align-items: center; }
@media (min-width: 1024px) { .hero { grid-template-columns: 1fr 1.15fr; } }
.hero .fig { margin: 0; }
.kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--green-deep); margin: 0 0 16px; }
.hero h1 { margin: 0; font-weight: 700; font-size: clamp(40px, 6.4vw, 92px); line-height: 0.92; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 span { color: var(--green); }
.lede { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; max-width: 38ch; margin: 22px 0 0; text-wrap: pretty; }
.hero .btns { margin-top: 26px; }
.work { border-top: 1px solid var(--ink); }
.proj { display: grid; gap: 14px 5%; padding: 26px 0 30px; border-bottom: 1px solid var(--rule); grid-template-columns: 44px 1fr; align-items: start; }
@media (min-width: 1024px) { .proj:has(> .fig), .proj:has(> .proj-figs) { grid-template-columns: 44px 1fr 1.1fr; } }
.proj .num { font-family: var(--mono); font-size: 11px; color: var(--green); padding-top: 8px; }
.proj h3 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -0.025em; line-height: 1.05; }
.proj.lead h3 { font-size: clamp(28px, 3.6vw, 48px); }
.proj .meta { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.proj p { margin: 0 0 10px; max-width: 64ch; text-wrap: pretty; }
.proj .fig { margin: 0; grid-column: 1 / -1; }
@media (min-width: 1024px) { .proj .fig { grid-column: auto; } }
.prs { list-style: none; margin: 0 0 10px; padding: 0; max-width: 70ch; }
.prs li { padding: 8px 0; border-top: 1px dotted var(--ink-2); }
.prs a { font-family: var(--mono); font-size: 12px; margin-right: 6px; color: var(--green-deep); }
.note-line { font-size: 13px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; border: 1px solid var(--ink); padding: 3px 7px; }
.links { font-family: var(--mono); font-size: 12px; text-transform: uppercase; display: flex; gap: 16px; flex-wrap: wrap; }
.about { display: grid; gap: 28px 6%; }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; } }
.about .cols.one { font-size: 17px; line-height: 1.6; text-align: left; }
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--green-deep); padding-top: 3px; }
.facts dd { margin: 0; }
.facts dd span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--ink-2); }
.resumes.row { grid-template-columns: 1fr; }
@media (min-width: 700px) { .resumes.row { grid-template-columns: 1fr 1fr; } }
.offer { grid-template-columns: 1fr !important; }

/* ---- skills: one bar that runs on its own (cells as on the drone site) ---- */
.skills { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); position: relative; }
.marquee { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; outline: none; touch-action: pan-x pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.marquee::-webkit-scrollbar { display: none; }
.marquee.drag { cursor: grabbing; user-select: none; }
.track { display: flex; list-style: none; margin: 0; padding: 0; width: max-content; }
.track li { display: flex; }
.tech {
  --brand: var(--green);
  position: relative; display: grid; place-items: center; align-content: center; gap: 12px; width: 132px; min-height: 124px; padding: 20px 10px 16px;
  background: transparent; border: 0; border-right: 1px solid var(--rule); color: var(--ink); cursor: inherit; font: inherit;
  transition: color 180ms ease, background-color 180ms ease;
}
.tech svg { width: 36px; height: 36px; transition: transform 220ms cubic-bezier(.22,1,.36,1); pointer-events: none; }
.tech-name { font-family: var(--mono); font-size: 10.5px; line-height: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); text-align: center; pointer-events: none; }
.tech::before { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 3px; background: var(--brand); transition: width 220ms cubic-bezier(.22,1,.36,1); }
.tech:hover, .tech:focus-visible, .tech.on { color: var(--brand); background: var(--green-wash); outline: none; }
.tech:hover svg, .tech:focus-visible svg, .tech.on svg { transform: translateY(-3px) scale(1.06); }
.tech:hover .tech-name, .tech:focus-visible .tech-name, .tech.on .tech-name { color: var(--ink); }
.tech:hover::before, .tech:focus-visible::before, .tech.on::before { width: 100%; }
.grp span { display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); padding: 0 14px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--ink); min-height: 124px; }
.skill-note { margin: 0; border-top: 1px solid var(--rule); padding: 10px 2px; font-size: 11px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 16px; min-height: 37px; }
.skill-note b { color: var(--ink); font-weight: 500; }
.skill-note i { font-style: normal; color: var(--green-deep); }
@media (max-width: 640px) { .tech { width: 104px; min-height: 104px; } .tech svg { width: 30px; height: 30px; } .grp span { min-height: 104px; } }

/* ---- FIG_001: the drone as a line drawing ---- */
.proj-figs { grid-column: 1 / -1; display: grid; gap: 24px; }
@media (min-width: 1024px) { .proj-figs { grid-column: auto; } }
.proj-figs .fig { margin: 0; }
.line-fig .stage { position: relative; aspect-ratio: 6 / 5; cursor: grab; touch-action: pan-y; outline: none; }
.line-fig .stage:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
.line-fig .stage.drag { cursor: grabbing; }
.line-fig canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 600ms ease; }
.line-fig.ready canvas { opacity: 1; }
.line-fig .leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.line-fig .leaders path { fill: none; stroke: var(--ink); stroke-width: 0.75; opacity: 0.7; }
.line-fig .leaders circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.1; }
.line-fig .callouts { position: absolute; inset: 0; pointer-events: none; }
.callout { position: absolute; left: 0; top: 0; display: grid; line-height: 1.25; background: var(--paper); padding: 2px 5px; white-space: nowrap; will-change: transform; }
.callout b { font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); }
.callout i { font-family: var(--mono); font-size: 9px; font-style: normal; text-transform: uppercase; color: var(--ink-2); }
.callout.r { text-align: right; } .callout:not(.r) { text-align: left; }
.callout.mine { background: var(--green); } .callout.mine b, .callout.mine i { color: #fff; }
@media (max-width: 640px) { .callout i { display: none; } .callout b { font-size: 9px; } }
@media (max-width: 640px) { .drone-fig .stage { aspect-ratio: 4 / 3.4; } }
.robot-fig .stage { aspect-ratio: 1 / 1.08; }
@media (max-width: 640px) { .robot-fig .stage { aspect-ratio: 1 / 1.15; } }
.credit { font-size: 12px; color: var(--ink-2); margin: 0; max-width: 70ch; }

/* ---- FIG_002: the PHMC from its board file (units in the SVG are millimetres) ---- */
.phmc-fig svg { color: var(--green); padding: 30px 26px 34px; }
.phmc-fig .pcb-board { fill: var(--paper); stroke: var(--green); stroke-width: 0.24; }
.phmc-fig .pcb-gnd path { fill: var(--green); opacity: 0.05; }
.phmc-fig .pcb-pour path { fill: var(--green); opacity: 0.07; }
.phmc-fig .pcb-pour path.hot { fill: url(#hatch); opacity: 0.9; }
.phmc-fig .pcb-tracks path { fill: none; stroke: var(--green); stroke-linecap: round; opacity: 0.5; }
.phmc-fig .pcb-tracks path.hot { stroke: var(--green-deep); opacity: 0.95; }
.phmc-fig .pcb-tracks path.ctl { stroke: var(--green-deep); opacity: 0.85; }
.phmc-fig .pcb-tracks.back path { stroke-dasharray: 0.45 0.4; stroke-linecap: butt; opacity: 0.3; }
.phmc-fig .pcb-tracks.back path.ctl { opacity: 0.7; }
.phmc-fig .pcb-pads rect, .phmc-fig .pcb-pads circle { fill: var(--paper); stroke: var(--green-deep); stroke-width: 0.07; }
.phmc-fig .pcb-pads .hole { stroke: var(--green); stroke-width: 0.14; }
.phmc-fig .pcb-pads .keep { fill: none; stroke: var(--green); stroke-width: 0.08; stroke-dasharray: 0.4 0.35; }
.phmc-fig .pcb-vias circle { fill: var(--paper); stroke: var(--green-deep); stroke-width: 0.09; }
.phmc-fig .pcb-fab path { fill: none; stroke: var(--ink); stroke-width: 0.07; opacity: 0.5; }
.phmc-fig svg .pcb-silk text { fill: var(--ink); text-anchor: middle; dominant-baseline: central; text-transform: none; }
.phmc-fig .pcb-silk .big { font-size: 0.95px; font-weight: 500; }
.phmc-fig .pcb-silk .small { font-size: 0.55px; opacity: 0.75; }
.phmc-fig svg .pcb-text text { font-size: 0.95px; fill: var(--green-deep); text-anchor: middle; dominant-baseline: central; letter-spacing: 0.05px; }

.phmc-fig .pp path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.phmc-fig .pp .under { stroke: var(--paper); stroke-width: 1.05; opacity: 0.85; }
.phmc-fig .pp .flow { stroke: var(--ink); stroke-width: 0.42; stroke-dasharray: 1.1 0.7; }
.phmc-fig .pp .flow.vbat { stroke-width: 0.55; }
@keyframes pp-flow { from { stroke-dashoffset: 1.8; } to { stroke-dashoffset: 0; } }

.phmc-fig .led .halo { fill: url(#led-glow); }
.phmc-fig .led .die { fill: #19d35f; stroke: var(--green-deep); stroke-width: 0.05; }
@keyframes led-blink { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes led-die { 0%, 49.9% { fill: #19d35f; } 50%, 100% { fill: var(--paper); } }

.phmc-fig .pp-labels path { fill: none; stroke: var(--ink); stroke-width: 0.09; }
.phmc-fig .pp-labels circle { fill: var(--paper); stroke: var(--ink); stroke-width: 0.11; }
.phmc-fig svg .pp-labels text { font-size: 1.05px; fill: var(--ink); letter-spacing: 0.04px; }
.phmc-fig .dims path { fill: none; stroke: var(--green); stroke-width: 0.1; }
.phmc-fig svg .dims text { font-size: 0.95px; }

.phmc-fig .legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; right: 36px; }
.phmc-fig .legend i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.phmc-fig .legend .k-flow { width: 18px; height: 0; border-top: 2px dashed var(--ink); }
.phmc-fig .legend .k-back { width: 18px; height: 0; border-top: 1px dashed var(--green); }
.phmc-fig .legend .k-led { width: 8px; height: 8px; border-radius: 50%; background: #19d35f; box-shadow: 0 0 0 3px rgba(11, 143, 63, 0.22); }

@media (prefers-reduced-motion: no-preference) {
  .phmc-fig .pp .flow { animation: pp-flow 0.7s linear infinite; }
  .phmc-fig .led .halo { animation: led-blink 1s infinite; }
  .phmc-fig .led .die { animation: led-die 1s infinite; }
  .phmc-fig .legend .k-led { animation: led-blink 1s infinite; }
}

/* ---- projects 03 to 06: two by two ---- */
.proj-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .proj-grid .proj { padding-right: 5%; }
  .proj-grid .proj:nth-child(even) { padding-right: 0; padding-left: 5%; border-left: 1px solid var(--rule); }
  .proj-grid .proj h3 { font-size: clamp(22px, 2.2vw, 30px); }
}
.proj-grid .proj { grid-template-columns: 44px 1fr; }
