/* =========================================================
   BEYOND RANKINGS — COMPONENTS
   Uses tokens from theme.css only. Reusable blocks for future
   pages: .section, .eyebrow, .card, .chip, .btn, .page-head
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--a1) 35%, transparent); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.serif { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.grad {
  background: linear-gradient(100deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* ---------- Ambient layers ---------- */
#signal-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px;
  margin: -260px 0 0 -260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a1) 16%, transparent), transparent 65%);
  pointer-events: none; z-index: 0; opacity: 0; transition: opacity .5s;
  will-change: transform;
}
body.has-pointer .cursor-glow { opacity: 1; }
.page { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-dot {
  position: relative; width: 10px; height: 10px; border-radius: 50%;
  background: var(--a2); box-shadow: 0 0 12px var(--a2);
}
.brand-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--a2); animation: ping 2.4s var(--ease) infinite;
}
.brand small { font-family: var(--font-mono); font-weight: 400; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-size: .92rem; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--fg); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); cursor: pointer; transition: transform .2s, border-color .2s;
}
.icon-btn:hover { transform: rotate(-12deg); border-color: var(--a1); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: .95rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a1) 60%, var(--line)); }
.btn-primary {
  border: 0; color: var(--bg);
  background: linear-gradient(100deg, var(--a1), var(--a2));
  box-shadow: 0 8px 30px -10px color-mix(in srgb, var(--a1) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 14px 40px -12px color-mix(in srgb, var(--a2) 80%, transparent); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }

/* ---------- Chips, eyebrows ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--a1); }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent);
  font-size: .82rem; color: var(--muted);
}
.status i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--a2); }
.status i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--a2); animation: ping 1.8s var(--ease) infinite; }
.chip {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: .82rem; color: var(--fg); white-space: nowrap;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); max-width: 60ch; }

/* ---------- Hero ---------- */
.hero { overflow-x: clip; padding-block: clamp(48px, 8vw, 110px) clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 26px; min-width: 0; }
.hero h1 { font-size: var(--step-4); font-weight: 500; letter-spacing: -0.035em; }
.hero h1 .serif { font-size: 1.08em; }
.hero-lead { font-size: var(--step-1); color: var(--muted); max-width: 54ch; line-height: 1.55; }
.hero-lead strong { color: var(--fg); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.proof { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .9rem; }
.proof li { display: inline-flex; align-items: baseline; gap: 6px; }
.proof strong { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.proof li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--a1); margin-right: 16px; align-self: center; }

/* Growth console: the query → revenue path with a travelling dot */
.console {
  position: relative; display: grid; min-width: 0; border-radius: var(--radius-l); overflow: hidden;
  background:
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--a1) 16%, transparent), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, color-mix(in srgb, var(--a2) 12%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 100px -50px color-mix(in srgb, var(--a1) 60%, transparent);
}
.console-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: .74rem; color: var(--muted);
}
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .72rem; color: var(--a2); text-transform: uppercase; letter-spacing: .1em; }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--a2); }
.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--a2); animation: ping 1.6s var(--ease) infinite; }
.console-body { position: relative; padding: 16px 20px 16px 48px; }
.console-body::before {
  content: ""; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 1px;
  background: linear-gradient(var(--a1), var(--a2));
  opacity: .45;
}
.signal-dot {
  position: absolute; left: 22px; top: 0; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%;
  background: var(--fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 35%, transparent), 0 0 22px 4px var(--a1);
  transition: transform .7s var(--ease); z-index: 1;
}
.signal-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.signal-path li {
  position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 10px; transition: background .4s, box-shadow .4s;
}
.signal-path li::before {
  content: ""; position: absolute; left: -24px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--muted); opacity: .6;
}
.signal-path span { font-family: var(--font-mono); font-size: .88rem; color: var(--muted); transition: color .4s; }
.signal-path em { font-style: normal; font-size: .8rem; color: var(--muted); opacity: .75; text-align: right; }
.signal-path li.on { background: color-mix(in srgb, var(--a1) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 30%, transparent); }
.signal-path li.on span { color: var(--fg); }
.signal-path li.on em { color: var(--fg); opacity: .85; }
.signal-path li.done span { color: color-mix(in srgb, var(--a2) 70%, var(--muted)); }
.console-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.console-foot > div { display: grid; gap: 4px; padding: 16px 20px; min-width: 0; }
.console-foot > div + div { border-left: 1px solid var(--line); }
.console-foot strong { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; color: var(--a2); font-variant-numeric: tabular-nums; }
.console-foot span { font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* ---------- Brand marquee ---------- */
.marquee {
  position: relative; overflow: hidden; padding-block: 22px;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 40px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 40px;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em;
  color: var(--muted); white-space: nowrap;
}
.logo-tile {
  display: inline-flex; align-items: center; justify-content: center;
  height: 68px; padding: 12px 22px; border-radius: 14px;
  background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line), 0 10px 30px -18px color-mix(in srgb, var(--a1) 60%, transparent);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.logo { display: block; width: auto; height: 100%; max-width: 200px; object-fit: contain; }
.marquee-item .logo-tile { height: 72px; }
.marquee-item:hover .logo-tile { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--tile-line), 0 0 0 2px color-mix(in srgb, var(--a1) 60%, transparent); }
.brand-card .logo-tile { justify-self: start; height: 60px; padding: 10px 18px; margin-bottom: 4px; }
.brand-card:hover .logo-tile { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--tile-line), 0 0 0 2px color-mix(in srgb, var(--a1) 55%, transparent); }
.marquee-item::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--a1); opacity: .6; }

/* ---------- Brand grid ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.brand-card {
  position: relative; display: grid; gap: 14px; align-content: start;
  padding: clamp(22px, 2.6vw, 32px); background: var(--bg); min-width: 0;
  transition: background .3s;
}
.brand-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--a1) 14%, transparent), transparent 60%);
}
.brand-card:hover::before { opacity: 1; }
.brand-card .sector { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.brand-card h3 { font-size: var(--step-1); }
.brand-card p { color: var(--muted); font-size: .93rem; }
.brand-card .metric { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.brand-card .metric strong { font-size: 1.25rem; font-weight: 600; color: var(--a2); font-variant-numeric: tabular-nums; }
.brand-card .metric span { color: var(--muted); font-size: .82rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; gap: 6px; padding-block: 18px; border-top: 1px solid var(--line); }
.stat strong { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pillar { display: grid; gap: 10px; padding: 24px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: transform .3s var(--ease), border-color .3s; }
.pillar:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a1) 50%, var(--line)); }
.pillar .k { font-family: var(--font-mono); font-size: .75rem; color: var(--a1); }
.pillar h3 { font-size: var(--step-1); }
.pillar p { color: var(--muted); font-size: .92rem; }

/* ---------- Coming soon slots (future sections) ---------- */
.soon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.soon {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px 22px; border-radius: var(--radius-m); border: 1px dashed var(--line); color: var(--muted);
}
.soon strong { color: var(--fg); font-weight: 500; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; display: grid; gap: 20px; justify-items: start;
  padding: clamp(32px, 5vw, 64px); border-radius: var(--radius-l);
  background:
    radial-gradient(600px circle at 100% 0%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 60%),
    radial-gradient(500px circle at 0% 100%, color-mix(in srgb, var(--a2) 16%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta-band h2 { font-size: var(--step-3); max-width: 18ch; }

/* ---------- Page head (inner pages) ---------- */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(24px, 3vw, 40px); display: grid; gap: 18px; }
.page-head h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
.page-head p { color: var(--muted); font-size: var(--step-1); max-width: 58ch; }
.page-head .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Resume ---------- */
.resume-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: 96px; }
.resume-main { display: grid; gap: 56px; min-width: 0; }
.resume-side { display: grid; gap: 20px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
.r-block h2 { font-size: var(--step-2); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.r-block h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.win { padding: 20px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.win strong { font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; color: var(--a2); font-variant-numeric: tabular-nums; }
.win p { color: var(--muted); font-size: .9rem; }

.timeline { position: relative; display: grid; gap: 14px; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--a1), var(--a2) 40%, var(--line));
}
.timeline::after {
  content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--a2); box-shadow: 0 0 12px var(--a2);
  animation: travel 7s var(--ease) infinite;
}
.job { position: relative; padding: 22px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; transition: border-color .3s; }
.job:hover { border-color: color-mix(in srgb, var(--a1) 45%, var(--line)); }
.job::before {
  content: ""; position: absolute; left: -27px; top: 28px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--a1);
}
.job.current::before { background: var(--a2); border-color: var(--a2); box-shadow: 0 0 10px var(--a2); }
.job-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.job h3 { font-size: var(--step-1); }
.job h3 span { color: var(--muted); font-weight: 400; }
.job time { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.job ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: .94rem; }
.job ul li::marker { color: var(--a1); }
.job .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.job .chips .chip { font-size: .76rem; padding: 3px 10px; background: var(--surface-2); }

.side-card { padding: 22px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; }
.side-card h3 { font-family: var(--font-mono); font-size: .74rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.side-card .chips .chip { background: var(--surface-2); font-size: .8rem; }
.side-card dl { margin: 0; display: grid; gap: 10px; }
.side-card dt { font-weight: 500; }
.side-card dd { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 40px; }
.contact-card {
  position: relative; overflow: hidden; display: grid; gap: 14px; align-content: start;
  padding: 26px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); min-width: 0;
  transition: transform .3s var(--ease), border-color .3s;
}
.contact-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a1) 50%, var(--line)); }
.contact-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--a1) 16%, transparent); color: var(--a1); }
.contact-card .ic svg { width: 22px; height: 22px; }
.contact-card .label { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-card .value { font-size: 1.12rem; font-weight: 500; overflow-wrap: anywhere; user-select: all; }
.contact-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; margin-top: 40px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; color: var(--muted); font-size: .88rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a:hover { color: var(--fg); }
.foot-linkedin { display: inline-flex; align-items: center; gap: 6px; }
.foot-credit { margin-top: 18px; color: var(--muted); font-size: .82rem; text-align: center; }
.foot-credit .heart { display: inline-block; vertical-align: -2px; color: #e5484d; }
.foot-credit a { color: var(--fg); }
.foot-credit a:hover { text-decoration: underline; }

/* ---------- Palette picker (preview only, see main.js) ---------- */
.palette-picker {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: .78rem; color: var(--muted); box-shadow: 0 10px 40px -10px rgba(0,0,0,.4);
}
.palette-picker button {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.palette-picker button[aria-pressed="true"] { border-color: var(--fg); }

/* ---------- Animations ---------- */
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes travel { 0% { top: 8px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: calc(100% - 14px); opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }

.rise { animation: rise .8s var(--ease) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; } .rise.d4 { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume-grid { grid-template-columns: 1fr; }
  .resume-side { position: static; }
  .contact-grid, .soon-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links a { padding: 8px 10px; font-size: .88rem; }
  .brand small, .nav-cta { display: none; }
  .brand-grid, .wins { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .stats, .pillars { grid-template-columns: 1fr; }
  .nav { gap: 6px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 7px; font-size: .82rem; }
  .brand { font-size: .95rem; gap: 8px; }
  .icon-btn { width: 34px; height: 34px; }
  .signal-path em { display: none; }
  .console-foot { grid-template-columns: 1fr; }
  .console-foot > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .logo-tile, .marquee-item .logo-tile { height: 56px; padding: 10px 16px; }
}
.nowrap { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1240px) { .hero h1 { font-size: clamp(2.6rem, 1rem + 3.6vw, 4.4rem); } }

/* ---------- Automations ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--a1); }
.crumbs a:hover { text-decoration: underline; }
.auto-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.auto-grid .section-head { margin-bottom: 0; }
.timebars { display: grid; gap: 22px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.timebar { display: grid; gap: 10px; }
.timebar-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.timebar-label strong { font-weight: 500; }
.timebar-label .mono { font-size: .8rem; color: var(--muted); }
.timebar-track { height: 18px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.timebar-fill { display: block; height: 100%; width: var(--w); min-width: 6px; border-radius: 999px; }
.timebar-fill.manual { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.timebar-fill.auto { background: linear-gradient(90deg, var(--a1), var(--a2)); box-shadow: 0 0 14px var(--a2); }
.timebar-note { font-size: .85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.effort { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .92rem; }
.effort th, .effort td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.effort thead th { font-family: var(--font-mono); font-size: .72rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.effort tbody th { font-weight: 500; white-space: nowrap; }
.effort td { color: var(--muted); }
.effort .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--fg); }
.effort td.auto { vertical-align: middle; text-align: center; color: var(--a2); font-weight: 600; font-size: 1.15rem; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--a2) 7%, transparent); }
.effort td.auto span { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.effort tfoot th, .effort tfoot td { border-bottom: 0; font-weight: 600; color: var(--fg); background: var(--surface-2); }
.effort tfoot td.auto { font-size: .95rem; }
.deck-list { list-style: none; counter-reset: slide; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.deck-list li { counter-increment: slide; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); font-size: .92rem; min-width: 0; }
.deck-list li::before { content: counter(slide, decimal-leading-zero); font-family: var(--font-mono); font-size: .75rem; color: var(--a1); }
.auto-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auto-card { position: relative; display: grid; gap: 14px; align-content: start; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
a.auto-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a1) 55%, var(--line)); box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--a1) 70%, transparent); }
.auto-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auto-card .sector { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.auto-card h2 { font-size: var(--step-2); }
.auto-card p { color: var(--muted); }
.auto-metric { display: flex; align-items: center; gap: 18px; padding-block: 6px; }
.auto-metric > div { display: grid; gap: 2px; }
.auto-metric .mono { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.auto-metric strong { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.auto-metric svg { width: 20px; height: 20px; color: var(--muted); }
.grad-text { background: linear-gradient(100deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auto-link { color: var(--a1); font-weight: 500; font-size: .92rem; }
.soon-card { border-style: dashed; background: transparent; }
a.soon-live { border-style: solid; border-color: color-mix(in srgb, var(--a1) 45%, var(--line)); background: color-mix(in srgb, var(--a1) 6%, transparent); color: var(--fg); transition: transform .3s var(--ease), border-color .3s; }
a.soon-live:hover { transform: translateY(-2px); border-color: var(--a1); }
a.soon-live > span:first-child { display: grid; gap: 2px; }
a.soon-live small { color: var(--muted); font-size: .8rem; }
a.soon-live .mono { color: var(--a1); }
/* Workflow canvas (n8n-style, drawn by the page script) */
.wf-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wf-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.wf-seg button { font: inherit; font-size: .85rem; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; cursor: pointer; }
.wf-seg button[aria-checked="true"] { background: color-mix(in srgb, var(--a1) 14%, transparent); color: var(--fg); }
.wf-canvas { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); overflow-x: auto; }
.wf-canvas svg { display: block; width: 100%; min-width: 880px; height: auto; }
.wf-hint { display: none; font-size: .8rem; margin-top: 8px; }
.wf-dots { fill: var(--line); }
.wf-edge { fill: none; stroke: var(--line); stroke-width: 2.5; }
.wf-edge.on { stroke: var(--a1); stroke-dasharray: 7 7; animation: wfflow .6s linear infinite; }
.wf-edge.done { stroke: var(--a1); }
@keyframes wfflow { to { stroke-dashoffset: -14; } }
.wf-pkt { fill: var(--a2); }
.wf-node { cursor: pointer; }
.wf-node .card { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.wf-node.sel .card { stroke: var(--a1); stroke-width: 2.5; }
.wf-node.run .card { stroke: var(--a2); stroke-width: 2.5; }
.wf-node.ok .card { stroke: color-mix(in srgb, var(--a2) 70%, var(--line)); stroke-width: 2; }
.wf-node:focus-visible { outline: none; }
.wf-node:focus-visible .card { stroke: var(--a2); stroke-width: 3; }
.wf-node text { font-family: var(--font-sans); fill: var(--fg); }
.wf-node .t { font-size: 13px; font-weight: 600; }
.wf-node .s { font-size: 10.5px; fill: var(--muted); }
.wf-node .k { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.wf-node .ib { fill: color-mix(in srgb, var(--a1) 16%, transparent); }
.wf-node .ico { font-size: 14px; font-weight: 700; fill: var(--a1); }
.wf-node .badge rect { fill: color-mix(in srgb, var(--a1) 12%, transparent); }
.wf-node .badge text { font-family: var(--font-mono); font-size: 9.5px; fill: var(--a1); }
.wf-node .chk { opacity: 0; transition: opacity .3s; }
.wf-node.ok .chk { opacity: 1; }
.wf-node .chk circle { fill: var(--a2); }
.wf-node .chk path { stroke: var(--bg); stroke-width: 2; fill: none; }
.wf-out { margin-top: 14px; display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.wf-out-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wf-out-head .chip { font-family: var(--font-mono); font-size: .72rem; }
.wf-out-head b { font-weight: 600; }
.wf-out-status { font-size: .8rem; color: var(--a2); }
.wf-out p { color: var(--muted); max-width: 75ch; }
.wf-io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; font-size: .88rem; }
.wf-io div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.wf-io b { display: block; font-family: var(--font-mono); font-size: .68rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.wf-reqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }

/* Screenshot slider: recreated Google Sheets views.
   Colours inside .shot are the screenshot's own (like logo tiles), so they stay light in both modes. */
.shots { display: grid; gap: 14px; }
.shots-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.shots-track::-webkit-scrollbar { display: none; }
.shot-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; display: grid; gap: 12px; }
.shot-slide figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: var(--muted); font-size: .92rem; }
.shot-slide figcaption strong { color: var(--fg); font-weight: 500; }
.shots-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.shots-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.shots-dots button { font: inherit; font-size: .78rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.shots-dots button[aria-current="true"] { color: var(--fg); border-color: var(--a1); background: color-mix(in srgb, var(--a1) 12%, transparent); }
.shots-arrows { display: flex; gap: 8px; }
.shots-arrows .icon-btn:hover { transform: none; }
.shots-note { font-size: .82rem; }

.shot {
  --s-bg: #ffffff; --s-fg: #202124; --s-muted: #5f6368; --s-line: #e2e3e6; --s-grid: #ebedf0;
  --s-chrome: #f9fbfd; --s-pill: #edf2fa; --s-head: #1f2a44; --s-pc: #0b6e99; --s-accent: #1a73e8; --s-green: #188038;
  --s-good-bg: #d9ead3; --s-good: #137333; --s-bad-bg: #f4cccc; --s-bad: #c5221f;
  border-radius: 12px; overflow: hidden; background: var(--s-bg); color: var(--s-fg);
  border: 1px solid var(--line); box-shadow: 0 30px 70px -40px color-mix(in srgb, var(--a1) 55%, transparent);
  font-family: Arial, "Segoe UI", sans-serif; font-size: 12px; line-height: 1.4;
}
.shot-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; background: var(--s-chrome); }
.shot-doc { flex: none; width: 22px; height: 28px; border-radius: 3px; background: #0f9d58; position: relative; }
.shot-doc::after { content: ""; position: absolute; inset: 9px 5px 6px; border: 1.5px solid #fff; border-radius: 1px; background: linear-gradient(#fff, #fff) center/100% 1.5px no-repeat, linear-gradient(#fff, #fff) center/1.5px 100% no-repeat; }
.shot-name { font-size: 15px; color: var(--s-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shot-share { margin-left: auto; flex: none; padding: 7px 16px; border-radius: 999px; background: #c2e7ff; color: #001d35; font-weight: 600; font-size: 12px; }
.shot-menu { display: flex; gap: 14px; padding: 2px 14px 8px 46px; background: var(--s-chrome); color: var(--s-fg); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.shot-menu .hl { padding: 0 6px; margin: 0 -6px; border-radius: 4px; background: #d3e3fd; font-weight: 600; }
.shot-fx { display: flex; align-items: center; gap: 10px; padding: 5px 14px; border-block: 1px solid var(--s-line); background: var(--s-bg); color: var(--s-muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.shot-fx .cell { width: 64px; padding-right: 10px; border-right: 1px solid var(--s-line); color: var(--s-fg); }
.shot-fx i { font-style: italic; font-family: Georgia, serif; }
.shot-body { position: relative; height: clamp(320px, 46vw, 470px); overflow: auto; background: var(--s-bg);
  background-image: linear-gradient(var(--s-grid) 1px, transparent 1px), linear-gradient(90deg, var(--s-grid) 1px, transparent 1px);
  background-size: 100px 22px; background-position: 46px 21px; }
.shot-cols { position: sticky; top: 0; z-index: 2; display: flex; height: 21px; padding-left: 46px; background: #f8f9fa; border-bottom: 1px solid #c7c7c7; color: var(--s-muted); font-size: 11px; width: max-content; min-width: 100%; }
.shot-cols span { width: 100px; text-align: center; border-right: 1px solid var(--s-line); line-height: 20px; }
.shot-content { padding: 14px 18px 18px 60px; width: max-content; min-width: 100%; }
.shot-tabs { display: flex; align-items: stretch; gap: 2px; padding: 0 10px; background: var(--s-chrome); border-top: 1px solid var(--s-line); font-size: 12px; color: var(--s-muted); white-space: nowrap; overflow: hidden; }
.shot-tabs span { padding: 8px 14px; }
.shot-tabs .on { background: #e1e9f7; color: #0b57d0; font-weight: 600; border-bottom: 3px solid #0b57d0; }
.shot-tabs .hid { font-style: italic; opacity: .7; }

table.rpt { border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; background: var(--s-bg); }
table.rpt td, table.rpt th { border: 1px solid #000; padding: 4px 10px; text-align: center; white-space: nowrap; }
table.rpt .ban th { background: var(--s-head); color: #fff; font-size: 12px; font-weight: 700; }
table.rpt .hd th { background: var(--s-head); color: #fff; font-weight: 700; }
table.rpt .hd th.pc { background: var(--s-pc); }
table.rpt .ly { border-left: 3px solid #000; }
table.rpt td.lab { min-width: 180px; text-align: left; }
table.rpt td.b { font-weight: 700; }
table.rpt td.good { background: var(--s-good-bg); color: var(--s-good); font-weight: 700; }
table.rpt td.bad { background: var(--s-bad-bg); color: var(--s-bad); font-weight: 700; }
.rpt-note { font-size: 10.5px; font-style: italic; color: var(--s-muted); margin: 4px 0 18px; }
.rpt-row { display: flex; gap: 26px; align-items: flex-start; }
.rpt-ins { width: 760px; display: grid; gap: 12px; font-size: 12.5px; }
.rpt-ins h4 { margin: 0; color: var(--s-head); font-size: 13px; }
.rpt-ins ul, .rpt-ins ol { margin: 3px 0 0; padding-left: 20px; display: grid; gap: 3px; }
.rpt-log td { text-align: left; }
.rpt-log a { color: var(--s-accent); text-decoration: underline; }

.shot-content.is-sb { padding: 0; width: 100%; height: calc(100% - 21px); }
.shot-sb-wrap { display: flex; justify-content: flex-end; min-height: 100%; }
.shot-sb-grid { flex: 1; }
.shot-sb { flex: 0 0 300px; background: #fff; border-left: 1px solid var(--s-line); box-shadow: -6px 0 18px rgba(0,0,0,.06); display: grid; align-content: start; }
.shot-sb-top { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--s-line); font-size: 14px; }
.shot-sb-body { padding: 10px 16px 18px; display: grid; gap: 4px; }
.sb-lab { margin-top: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--s-head); }
.sb-field { display: flex; justify-content: space-between; padding: 7px 9px; border: 1px solid #d7d9de; border-radius: 6px; background: #fff; }
.sb-ok { font-size: 11px; color: var(--s-green); }
.sb-ck { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.sb-box { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--s-head); display: grid; place-items: center; font-size: 10px; color: #fff; }
.sb-box.on { background: var(--s-head); }
.sb-btn { margin-top: 14px; padding: 10px; border-radius: 8px; background: var(--s-head); color: #fff; text-align: center; font-weight: 700; }
.sb-done { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #e6f4ea; color: var(--s-green); font-size: 11.5px; }
.sb-done u { color: var(--s-accent); }

@media (max-width: 960px) {
  .auto-grid, .auto-list { grid-template-columns: 1fr; }
  .deck-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .nav-links li:first-child { display: none; }
}
@media (max-width: 400px) {
  .deck-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .effort { min-width: 0; }
  .effort thead th:nth-child(2), .effort tbody td:nth-child(2) { display: none; }
  .effort th, .effort td { padding: 11px 10px; }
  .effort { font-size: .86rem; }
  .effort tbody th { white-space: normal; }
  .effort td.auto { white-space: normal; font-size: 1rem; width: 32%; }
  .wf-hint { display: block; }
  .wf-io, .wf-reqs { grid-template-columns: 1fr; }
  .shot-sb-grid { display: none; }
  .shot-sb { flex-basis: 100%; border-left: 0; box-shadow: none; }
  .shot-menu { padding-left: 14px; }
  .shots-nav { flex-direction: column-reverse; align-items: stretch; }
  .shots-arrows { justify-content: flex-end; }
}
