/* Bruno Stuger portfolio site: a dark, clean "product screen" style.
   Fonts: IBM Plex Sans (text) and IBM Plex Mono (labels), served from /fonts. */

@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0a0b0c;
  --panel: #101215;
  --panel-2: #16191d;
  --line: #23272d;
  --line-2: #323840;
  --text: #f3f4f6;
  --muted: #8b919a;
  --green: #45d483;
  --green-ink: #04170c;
  --sans: "Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--green); color: var(--green-ink); padding: .5rem 1rem; border-radius: 99px; }
.skip-link:focus { top: 1rem; }

/* Small code-style label with a green tick */
.label {
  display: flex; align-items: center; gap: .6rem;
  font: 500 .8125rem/1 var(--mono);
  text-transform: uppercase; letter-spacing: .04em;
  color: #c9ccd1;
}
.tick { width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid var(--green); }

/* Header: a floating, rounded bar that doesn't touch the screen edges.
   "sticky" keeps it in place while the page scrolls behind it. */
.site-header {
  position: sticky; top: .75rem; z-index: 10;
  width: min(100% - 1.5rem, calc(var(--wrap) + 2.5rem));
  margin: .75rem auto 0;
  border: 1px solid var(--line-2); border-radius: 99px;
  background: rgb(16 18 21 / .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px -14px rgb(0 0 0 / .8);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; padding: 0 .5rem 0 1.25rem; }
.site-nav ul { display: flex; gap: .25rem; }
.site-nav a { display: block; padding: .45rem .9rem; border-radius: 99px; color: var(--muted); text-decoration: none; font-size: .9375rem; transition: color .2s, background-color .2s; }
.site-nav a:hover { color: var(--text); background: rgb(255 255 255 / .06); }
.menu-btn { display: none; }

/* Bruno's name: four small voice bars, then the name in a slow-moving color gradient */
.name { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.name-mark { display: inline-flex; align-items: center; gap: 2px; height: 1.2rem; }
.name-mark i { display: block; width: 3px; border-radius: 2px; animation: bar 2.4s ease-in-out infinite alternate; }
.name-mark i:nth-child(1) { height: 50%; background: #45d483; animation-delay: -.3s; }
.name-mark i:nth-child(2) { height: 100%; background: #2dd4bf; animation-delay: -1.5s; }
.name-mark i:nth-child(3) { height: 70%; background: #60a5fa; animation-delay: -.9s; }
.name-mark i:nth-child(4) { height: 40%; background: #a78bfa; animation-delay: -2.1s; }
@keyframes bar { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.name-text {
  font-weight: 500; font-size: 1.3125rem; line-height: 1.1; letter-spacing: -.03em;
  background: linear-gradient(90deg, #f3f4f6 0%, #f3f4f6 18%, #45d483 36%, #2dd4bf 50%, #60a5fa 64%, #a78bfa 78%, #f3f4f6 96%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shine 9s ease-in-out infinite alternate;
}
@keyframes shine { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.875rem; padding: 0 1.4rem; border-radius: 99px;
  font-weight: 500; font-size: .9375rem; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-fill { background: var(--green); color: var(--green-ink); }
.btn-fill:hover { background: #6be29f; }
.btn-line { border: 1px solid var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--muted); }

/* 1. Top section */
/* The top section slides up under the floating header, so the light effect shows
   through the header's frosted glass. --head is the header's height plus its gap. */
.hero { --head: 4.4rem; position: relative; margin-top: calc(-1 * var(--head)); padding-bottom: 5rem; overflow: hidden; }
.hero-fx {
  position: absolute; top: 0; left: 0; z-index: 0;
  display: block; width: 100%; height: calc(var(--head) + clamp(19rem, 44vw, 33rem));
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 40%, transparent 96%);
}
.hero-body { position: relative; z-index: 1; padding-top: calc(var(--head) + clamp(6.5rem, 22vw, 13.5rem)); }

/* "Solutions Engineer · Mexico City" as a green-edged badge */
.role {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  padding: .55rem 1.15rem .55rem .9rem;
  border: 1px solid rgb(69 212 131 / .35); border-radius: 99px;
  background: rgb(69 212 131 / .07);
  font-weight: 500; font-size: clamp(1rem, 1.45vw, 1.1875rem); line-height: 1.2;
}
.role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgb(69 212 131 / .18); }
.role-title { letter-spacing: -.01em; }
.role-sep { width: 1px; height: 1.1em; background: rgb(69 212 131 / .35); }
.role-place { display: inline-flex; align-items: center; gap: .35rem; color: #c9ccd1; font-weight: 400; }
.pin { width: 1.05em; height: 1.05em; fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linejoin: round; }

.hero-title {
  margin-top: 1.75rem;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero-title span { display: block; }
.hero-title .lo { color: var(--muted); }
.hero-text { margin-top: 1.75rem; max-width: 38rem; color: var(--muted); font-size: 1.125rem; }
.hero .buttons { margin-top: 2.25rem; }
.small-links { display: flex; gap: 1.5rem; margin-top: 2rem; font: 400 .875rem var(--mono); }
.small-links a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.small-links a:hover { border-color: var(--green); }
/* "Open to" roles: their own row of chips under a thin line */
.open-to {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px dashed var(--line-2);
}
.open-to-label { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.role-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.role-chips li { padding: .4rem .9rem; border: 1px solid var(--line-2); border-radius: 99px; background: var(--panel); color: #c9ccd1; font-size: .875rem; line-height: 1.3; }

/* 2. Four pillars, in the order a customer meets them.
   A small dot sits on the top line above each one, like stops on a route. */
.pillars { border-block: 1px solid var(--line); }
.pillar-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillar { position: relative; padding: 2.25rem 1.5rem 2.5rem 0; }
.pillar + .pillar { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.pillar::before {
  content: ""; position: absolute; top: -5px; left: -5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--green);
}
.pillar:first-child::before { left: 0; }
.pillar .icon { display: block; margin: 0 0 1.25rem; }
.pillar-step { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pillar h3 { margin-top: .65rem; font-weight: 500; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.01em; }
.pillar h3 + p { margin-top: .6rem; color: var(--muted); font-size: .9375rem; line-height: 1.5; }

/* 3. At work */
.at-work { padding-block: 7rem 8rem; }
.section-head { display: grid; grid-template-columns: 14rem 1fr; gap: 2rem; }
.big-num {
  display: block; margin-top: 1.25rem;
  font: 400 6.5rem/1 var(--mono);
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
}
.two-tone { font-size: clamp(1.5rem, 2.7vw, 2.375rem); line-height: 1.22; letter-spacing: -.025em; max-width: 46rem; }
.two-tone h2, .two-tone p { display: inline; font: inherit; }
.two-tone p { color: var(--muted); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 5rem; align-items: start; }
/* Right-hand cards sit a little lower, without pushing anything else down */
.card-offset { transform: translateY(7rem); }
.card {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel);
  padding: 1.75rem;
}
/* Card top: small green label, a mini headline, then two or three sentences */
.card-kicker { display: flex; align-items: center; gap: .5rem; font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.card-kicker::before { content: ""; width: 14px; height: 1.5px; background: var(--green); }
.card-title { margin-top: .85rem; font-weight: 500; font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.card-desc { margin-top: .75rem; color: var(--muted); font-size: .9375rem; line-height: 1.6; }

/* "Result" box under the drawing: the outcome, big and green */
.result {
  margin-top: 1rem; padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid rgb(69 212 131 / .45); border-radius: 12px;
  background: radial-gradient(130% 160% at 0% 0%, rgb(69 212 131 / .17), rgb(69 212 131 / .03) 62%), #0c0d0f;
}
.result-label { display: flex; align-items: center; gap: .5rem; font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.result-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgb(69 212 131 / .22); }
.result-big { margin-top: .65rem; font-weight: 500; font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.03em; color: var(--green); }
.result-text { margin-top: .55rem; color: #c9ccd1; font-size: .9375rem; line-height: 1.55; }

/* Tech and Requirements rows at the bottom of each card */
.specs { display: grid; gap: .9rem; margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px dashed var(--line-2); }
.specs > div { display: grid; grid-template-columns: 7.25rem 1fr; gap: .75rem; }
.specs dt { padding-top: .3rem; font: 500 .72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.logo-tags, .req-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
/* Tech: a color logo and the name, in code-style letters */
.logo-tags li {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .25rem .6rem .25rem .45rem; border: 1px solid var(--line-2); border-radius: 7px;
  background: #0c0d0f; color: #dfe1e5; font: 400 .8125rem/1.35 var(--mono);
}
.logo-tags img { width: 15px; height: 15px; flex: none; }
/* Requirements: plain skill chips, no border, so they read differently from Tech */
.req-tags li { padding: .25rem .6rem; border-radius: 7px; background: rgb(255 255 255 / .05); color: #c9ccd1; font-size: .8125rem; line-height: 1.35; }

/* Drawings that look like small product screens */
.drawing { margin-top: 1.5rem; }
.drawing figcaption { margin-top: .5rem; font: 400 .75rem var(--mono); color: var(--muted); text-align: right; }
.screen {
  border: 1px solid var(--line); border-radius: 10px;
  background: #0c0d0f;
  font: 400 .8125rem/1.4 var(--mono);
  overflow: hidden;
}
.screen img { flex: none; }
.screen-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line);
  color: #c9ccd1;
}
.muted { color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: .5rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgb(69 212 131 / .6); }
.is-playing .live-dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgb(69 212 131 / 0); } 100% { box-shadow: 0 0 0 0 rgb(69 212 131 / 0); } }

/* Dispatcher drawing: the call as a chat. Agent on the left, Bruno's app on the right. */
.lanes {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 1rem; border-bottom: 1px dashed #1d2025;
  font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.lanes span { display: inline-flex; align-items: center; gap: .45rem; }
.convo { display: grid; gap: .55rem; padding: .9rem 1rem 1.1rem; }
.convo li {
  max-width: 84%; padding: .5rem .7rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #121418; color: #c9ccd1;
  opacity: 0; transform: translateY(4px);
  transition: opacity .35s, transform .35s, border-color .35s, box-shadow .35s;
}
.convo li.on { opacity: 1; transform: none; }
.convo .agent { justify-self: start; border-bottom-left-radius: 3px; }
.convo .ask { border-style: dashed; }
.convo .app { justify-self: end; border-bottom-right-radius: 3px; border-color: rgb(69 212 131 / .3); background: rgb(69 212 131 / .06); }
.convo .sys { justify-self: center; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-style: dashed; border-radius: 99px; font-size: .72rem; color: var(--muted); }
.convo li.now { border-color: var(--green); box-shadow: 0 0 0 3px rgb(69 212 131 / .12); }
.convo .done.on { color: var(--green); }
.convo b { color: var(--text); font-weight: 500; }
.dir { display: flex; align-items: center; gap: .35rem; margin-bottom: .2rem; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.convo .app .dir { justify-content: flex-end; }

/* Call player: the real call. Its wave scrolls past a fixed green line, edge to edge
   across the card, like tape passing a tape head. Green = agent, blue = caller. */
.call { margin-top: 1.5rem; }
.call [data-ui][hidden] { display: none; }
.call-top { display: flex; align-items: center; gap: .9rem; }
.call-play {
  position: relative; flex: none; display: grid; place-items: center;
  width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: var(--green); color: var(--green-ink); cursor: pointer;
  transition: background-color .2s;
}
.call-play:hover { background: #6be29f; }
.call-play svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.call-play .i-pause, .call.is-playing .call-play .i-play { display: none; }
.call.is-playing .call-play .i-pause { display: block; }
.call.is-playing .call-play { animation: pulse 1.6s infinite; }
/* While the file is still loading, a thin ring spins around the button */
.call.is-loading .call-play::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.call-title { font-weight: 500; font-size: 1rem; line-height: 1.3; }
.call-meta { margin-top: .2rem; font: 400 .75rem/1.4 var(--mono); color: var(--muted); }
.call-tape {
  position: relative; margin: 1.1rem -1.75rem 0; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgb(69 212 131 / .05) 50%, transparent), #0c0d0f;
}
.call-tape:has(:focus-visible) { outline: 2px solid var(--green); outline-offset: -2px; }
.call-wave {
  display: block; width: 100%; height: 6rem; cursor: grab; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.call-wave:active { cursor: grabbing; }
/* The clock hangs under the green line, like the counter on a tape deck */
.call-time {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%);
  padding: .1rem .55rem; border: 1px solid var(--line-2); border-radius: 99px; background: var(--panel);
  font: 400 .72rem/1.4 var(--mono); font-variant-numeric: tabular-nums; color: #c9ccd1; white-space: nowrap;
  pointer-events: none;
}
.call-wave:focus-visible { outline: none; }
.call.calm .call-wave { -webkit-mask-image: none; mask-image: none; cursor: pointer; }
.call-caption { min-height: 3.1em; margin-top: 1.35rem; font-size: .9375rem; line-height: 1.55; color: #dfe1e5; }
.call-hint { color: var(--muted); }
.call-caption .who { margin-right: .55rem; }
/* Speaker labels, in the captions and in the written call */
.call .who { font: 500 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
[data-who="agent"] .who { color: var(--green); }
[data-who="caller"] .who { color: #60a5fa; }
[data-who="app"] .who { color: var(--green); padding: .15rem .4rem; border: 1px dashed rgb(69 212 131 / .6); border-radius: 5px; }
[data-who="app"] .said { color: var(--green); }
.bleep { padding: 0 .35rem; border-radius: 4px; background: rgb(255 255 255 / .1); font: 400 .8em var(--mono); color: #c9ccd1; }
.call-key { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .55rem; font: 400 .72rem var(--mono); color: var(--muted); }
.call-key li { display: inline-flex; align-items: center; gap: .45rem; }
.call-key li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--green); }
.call-key .k-caller::before { background: #60a5fa; }
.call-key .k-app::before { width: 12px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--green); }
.call-audio { display: block; width: 100%; margin-top: 1rem; }
/* "Read the call": the full call as text, for anyone who can't or doesn't want to listen */
.call-more { margin-top: 1rem; border-top: 1px dashed var(--line-2); padding-top: .85rem; }
.call-more summary { cursor: pointer; width: fit-content; font: 500 .8125rem var(--mono); color: #c9ccd1; }
.call-more summary:hover { color: var(--text); }
.call-lines { display: grid; gap: .5rem; max-height: 22rem; overflow-y: auto; margin-top: .85rem; padding-right: .5rem; font-size: .875rem; line-height: 1.5; color: #c9ccd1; }
.call-lines li { display: grid; grid-template-columns: 2.6rem 4.6rem 1fr; align-items: baseline; }
.call-lines .at { font: 400 .72rem var(--mono); color: var(--muted); }
.call-lines .who { justify-self: start; }

/* Workflow drawing: one logo per step, joined by a line that turns green as the work moves down */
.pipe { padding: 1rem 1rem 1.1rem; }
.pipe li { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .8rem; padding-bottom: .85rem; opacity: .3; transition: opacity .35s; }
.pipe li:last-child { padding-bottom: 0; }
.pipe li:not(:last-child)::before,
.pipe li:not(:last-child)::after { content: ""; position: absolute; left: calc(1rem - .5px); top: 2.15rem; bottom: .15rem; width: 1px; background: var(--line-2); }
.pipe li:not(:last-child)::after { background: var(--green); transform-origin: top; transform: scaleY(0); transition: transform .5s ease-out; }
.pipe li:has(+ li.on)::after { transform: scaleY(1); }
.pipe li.on { opacity: 1; }
.node {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 8px;
  border: 1px solid var(--line-2); background: #16191d;
  transition: border-color .35s, box-shadow .35s;
}
.node img { width: 1.1rem; height: 1.1rem; }
.pipe li.now .node, .sync-node.now .node { border-color: var(--green); box-shadow: 0 0 0 4px rgb(69 212 131 / .15); }
.pipe-body { min-width: 0; }
.pipe-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding-top: .35rem; }
.pipe-k { color: var(--text); font-weight: 500; }
.pipe-v { color: var(--muted); }
.pipe li.done.on .pipe-v { color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.chips span { padding: .08rem .45rem; border: 1px solid var(--line-2); border-radius: 5px; font-size: .7rem; color: #c9ccd1; }
.chips .good { color: var(--green); border-color: rgb(69 212 131 / .4); background: rgb(69 212 131 / .07); }
/* The owner's daily PDF, as a tiny report */
.report { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: .55rem; border: 1px solid var(--line-2); border-radius: 7px; background: var(--line-2); overflow: hidden; }
.report p { display: grid; gap: .1rem; padding: .45rem .6rem; background: #121418; }
.report span { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.report b { font-weight: 500; color: var(--text); }

/* Move list: each job crosses over from its old tool to Cloudflare */
.moves { padding: .4rem 1rem .6rem; }
.moves li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: .6rem;
  padding: .55rem 0; border-bottom: 1px dashed #1d2025;
}
.moves li:last-child { border-bottom: 0; }
.job { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #50565f; transition: color .35s; }
.from, .to { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .45rem; border-radius: 5px; border: 1px solid var(--line-2); font-size: .72rem; transition: color .35s, border-color .35s, background-color .35s, opacity .35s; }
.from { color: #c9ccd1; }
.to { color: var(--muted); opacity: .25; }
.to-arrow { color: #50565f; transition: color .35s; }
.moves li.on .job { color: #c9ccd1; }
.moves li.on .from { color: #6b717a; border-color: #23272d; text-decoration: line-through; opacity: .6; }
.moves li.on .to-arrow { color: var(--green); }
.moves li.on .to { opacity: 1; color: var(--green); border-color: rgb(69 212 131 / .45); background: rgb(69 212 131 / .08); }
/* Shows once the last job has moved */
.moves-foot { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem; border-top: 1px solid var(--line); color: var(--muted); opacity: .3; transition: opacity .35s, color .35s; }
.moves:has(li:last-child.on) + .moves-foot { opacity: 1; color: #c9ccd1; }

/* Solar drawing: a bar for each month's power bill, the CRM sync, then the project's stages */
.bills { padding: 1rem 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.bills-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; color: #c9ccd1; }
.shared { display: inline-flex; align-items: center; gap: .4rem; color: #50565f; transition: color .35s; }
.bills.on .shared { color: var(--green); }
.bill-bars { display: flex; align-items: flex-end; gap: .35rem; height: 4.5rem; margin-top: 1rem; }
.bill-bars i {
  flex: 1; height: calc(var(--h) * 1%);
  border-radius: 2px 2px 0 0; background: rgb(69 212 131 / .55);
  transform-origin: bottom; transform: scaleY(0);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--n) * 50ms);
}
.bills.on .bill-bars i { transform: scaleY(1); }
.months { display: flex; gap: .35rem; margin-top: .4rem; }
.months span { flex: 1; text-align: center; font-size: .62rem; color: #50565f; }

.sync { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.sync-node { display: flex; align-items: center; gap: .6rem; opacity: .3; transition: opacity .35s; }
.sync-node.on { opacity: 1; }
.sync-node > span:last-child { display: grid; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.sync-node b { color: var(--text); font-weight: 500; font-size: .8125rem; }
.sync-line { position: relative; height: 1px; background: var(--line-2); }
.sync-line i { position: absolute; inset: 0; background: var(--green); transform-origin: left; transform: scaleX(0); transition: transform .6s ease-out; }
.sync:has(.sync-node:last-child.on) .sync-line i { transform: scaleX(1); }
.sync-line em { position: absolute; left: 50%; top: -.75rem; transform: translateX(-50%); padding: 0 .35rem; background: #0c0d0f; font-style: normal; font-size: .62rem; letter-spacing: .05em; color: var(--muted); }

.stages { display: grid; grid-template-columns: repeat(2, 1fr); padding: 1.1rem .25rem 1.2rem; }
.stages li { position: relative; padding-top: 1.4rem; text-align: center; font-size: .72rem; color: #50565f; transition: color .35s; }
.stages li::before {
  content: ""; position: absolute; z-index: 1; top: .2rem; left: 50%;
  width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: #0c0d0f; border: 1px solid var(--line-2);
  transition: background-color .35s, border-color .35s, box-shadow .35s;
}
/* the line between two stages */
.stages li + li::after { content: ""; position: absolute; top: calc(.2rem + 5px); right: 50%; width: 100%; height: 1px; background: var(--line-2); transition: background-color .35s; }
.stages li.on { color: #c9ccd1; }
.stages li.on::before { background: var(--green); border-color: var(--green); }
.stages li.on::after { background: var(--green); }
.stages li.now::before { box-shadow: 0 0 0 5px rgb(69 212 131 / .18); }
.stages li.done.on { color: var(--green); }
.db-foot { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem; border-top: 1px solid var(--line); color: var(--muted); opacity: .3; transition: opacity .35s, color .35s; }
.db-foot.on { opacity: 1; color: #c9ccd1; }

/* Last card spans the full width: words and tech on the left, drawing and result on the right */
.card-wide {
  grid-column: 1 / -1;
  margin-top: 7rem; /* clears the lowered card above it */
  display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 2.5rem;
  grid-template-areas: "head show" "specs show";
  grid-template-rows: auto 1fr;
}
.card-wide .card-head { grid-area: head; }
.card-wide .card-show { grid-area: show; }
.card-wide .drawing { margin-top: 0; }
.card-wide .specs { grid-area: specs; align-self: end; }

/* Sections 4 to 7 share the same spacing and a thin line on top */
.section { position: relative; padding-block: 7rem; border-top: 1px solid var(--line); }
/* Faint moving backgrounds behind 02 and 03: top-right part only, fading out at the edges */
.bg-fx {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: min(60%, 52rem); height: 30rem; opacity: .45; pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent);
          mask-image: radial-gradient(closest-side, #000 40%, transparent);
}
.bg-fx[data-fx="routes"] { height: 17rem; opacity: .75; } /* a band above the customer boxes, which would cover it */
.bg-fx[data-fx="lines"] { height: 24rem; opacity: .32; }  /* fainter, because the story text sits on top */
.section > .wrap { position: relative; z-index: 1; }

/* 4. With customers: four boxes with thin lines between them */
.points {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 4.5rem;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.point { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 2rem; background: var(--bg); }
.icon { width: 1.5rem; height: 1.5rem; margin-top: .15rem; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.point-text { min-width: 0; }
.point-text h3 { font-weight: 500; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.015em; }
.point-text b { color: var(--text); font-weight: 500; }
/* Short bullets with a small green dash */
.bullets { display: grid; gap: .6rem; margin-top: 1rem; }
.bullets li { position: relative; padding-left: 1.15rem; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.bullets li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1.5px; border-radius: 1px; background: var(--green); }

/* 5. About: photo under the big 03, words on the right */
.photo { display: block; width: 11rem; height: auto; aspect-ratio: 1; margin: 2.5rem 0 0 6px; border-radius: 50%; outline: 1px solid var(--line-2); outline-offset: 6px; }
.about-main { min-width: 0; }
.about-title { font-weight: 400; font-size: clamp(1.5rem, 2.7vw, 2.375rem); line-height: 1.22; letter-spacing: -.025em; }
.story { max-width: 42rem; margin-top: 1.5rem; }
.story p { color: var(--muted); font-size: 1.125rem; }
.story p + p { margin-top: 1.1rem; }
.sub-label { margin-top: 3.5rem; font: 500 .8125rem/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: #c9ccd1; }
.rows { margin-top: 1.25rem; }
.rows.facts { margin-top: 2.5rem; border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.row dt { color: var(--text); font-size: .9375rem; padding-top: .15rem; }
.row dd { color: var(--muted); font-size: .9375rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tags li { font: 400 .8125rem var(--mono); border: 1px solid var(--line-2); border-radius: 6px; padding: .2rem .55rem; color: #c9ccd1; }
.row .tags { margin-top: 0; }

/* 6. Resume: a file card with a tiny page drawing */
.file {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding: 1.25rem; max-width: 40rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.page {
  display: grid; align-content: start; gap: 4px; flex: none;
  width: 3rem; height: 3.9rem; padding: .45rem .4rem;
  border: 1px solid var(--line-2); border-radius: 4px; background: #0c0d0f;
}
.page b, .page i { display: block; height: 2px; border-radius: 1px; background: #2f343b; }
.page b { width: 60%; background: var(--green); margin-top: 2px; }
.page i:nth-child(3n) { width: 75%; }
.file-name { flex: 1; min-width: 12rem; display: grid; gap: .15rem; font: 400 .875rem/1.4 var(--mono); color: var(--text); }
.file-name .muted { font-size: .8125rem; }
.file-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Popup reader for the resume (computers only) */
.pdf-dialog {
  width: min(100vw - 3rem, 56rem); height: min(100dvh - 3rem, 64rem);
  max-width: none; max-height: none; padding: 0;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--panel); color: var(--text); overflow: hidden;
}
.pdf-dialog::backdrop { background: rgb(0 0 0 / .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pdf-box { display: flex; flex-direction: column; height: 100%; }
.pdf-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .6rem .6rem 1.1rem; border-bottom: 1px solid var(--line); }
.pdf-bar p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 .875rem var(--mono); color: #c9ccd1; }
.pdf-actions { display: flex; flex: none; gap: .5rem; }
.btn-small { min-height: 2.25rem; padding: 0 1rem; font-size: .875rem; }
button.btn { font-family: inherit; cursor: pointer; background-color: transparent; }
.pdf-frame { flex: 1; width: 100%; border: 0; background: #2a2d31; }
body:has(.pdf-dialog[open]) { overflow: hidden; }

/* 7. Contact */
.contact-title { font-weight: 400; font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.06; letter-spacing: -.035em; }
.contact-text { margin-top: 1.25rem; max-width: 34rem; color: var(--muted); font-size: 1.125rem; }
.contact-list { display: grid; gap: .9rem; margin-top: 2rem; font: 400 .9375rem var(--mono); }
.contact-list div { display: flex; align-items: center; gap: 1rem; }
.contact-list dt { display: inline-flex; align-items: center; gap: .7rem; width: 7.5rem; flex: none; color: var(--muted); }
/* Each service's icon sits in a small rounded square */
.c-icon {
  width: 2.125rem; height: 2.125rem; padding: .5rem; flex: none;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel);
}
.c-icon .line { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.c-icon .solid { fill: var(--text); }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact-list a:hover { border-color: var(--green); }
.contact .buttons { margin-top: 2.25rem; }

/* 8. Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; gap: .5rem 0; padding-block: 2rem; font: 400 .8125rem var(--mono); color: var(--muted); }
.footer-row li + li::before { content: "·"; margin-inline: .75rem; color: #50565f; }
.footer-row a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.footer-row a:hover { border-color: var(--green); }
.footer-note { margin-top: -1rem; padding-bottom: 2rem; max-width: 46rem; font-size: .75rem; line-height: 1.5; color: var(--muted); }

/* Motion. Everything here only applies when the page has the "motion" class,
   which a tiny script in index.html sets unless the visitor asked for less motion.
   script.js adds "reveal" to what should fade in, then "in" when it scrolls into view. */

/* The top section comes in on load: the light first, then the words, one line at a time */
@keyframes rise { from { opacity: 0; translate: 0 16px; } }
@keyframes fade-in { from { opacity: 0; } }
.motion .hero-fx { animation: fade-in 1.8s ease-out both; }
.motion .hero-body > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero-body > :nth-child(2) { animation-delay: .08s; }
.motion .hero-body > :nth-child(3) { animation-delay: .16s; }
.motion .hero-body > :nth-child(4) { animation-delay: .24s; }
.motion .hero-body > :nth-child(5) { animation-delay: .3s; }
.motion .hero-body > :nth-child(6) { animation-delay: .36s; }

/* Fade up once, when scrolled into view. "translate" is used instead of "transform",
   so the lowered right-hand cards keep their own offset. */
.motion .reveal {
  opacity: 0; translate: 0 18px;
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), translate .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.motion .reveal.in { opacity: 1; translate: none; }
/* Items in a group come in one after another, 70 ms apart (the first six) */
.motion :is(.point, .row, .contact-list > div) { --d: calc(min(var(--n), 6) * 70ms); }

/* Line icons draw themselves, a moment after their box appears */
.motion .icon > *, .motion .c-icon .line {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(.4, 0, .2, 1);
  transition-delay: calc(var(--d, 0s) + .25s);
}
.motion .in .icon > *, .motion .in .c-icon .line { stroke-dashoffset: 0; }

/* Pillars: a green line runs along the top like a route, and each stop lights up
   (and its pillar appears) as the line reaches it */
.pillar-list { position: relative; }
.motion .pillar-list::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; z-index: 1; height: 1px;
  background: linear-gradient(90deg, var(--green), rgb(69 212 131 / .3));
  transform: scaleX(0); transform-origin: left; transition: transform 1.6s linear .2s;
}
.motion .pillar-list.in::before { transform: scaleX(1); }
.motion .pillar { --d: calc(.2s + var(--n) * .4s); }
.pillar::before { z-index: 2; }
.motion .pillar::before { transition: background-color .3s, box-shadow .3s; transition-delay: var(--d); }
.motion .pillar-list.in .pillar::before { background: var(--green); box-shadow: 0 0 0 4px rgb(69 212 131 / .16); }

/* The big outlined section numbers: a band of green light sweeps through them once */
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.motion .big-num {
  background: linear-gradient(100deg, transparent 42%, rgb(69 212 131 / .85) 50%, transparent 58%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
}
.motion .section-mark.in .big-num { animation: sweep 1.8s cubic-bezier(.4, 0, .2, 1) .35s both; }

/* About: the ring around the photo glows green once */
@keyframes ring { 35% { outline-color: var(--green); outline-offset: 9px; } }
.motion .photo.in { animation: ring 1.8s ease-out .3s; }

/* Resume: the lines on the little page get written one by one */
.motion .page > * { transform: scaleX(0); transform-origin: left; transition: transform .45s ease-out; transition-delay: calc(.35s + var(--n) * 80ms); }
.motion .file.in .page > * { transform: none; }

/* Contact: the phone icon rings once */
@keyframes phone-ring { 15%, 45%, 75% { rotate: -12deg; } 30%, 60% { rotate: 12deg; } 90% { rotate: 0deg; } }
.motion .contact-list > div:first-child.in .c-icon { animation: phone-ring .9s ease-in-out 1.1s; }

/* Result numbers keep their width steady while they count */
.result-big { font-variant-numeric: tabular-nums; }

/* Cards: a soft green light follows the mouse along the edge (computers only) */
.card, .file { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .motion :is(.card, .file)::after {
    content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0), rgb(69 212 131 / .6), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
    opacity: 0; transition: opacity .35s;
  }
  .motion :is(.card, .file):hover::after { opacity: 1; }
}

/* Printing the page shows everything, even parts nobody scrolled to yet */
@media print {
  .motion .reveal { opacity: 1; translate: none; }
}

/* Phones: pillars are stacked, so each appears on its own as it scrolls in */
@media (max-width: 40rem) {
  .motion .pillar { --d: 0s; }
}

/* Tablets */
@media (max-width: 60rem) {
  .pillar-list { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(3) { padding-left: 0; border-left: 0; }
  .pillar:nth-child(3)::before { left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .big-num { font-size: 4.5rem; margin-top: .75rem; }
  .cards { grid-template-columns: 1fr; }
  .card-offset { transform: none; }
  .card-wide { display: block; margin-top: 0; }
  .card-wide .drawing { margin-top: 1.5rem; }
  .card-title { max-width: 36rem; }
  .points { grid-template-columns: 1fr; margin-top: 3rem; }
  .photo { width: 9rem; margin-top: 1.75rem; }
  .row { grid-template-columns: 8.5rem 1fr; }
}

/* Phones */
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .site-header { top: .5rem; margin-top: .5rem; width: calc(100% - 1rem); }
  .header-row { height: 3.25rem; padding: 0 .4rem 0 1rem; }
  .menu-btn {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem;
    font: 500 .875rem var(--sans); color: var(--text);
    background: transparent; border: 1px solid var(--line-2); border-radius: 99px;
  }
  /* The phone menu opens as a rounded panel under the header */
  .site-nav {
    display: none; position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
    background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px;
    box-shadow: 0 16px 40px -16px rgb(0 0 0 / .9);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem; }
  .site-nav a { padding: .8rem .9rem; border-radius: 12px; font-size: 1.0625rem; color: var(--text); }
  .hero { --head: 3.9rem; padding-bottom: 3.5rem; }
  .hero-text { font-size: 1.0625rem; }
  .open-to { margin-top: 2.5rem; padding-top: 1.5rem; }
  .role-chips li { font-size: .8125rem; }
  /* Pillars stack, with the icon on the left */
  .pillar-list { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar {
    display: grid; grid-template-columns: auto 1fr; column-gap: 1rem;
    padding: 1.75rem 0; border-left: 0;
  }
  .pillar + .pillar { border-top: 1px solid var(--line); }
  .pillar::before, .pillar:nth-child(3)::before { left: 0; }
  .pillar .icon { grid-row: 1 / span 3; margin: .1rem 0 0; }
  .pillar h3 { font-size: 1.0625rem; }
  .at-work { padding-block: 4.5rem 5rem; }
  .cards { margin-top: 3rem; }
  .card { padding: 1.25rem; }
  .screen { font-size: .75rem; }
  .card-title { font-size: 1.25rem; }
  .specs > div { grid-template-columns: 1fr; gap: .5rem; }
  .specs dt { padding-top: 0; }
  .lanes { padding-inline: .8rem; }
  .convo { padding-inline: .8rem; }
  .convo li { max-width: 92%; }
  .call-tape { margin-inline: -1.25rem; }
  .call-wave { height: 5rem; }
  .call-lines li { grid-template-columns: 2.4rem 1fr; row-gap: .15rem; }
  .call-lines .who, .call-lines .said { grid-column: 2; }
  .pipe { padding-inline: .8rem; }
  .sync { grid-template-columns: 1fr; gap: .75rem; }
  .sync-line { width: 1px; height: 1.25rem; margin-left: 1rem; }
  .sync-line i { transform-origin: top; transform: scaleY(0); }
  .sync:has(.sync-node:last-child.on) .sync-line i { transform: scaleY(1); }
  .sync-line em { left: .75rem; top: 50%; transform: translateY(-50%); }
  .moves { padding-inline: .8rem; }
  .moves li { gap: .45rem; }
  .section { padding-block: 4.5rem; }
  .bg-fx { width: 100%; }
  .point { padding: 1.5rem 1.25rem; gap: .9rem; }
  .point-text h3 { font-size: 1.0625rem; }
  .photo { width: 7.5rem; margin-top: 1.25rem; }
  .story p { font-size: 1.0625rem; }
  .sub-label { margin-top: 2.75rem; }
  .row { grid-template-columns: 1fr; gap: .6rem; }
  .file-buttons { width: 100%; }
  .file-buttons .btn { flex: 1; }
  /* Phones: icon and link side by side; the word label stays for screen readers only */
  .contact-list dt { width: auto; }
  .contact-list .c-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .footer-row { flex-direction: column; gap: .4rem; }
  .footer-row li + li::before { content: none; }
}

/* Visitors who ask for less motion get the finished drawings, no movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
