/* Studio 13 Developers — site styles
   Layout: a drafting sheet in the brand's charcoal and red. Light paper pages,
   dark CAD-style panels for page headers, a drawing-register index of services
   and a title-block footer. */

:root {
  /* Colour (brand: charcoal #1B1F24 and red #D81920 from the logo) */
  --paper: #F4F4F3;
  --paper-2: #EAEAE8;
  --surface: #FFFFFF;
  --ink: #1B1F24;
  --muted: #565B63;
  --rule: rgba(27, 31, 36, 0.14);
  --rule-strong: rgba(27, 31, 36, 0.36);
  --accent: #D81920;
  --accent-hover: #B5121A;
  --accent-ink: #C0141B;
  --accent-tint: rgba(216, 25, 32, 0.08);
  --plan-hot: rgba(216, 25, 32, 0.14);
  --on-accent: #FFFFFF;
  --bp: #1B1F24;
  --bp-fg: #EDEEF0;
  --bp-muted: #A4A9B1;
  --bp-accent: #FF4B52;
  --bp-line: rgba(255, 255, 255, 0.075);
  --bp-line-faint: rgba(255, 255, 255, 0.035);
  --bp-line-strong: rgba(255, 255, 255, 0.26);
  --focus: #2563EB;
  --error: #B42318;
  --ok: #1F9D55;
  --shadow: 0 1px 0 rgba(27, 31, 36, 0.05), 0 18px 40px -24px rgba(27, 31, 36, 0.5);

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --fs-label: 0.75rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-h3: clamp(1.4rem, 1.25rem + 0.6vw, 1.7rem);
  --fs-h2: clamp(2.1rem, 1.55rem + 2.3vw, 3.2rem);
  --fs-h1: clamp(2.7rem, 1.7rem + 4.4vw, 5.1rem);

  /* Space */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 8vw, 112px);
  --radius: 2px;
  --header-h: 76px;
  --sheetbar-h: 58px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111316;
    --paper-2: #171A1E;
    --surface: #1D2126;
    --ink: #EDEEF0;
    --muted: #A4A9B1;
    --rule: rgba(237, 238, 240, 0.12);
    --rule-strong: rgba(237, 238, 240, 0.3);
    --accent: #D81920;
    --accent-hover: #EF2A31;
    --accent-ink: #FF5A60;
    --accent-tint: rgba(255, 75, 82, 0.12);
    --plan-hot: rgba(255, 75, 82, 0.2);
    --on-accent: #FFFFFF;
    --bp: #1D2127;
    --bp-fg: #EDEEF0;
    --bp-muted: #A4A9B1;
    --bp-accent: #FF4B52;
    --bp-line: rgba(255, 255, 255, 0.07);
    --bp-line-faint: rgba(255, 255, 255, 0.03);
    --bp-line-strong: rgba(255, 255, 255, 0.26);
    --focus: #7AA7FF;
    --error: #FF8A80;
    --ok: #4ADE80;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #111316;
  --paper-2: #171A1E;
  --surface: #1D2126;
  --ink: #EDEEF0;
  --muted: #A4A9B1;
  --rule: rgba(237, 238, 240, 0.12);
  --rule-strong: rgba(237, 238, 240, 0.3);
  --accent: #D81920;
  --accent-hover: #EF2A31;
  --accent-ink: #FF5A60;
  --accent-tint: rgba(255, 75, 82, 0.12);
  --plan-hot: rgba(255, 75, 82, 0.2);
  --on-accent: #FFFFFF;
  --bp: #1D2127;
  --bp-fg: #EDEEF0;
  --bp-muted: #A4A9B1;
  --bp-accent: #FF4B52;
  --bp-line: rgba(255, 255, 255, 0.07);
  --bp-line-faint: rgba(255, 255, 255, 0.03);
  --bp-line-strong: rgba(255, 255, 255, 0.26);
  --focus: #7AA7FF;
  --error: #FF8A80;
  --ok: #4ADE80;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

ul, ol { margin: 0; }

button { font: inherit; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Type helpers ---------- */

.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex: none;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 36em;
}

.section { padding-block: var(--section); }
.section-alt { background: var(--paper-2); }

.section-head {
  display: grid;
  gap: 18px;
  max-width: 46rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 {
  font-size: var(--fs-h2);
  text-transform: uppercase;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.8em 1.3em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { font-size: 1rem; padding: 0.65em 1em; }

.on-bp .btn-outline { color: var(--bp-fg); border-color: var(--bp-line-strong); }
.on-bp .btn-outline:hover { border-color: var(--bp-fg); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.link-arrow::after {
  content: "\2192";
  transition: transform 0.2s;
}
.link-arrow:hover::after { transform: translateX(4px); }

.ext::after { content: " \2197"; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.45); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}
.brand img { display: block; height: 54px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; padding: 0; }
.site-nav ul a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--ink); }
.site-nav .nav-aside { display: flex; align-items: center; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--rule-strong); }
.site-nav .nav-aside a::after { content: " \2197"; font-size: 0.8em; }
.site-nav ul a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle path { stroke: currentColor; stroke-width: 2; fill: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .launcher { margin-left: auto; }
  .brand img { height: 46px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-strong);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    padding: 14px 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--rule);
  }
  .site-nav ul a[aria-current="page"]::after { left: 0; right: auto; width: 28px; bottom: -1px; }
  .site-nav .nav-aside { display: block; margin: 14px 0 0; padding: 0; border-left: 0; border-top: 1px solid var(--rule-strong); }
}

/* ---------- Dark drafting surfaces ---------- */

.bp-surface {
  background-color: var(--bp);
  background-image:
    linear-gradient(var(--bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-line) 1px, transparent 1px),
    linear-gradient(var(--bp-line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-line-faint) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  color: var(--bp-fg);
}
.bp-surface .eyebrow { color: var(--bp-accent); }
.bp-surface .lead { color: var(--bp-muted); }
.bp-surface .label { color: var(--bp-muted); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 6vw, 84px) var(--section); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero-copy { display: grid; gap: 24px; justify-items: start; }

.hero h1 {
  font-size: var(--fs-h1);
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.hero h1 .hl {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 0.14em;
  background-position: 0 92%;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.hero-contact a { color: var(--ink); text-decoration-color: var(--rule-strong); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Layer explorer (hero drawing) ---------- */

.drawing-panel {
  margin: 0;
  border: 1px solid var(--bp-line-strong);
  box-shadow: var(--shadow);
  min-width: 0;
}

.layer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bp-line-strong);
}
.layer-bar .label { margin-right: 6px; }
.layer-btn {
  padding: 6px 10px;
  border: 1px solid var(--bp-line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--bp-fg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.layer-btn:hover { border-color: var(--bp-fg); }
.layer-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.layer-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-muted);
}

.drawing-panel svg { display: block; width: 100%; height: auto; }

.drawing .ln { fill: none; stroke: var(--bp-fg); stroke-width: 1.6; }
.drawing .ln-thin { fill: none; stroke: var(--bp-muted); stroke-width: 1; }
.drawing .ln-grid { fill: none; stroke: var(--bp-muted); stroke-width: 1; stroke-dasharray: 14 4 2 4; opacity: 0.7; }
.drawing .fill-bp { fill: var(--bp); }
.drawing .hatch-line { stroke: var(--bp-muted); stroke-width: 1; }
.drawing text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--bp-fg);
  letter-spacing: 0.04em;
}
.drawing .t-bubble { font-size: 12px; font-weight: 500; text-anchor: middle; dominant-baseline: central; }

.drawing .layer {
  --lc: var(--bp-muted);
  --lw: 1.2;
  transition: opacity 0.4s ease;
}
.drawing .layer[data-layer="arc"] { --lc: var(--bp-fg); --lw: 1.6; }
.drawing .layer.is-on { --lc: var(--bp-accent); --lw: 2; }
.drawing.has-active .layer:not(.is-on) { opacity: 0.14; }
.drawing.has-active .layer[data-layer="arc"]:not(.is-on) { opacity: 0.32; }
.drawing .layer.is-on.pulse { animation: layer-in 0.6s ease; }

.drawing .ly { fill: none; stroke: var(--lc); stroke-width: var(--lw); stroke-linejoin: round; transition: stroke 0.4s, stroke-width 0.4s; }
.drawing .ly-thin { fill: none; stroke: var(--lc); stroke-width: 1; transition: stroke 0.4s; }
.drawing .ly-dash { fill: none; stroke: var(--lc); stroke-width: 1.2; stroke-dasharray: 5 3; transition: stroke 0.4s; }
.drawing .ly-fill { fill: var(--lc); transition: fill 0.4s; }
.drawing .ly-text { fill: var(--lc); transition: fill 0.4s; }
.drawing .tag { fill: var(--bp); stroke: var(--lc); stroke-width: 1.2; transition: stroke 0.4s; }
.drawing .tag-text { fill: var(--lc); font-size: 10px; font-weight: 500; text-anchor: middle; dominant-baseline: central; transition: fill 0.4s; }

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 1.5s cubic-bezier(0.55, 0.1, 0.25, 1) backwards;
  animation-delay: var(--d, 0s);
}
.fade-in {
  animation: fade-in 0.7s ease backwards;
  animation-delay: var(--d, 0s);
}
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes layer-in { from { opacity: 0.2; } }

.tb-mini {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 1px;
  background: var(--bp-line-strong);
  border-top: 1px solid var(--bp-line-strong);
}
.tb-mini > div {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bp);
}
.tb-mini span {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bp-muted);
}
.tb-mini strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bp-fg);
  overflow-wrap: anywhere;
}
.tb-mini .tb-wide { grid-column: 1 / -1; }
.tb-layer { gap: 6px !important; padding-block: 14px !important; }
.tb-layer strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tb-layer p { color: var(--bp-muted); font-size: var(--fs-sm); line-height: 1.5; min-height: 3em; }
.tb-layer a {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--bp-accent);
  text-decoration: none;
}
.tb-layer a:hover { text-decoration: underline; }

@media (max-width: 1180px) {
  .layer-hint { display: none; }
}
@media (max-width: 520px) {
  .tb-mini { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tb-mini .tb-drg { grid-column: 1 / -1; }
  .tb-layer p { min-height: 4.5em; }
}

/* ---------- Discipline register ---------- */

.register {
  list-style: none;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.register-head,
.reg-row {
  display: grid;
  grid-template-columns: 112px 48px minmax(0, 1fr) minmax(0, 1.5fr) 32px;
  align-items: center;
  gap: 24px;
  padding-inline: 12px;
}

.register-head {
  padding-block: 12px;
  border-top: 2px solid var(--ink);
}
.register-head + .register { border-top: 1px solid var(--rule-strong); }

.reg-row {
  padding-block: 26px;
  border-bottom: 1px solid var(--rule-strong);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.2s;
}
.reg-row:hover { background: var(--paper); }

.reg-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
}
.reg-icon { width: 40px; height: 40px; color: var(--ink); transition: color 0.2s, transform 0.3s; }
.reg-row:hover .reg-icon { color: var(--accent-ink); transform: rotate(-6deg) scale(1.06); }
.reg-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}
.reg-desc { color: var(--muted); }
.reg-arrow {
  font-size: 1.4rem;
  justify-self: end;
  transition: transform 0.2s, color 0.2s;
}
.reg-row:hover .reg-arrow { transform: translateX(4px); color: var(--accent-ink); }

@media (max-width: 760px) {
  .register-head { display: none; }
  .register-head + .register { border-top: 2px solid var(--ink); }
  .reg-row {
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    grid-template-areas:
      "icon code arrow"
      "icon title arrow"
      "icon desc arrow";
    gap: 4px 16px;
    align-items: start;
    padding-inline: 0;
  }
  .reg-icon { grid-area: icon; width: 36px; height: 36px; }
  .reg-code { grid-area: code; }
  .reg-title { grid-area: title; }
  .reg-desc { grid-area: desc; margin-top: 4px; }
  .reg-arrow { grid-area: arrow; align-self: center; }
}

.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Principles / values ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  list-style: none;
  padding: 0;
}
.principles li {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}
.principles h3 { font-size: var(--fs-h3); text-transform: uppercase; }
.principles p { color: var(--muted); }

@media (max-width: 1024px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ---------- Dark band (sectors & coverage) ---------- */

.band { padding-block: var(--section); }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
}
.band-grid > div { display: grid; align-content: start; gap: 20px; min-width: 0; }
.band h2 { font-size: var(--fs-h2); text-transform: uppercase; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--bp-line-strong);
  font-size: var(--fs-sm);
  transition: border-color 0.2s, background-color 0.2s;
}
.chips li:hover { border-color: var(--bp-accent); background: rgba(255, 75, 82, 0.08); }

.coverage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
  padding: 0;
  margin-top: 8px;
  background: var(--bp-line-strong);
  border: 1px solid var(--bp-line-strong);
}
.coverage li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bp);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.coverage .base { color: var(--bp-accent); }
.coverage .base span { color: var(--bp-muted); }
.coverage .wide { grid-column: 1 / -1; text-transform: none; letter-spacing: 0.02em; color: var(--bp-muted); }

.coords {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--bp-muted);
}

@media (max-width: 860px) { .band-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA ---------- */

.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 2px solid var(--ink);
}
.cta-box h2 { font-size: var(--fs-h2); text-transform: uppercase; }
.cta-copy { display: grid; gap: 18px; }

.cta-lines { display: grid; gap: 0; list-style: none; padding: 0; border-top: 1px solid var(--rule-strong); }
.cta-lines li { border-bottom: 1px solid var(--rule-strong); }
.cta-lines a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s;
}
.cta-lines a:hover { color: var(--accent-ink); }
.cta-lines .label { align-self: center; }
.cta-lines strong {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.cta-lines a::after { content: "\2192"; transition: transform 0.2s; }
.cta-lines a:hover::after { transform: translateX(4px); }

@media (max-width: 860px) { .cta-box { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .cta-lines a { grid-template-columns: minmax(0, 1fr) auto; } .cta-lines .label { grid-column: 1 / -1; } }

/* ---------- Inner page header ---------- */

.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(44px, 6vw, 80px); }
.page-head-inner { display: grid; gap: 22px; justify-items: start; }
.page-head h1,
.notfound h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.4rem);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 16ch;
}
.page-ref {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bp-line-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bp-muted);
}
.page-ref a { color: var(--bp-fg); text-decoration: none; }
.page-ref a:hover { text-decoration: underline; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- Sticky sheet bar (services) ---------- */

.sheet-bar {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
}
.sheet-bar ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sheet-bar ul::-webkit-scrollbar { display: none; }
.sheet-bar a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: var(--sheetbar-h);
  align-items: center;
  padding: 0 14px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}
.sheet-bar a span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--accent-ink); }
.sheet-bar a:hover { color: var(--ink); }
.sheet-bar a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.sheet-bar a[aria-current="true"] { color: var(--ink); }
.sheet-bar a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- About ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
.prose { display: grid; gap: 1.1em; max-width: 62ch; }
.prose h2 { font-size: var(--fs-h2); text-transform: uppercase; margin-bottom: 0.2em; }
.prose p { color: var(--muted); }
.prose p:first-of-type { color: var(--ink); font-size: var(--fs-lead); line-height: 1.55; }

.facts {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
}
.facts dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { text-decoration-color: var(--rule-strong); }

.statements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
}
.statement { display: grid; gap: 16px; align-content: start; }
.statement p {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

.founder {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.bubble {
  position: relative;
  width: 168px;
  aspect-ratio: 1;
  max-width: 100%;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bubble::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--accent);
  border-radius: 50%;
}
.founder-copy { display: grid; gap: 14px; max-width: 62ch; justify-items: start; }
.founder-copy h2 { font-size: var(--fs-h2); text-transform: uppercase; }
.founder-copy p { color: var(--muted); }
.founder-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

@media (max-width: 860px) {
  .split, .statements { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .founder { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .bubble { width: 128px; font-size: 3rem; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- Services ---------- */

.discipline {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--header-h) + var(--sheetbar-h));
}
.discipline:nth-of-type(odd) { background: var(--paper-2); }

.discipline-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.discipline-head {
  position: sticky;
  top: calc(var(--header-h) + var(--sheetbar-h) + 32px);
  display: grid;
  gap: 18px;
  justify-items: start;
}
.discipline-head .head-top {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}
.d-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  background: var(--bp);
  color: var(--bp-accent);
}
.d-icon svg { width: 32px; height: 32px; }
.sheet-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  display: grid;
  gap: 2px;
}
.sheet-code small { font-size: 0.72rem; color: var(--muted); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.discipline-head h2 { font-size: var(--fs-h2); text-transform: uppercase; }

.discipline-body { display: grid; gap: 40px; min-width: 0; }
.discipline-body section { display: grid; gap: 14px; }

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}
.checklist li {
  position: relative;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--rule);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent-ink);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.tags li {
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  font-size: var(--fs-sm);
}

@media (max-width: 900px) {
  .discipline-grid { grid-template-columns: minmax(0, 1fr); }
  .discipline-head { position: static; }
}
@media (max-width: 600px) { .checklist { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 1px;
  list-style: none;
  padding: 0;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.contact-list li { display: grid; gap: 6px; padding: 20px 22px; background: var(--surface); min-width: 0; }
.contact-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.contact-value a { text-decoration: none; }
.contact-value a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.contact-list address { font-style: normal; color: var(--ink); line-height: 1.5; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--fs-sm); }
.contact-actions a, .copy-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}
.copy-btn {
  padding: 0;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.form {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  min-width: 0;
}
.form h2 { font-size: var(--fs-h3); text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field label,
.field-label,
.step legend {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { font-size: var(--fs-sm); color: var(--error); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-note { font-size: var(--fs-sm); color: var(--muted); }
.form-status {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  font-size: var(--fs-sm);
}

/* Brief builder (wizard) */
.wizard-head { display: grid; gap: 16px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
  padding: 0;
}
.steps button {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0 0 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.steps button:disabled { cursor: default; }
.steps button::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--rule-strong);
  transition: background-color 0.3s;
}
.steps .is-done button { color: var(--ink); }
.steps .is-done button::before { background: var(--ink); }
.steps [aria-current="step"] button { color: var(--accent-ink); }
.steps [aria-current="step"] button::before { background: var(--accent); }

.step { display: grid; gap: 20px; margin: 0; padding: 0; border: 0; min-width: 0; }
.step legend { padding: 0; margin-bottom: 4px; }
.step-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
}
.step-title:focus { outline: none; }
.js-wizard .step:not(.is-current) { display: none; }
.js-wizard .step.is-current { animation: step-in 0.35s ease; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile-box {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
}
.tile-box svg { width: 30px; height: 30px; color: var(--ink); }
.tile-code { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--accent-ink); }
.tile-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; text-transform: uppercase; line-height: 1.1; }
.tile-box::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.tile:hover .tile-box { border-color: var(--ink); }
.tile input:checked + .tile-box { border-color: var(--accent); background: var(--accent-tint); }
.tile input:checked + .tile-box::after {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.tile input:focus-visible + .tile-box { outline: 3px solid var(--focus); outline-offset: 2px; }

.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-size: var(--fs-sm);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Choice chips sit inside .field, so undo the small-caps field-label style for them. */
.field .choice {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}

/* Service-specific questions in step 2 */
.svc-questions { display: grid; gap: 14px; }
.svc-q {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
}
.svc-q-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
}
.svc-q .form-row { gap: 16px; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-row-3 { grid-template-columns: minmax(0, 1fr); } }

.wizard-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.wizard-nav .btn[hidden] + .btn { margin-left: auto; }

.brief {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--rule);
  border: 1px solid var(--rule-strong);
}
.brief div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 14px; background: var(--paper); }
.brief dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.brief dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

.faq { display: grid; border-top: 2px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
  transition: color 0.2s;
}
.faq summary:hover { color: var(--accent-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--accent-ink); flex: none; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 64ch; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .brief div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Founder profile & CV ---------- */

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.profile-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
}
.profile-card .bubble { width: 120px; font-size: 2.8rem; }
.profile-card h2 { font-size: 2rem; text-transform: uppercase; }
.profile-roles { display: grid; gap: 6px; list-style: none; padding: 0; color: var(--muted); font-size: var(--fs-sm); }
.profile-roles strong { color: var(--ink); font-weight: 600; }
.profile-contact { display: grid; gap: 1px; margin: 0; background: var(--rule); border-block: 1px solid var(--rule); }
.profile-contact div { display: grid; gap: 2px; padding: 10px 0; background: var(--surface); }
.profile-contact dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.profile-contact dd { margin: 0; overflow-wrap: anywhere; }
.profile-contact a { text-decoration-color: var(--rule-strong); }
.profile-card .btn { width: 100%; }

.cv { display: grid; gap: clamp(44px, 6vw, 64px); min-width: 0; }
.cv-section { display: grid; gap: 18px; }
.cv-section > h2 {
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  font-size: var(--fs-h3);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.cv-section > h2 small { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; color: var(--accent-ink); }
.cv-section p { color: var(--muted); max-width: 66ch; }
.cv-section p.cv-lead { color: var(--ink); font-size: var(--fs-lead); line-height: 1.55; }

.timeline { display: grid; gap: 0; list-style: none; padding: 0; }
.timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 26px 28px;
  border-left: 1px solid var(--rule-strong);
  margin-left: 6px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}
.timeline h3 { font-size: 1.35rem; text-transform: uppercase; }
.timeline .org { font-weight: 600; }
.timeline .meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); }
.timeline p { margin-top: 4px; }

.interest-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.interest-list li { padding: 8px 14px; border: 1px solid var(--rule-strong); background: var(--surface); font-size: var(--fs-sm); }

.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button {
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.filter button:hover { border-color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter .count { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.7; margin-left: 4px; }

.pubs { display: grid; list-style: none; padding: 0; border-top: 1px solid var(--rule-strong); counter-reset: pub; }
.pub {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.pub-year { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; color: var(--accent-ink); padding-top: 2px; }
.pub-body { display: grid; gap: 4px; min-width: 0; }
.pub-title { font-weight: 600; line-height: 1.4; }
.pub-authors { color: var(--muted); font-size: var(--fs-sm); }
.pub-authors b { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: var(--fs-sm); font-style: italic; color: var(--muted); }
.pub-empty { padding: 18px 0; color: var(--muted); }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-card { position: static; }
}
@media (max-width: 480px) {
  .pub { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- Footer title block ---------- */

.site-footer { padding-block: 56px 96px; border-top: 1px solid var(--rule); }

.titleblock {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.25fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.tb-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 20px;
  background: var(--paper);
  min-width: 0;
}
.tb-cell address { font-style: normal; }
.tb-cell a { text-decoration-color: var(--rule-strong); overflow-wrap: anywhere; }
.tb-cell a:hover { color: var(--accent-ink); }
.tb-brand { gap: 16px; }
.tb-brand img { display: block; height: 72px; width: auto; }
.tb-brand p { color: var(--muted); font-size: var(--fs-sm); max-width: 32ch; }
.tb-links { display: grid; gap: 6px; list-style: none; padding: 0; }
.tb-links a { text-decoration: none; }
.tb-links a:hover { text-decoration: underline; }
.tb-systems { gap: 14px; }
.tb-systems .sys-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.tb-systems .sys-row a { overflow-wrap: normal; font-size: 0.64rem; line-height: 1.25; text-align: center; }   /* names break only between words */
.tb-more {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.tb-more:hover { text-decoration: underline; }
.tb-email a { overflow-wrap: normal; }   /* breaks only after the @ when the cell is narrow */
.tb-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 960px) {
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tb-brand, .tb-systems, .tb-office, .tb-email { grid-column: 1 / -1; }
  .tb-cell { padding: 16px 14px; }
  .tb-links { font-size: var(--fs-sm); }
}

/* ---------- Systems & apps ---------- */

.systems-group { display: grid; gap: 22px; }
.systems-group + .systems-group { margin-top: clamp(48px, 6vw, 72px); }
.group-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}
.group-head h3 { font-size: var(--fs-h3); text-transform: uppercase; }
.group-head p { color: var(--muted); font-size: var(--fs-sm); max-width: 52ch; }

.web-systems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
}
.web-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s;
}
.web-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.web-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bp);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.web-bar .dots { display: flex; gap: 6px; flex: none; }
.web-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--bp-line-strong); }
.web-bar .dots i:first-child { background: var(--bp-accent); }
.web-bar .url {
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--bp-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.web-body { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 3vw, 28px); }
.web-client { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.web-body h4 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.35rem + 1vw, 2.2rem);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}
.web-body p { color: var(--muted); }
.web-body .checklist { grid-template-columns: minmax(0, 1fr); }
.web-body .btn { justify-self: start; margin-top: 4px; }
.founder-contact { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.founder-contact a { color: var(--ink); text-decoration-color: var(--rule-strong); }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
}
.app-card a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-content: start;
  gap: 4px 16px;
  height: 100%;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.app-card a:hover { border-color: var(--ink); transform: translateY(-2px); }
.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  overflow: hidden;
  border-radius: 13px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.2s;
}
.app-card .app-icon { grid-row: span 2; }
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-cat { align-self: end; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.app-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.05; text-transform: uppercase; }
.app-desc { grid-column: 1 / -1; margin-top: 10px; color: var(--muted); font-size: var(--fs-sm); }
.app-get { grid-column: 1 / -1; margin-top: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-ink); }
.app-card a:hover .app-get { text-decoration: underline; }
.filter-empty { color: var(--muted); }

@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .web-systems { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .app-grid { grid-template-columns: minmax(0, 1fr); } }

.interest-list a { color: inherit; text-decoration: none; }
.interest-list a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- People ---------- */

.bubble-sm { width: 56px; font-size: 1.3rem; flex: none; }
.bubble-sm::before { inset: 4px; }

.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
}
.people a {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.people a:hover { border-color: var(--accent); transform: translateY(-2px); }
.person-text { display: grid; gap: 2px; min-width: 0; }
.person-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.05; text-transform: uppercase; }
.person-role { color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.person-quals { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--accent-ink); }
.people.compact { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.section-foot { margin-top: 28px; }

@media (max-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .people, .people.compact { grid-template-columns: minmax(0, 1fr); } }

/* Team page */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin: 8px 0 0;
  background: var(--bp-line-strong);
  border: 1px solid var(--bp-line-strong);
}
.stats div { display: grid; gap: 4px; padding: 14px 18px; background: var(--bp); }
.stats dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bp-muted); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; line-height: 1; color: var(--bp-fg); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  list-style: none;
  padding: 0;
}
.member {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.member:hover { border-color: var(--ink); }
.member:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.member-head { display: flex; align-items: center; gap: 16px; padding: 22px; border-bottom: 1px solid var(--rule); }
.member-head .bubble { width: 72px; font-size: 1.6rem; flex: none; }
.member-head .bubble::before { inset: 5px; }
.member-code { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--accent-ink); }
.member-name { margin-top: 2px; font-size: 1.55rem; text-transform: uppercase; }
.member-role { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.quals { display: grid; align-content: start; gap: 12px; list-style: none; padding: 20px 22px; }
.quals li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; font-size: var(--fs-sm); line-height: 1.4; }
.qual-level { padding-top: 1px; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; color: var(--accent-ink); }
.quals small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.85rem; }
.member-foot { padding: 14px 22px; border-top: 1px solid var(--rule); }
.member-foot a { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-ink); text-decoration: none; }
.member-foot a:hover { text-decoration: underline; }

@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Systems launcher & icons ---------- */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.launcher { position: relative; order: 4; flex: none; }
.nav-toggle { order: 5; }

.launcher-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.launcher-btn svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.3s; }
.launcher-btn:hover { border-color: var(--ink); }
.launcher-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.launcher-btn[aria-expanded="true"] svg { transform: rotate(90deg); }

.launcher-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: min(352px, calc(100vw - 32px));
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  animation: pop-in 0.18s ease;
}
/* With the menu button showing, line the panel up with the screen edge instead (44px button + 16px gap). */
@media (max-width: 960px) { .launcher-panel { right: -60px; } }
.launcher-title {
  display: block;
  margin: 2px 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sys-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; }
.sys-grid a {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}
.sys-grid a:hover, .sys-grid a:focus-visible { background: var(--paper-2); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

.sys-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  background: var(--bp);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease;
}
.sys-icon.is-red { background: var(--accent); }
.sys-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a:hover > .sys-icon { transform: translateY(-2px) scale(1.05); }

/* Footer icon row */
.sys-row { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; }
.sys-row a {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-decoration: none;
}
.sys-row a:hover { color: var(--ink); }
.sys-row .sys-icon { width: 40px; height: 40px; border-radius: 10px; }
.sys-row .sys-icon svg { width: 20px; height: 20px; }

/* Systems that are coming soon: a small tag on the icon */
.sys-icon { position: relative; }
.is-soon .sys-icon::after {
  content: "Soon";
  position: absolute;
  top: -7px;
  right: -12px;
  padding: 2px 5px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sys-row .is-soon .sys-icon::after { top: -6px; right: -10px; font-size: 0.5rem; padding: 1px 4px; }

/* Services: card actions, a lone last card spans the row, and cards still to come */
.web-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 4px; }
.web-body .web-actions .btn { margin-top: 0; }
.web-systems:not(.is-soon-list) > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.web-systems.is-soon-list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 980px) { .web-systems.is-soon-list { grid-template-columns: minmax(0, 1fr); } }
.web-card.is-soon { border-style: dashed; box-shadow: none; }
.web-card.is-soon .web-bar .dots i:first-child { background: var(--bp-line-strong); }
/* "Coming soon" pages and cards */
.soon-tag {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Reading progress bar ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Hero numbers ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin: 4px 0 0;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.hero-stats div { display: flex; flex-direction: column-reverse; gap: 6px; padding: 12px 14px; background: var(--paper); }
.hero-stats dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 0; font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Step-through panel (how a project runs) ---------- */
.stepper { display: grid; gap: 24px; }
.stepper:not(.is-ready) .step-track,
.stepper:not(.is-ready) .step-controls { display: none; }
.step-track { position: relative; }
.step-line {
  position: absolute;
  top: 21px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: var(--rule-strong);
}
.step-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s ease;
}
.step-tabs { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.step-tabs [role="tab"] {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.st-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}
.st-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.1; text-align: center; text-transform: uppercase; }
.step-tabs [role="tab"]:hover .st-no { border-color: var(--ink); }
.step-tabs [role="tab"].is-done .st-no { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.step-tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.step-tabs [role="tab"][aria-selected="true"] .st-no { background: var(--accent); border-color: var(--accent); color: #FFFFFF; transform: scale(1.1); }

.step-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(22px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
}
.stepper.is-ready .step-panel { animation: step-in 0.35s ease; }
.sp-text { display: grid; align-content: start; gap: 10px; }
.stage-no { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.sp-text h3 { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem); text-transform: uppercase; }
.sp-text p { color: var(--muted); max-width: 46ch; }
.sp-list { display: grid; align-content: start; gap: 10px; }
.sp-list .checklist { grid-template-columns: minmax(0, 1fr); }
.step-controls { display: flex; justify-content: space-between; gap: 12px; }
.step-controls .btn:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 760px) {
  .st-name { display: none; }
  .st-no { width: 40px; height: 40px; }
  .step-line { top: 19px; }
  .step-panel { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Services tabs ---------- */
.js-sheets .discipline { background: var(--paper); border-top: 0; padding-bottom: clamp(24px, 3vw, 40px); }
.discipline.is-entering { animation: sheet-in 0.4s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px); } }
.sheet-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--wrap) - 2 * var(--gutter)));
  padding-inline: 0;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
}
.sheet-pager a {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}
.sheet-pager a small { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; color: var(--accent-ink); }
.sheet-pager a:hover { color: var(--accent-ink); }
.sheet-pager .pager-next { margin-left: auto; text-align: right; }
html:not(.js-sheets) .sheet-pager { display: none; }

/* ---------- Floating WhatsApp button ---------- */

.wa-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}
.wa-fab:hover { transform: translateY(-2px); background: var(--accent); color: #FFFFFF; }
.wa-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.wa-fab .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}
@media (max-width: 600px) {
  .wa-fab { padding: 14px; }
  .wa-fab .wa-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wa-fab .dot { position: absolute; top: 8px; right: 8px; }
}

/* ---------- Scroll reveal (enabled by script) ---------- */

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--rd, 0s);
}
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(72px, 12vw, 160px); }
.notfound .page-head-inner { max-width: 44rem; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print (founder CV) ---------- */

@media print {
  :root {
    --paper: #FFFFFF; --paper-2: #FFFFFF; --surface: #FFFFFF; --ink: #000000; --muted: #333333;
    --rule: #CCCCCC; --rule-strong: #999999; --accent-ink: #B5121A;
    --bp: #FFFFFF; --bp-fg: #000000; --bp-muted: #333333; --bp-accent: #B5121A;
    --bp-line: transparent; --bp-line-faint: transparent; --bp-line-strong: #999999;
    color-scheme: light;
  }
  body { font-size: 10.5pt; background: #FFFFFF; }
  .site-header, .site-footer, .wa-fab, .no-print, .skip-link { display: none !important; }
  .bp-surface { background-image: none; }
  .page-head { padding-block: 0 16px; }
  .section { padding-block: 16px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .profile-card { position: static; border: 0; padding: 0; }
  .profile-card .bubble { display: none; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
  .pub, .timeline li { break-inside: avoid; }
  a { text-decoration: none; }
}
.on-bp .soon-tag { border-color: var(--bp-accent); color: var(--bp-fg); }
.soon-actions { margin-top: 28px; }

/* Google Play apps that update themselves: a "New" tag on newly approved apps, highlighted for their first
   30 seconds on screen (assets/js/main.js, rule 1) before the list sorts by users (rule 2). */
.app-card a, .app-ribbon a { position: relative; }
.app-card.is-new a::after,
.app-ribbon .is-new a::after {
  content: "New";
  position: absolute;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-card.is-new a::after { top: 12px; right: 12px; }
.app-ribbon .is-new a::after { top: -9px; right: 12px; }
.app-card.is-spotlight a { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(216, 25, 32, 0.18); }
.app-ribbon .is-spotlight a { box-shadow: 0 0 0 3px var(--accent), 0 10px 18px -8px rgba(0, 0, 0, 0.7); }
.is-spotlight a::after { animation: new-pulse 1.6s ease-in-out infinite; }
@keyframes new-pulse { 50% { transform: scale(1.12); } }
.app-card.is-new .app-cat { padding-right: 52px; }

/* ---------- Home: systems showcase ----------
   A raised panel above the page. Systems are embroidered patches (twill weave, thread-wrapped edge, running
   stitch, raised lettering) gliding past in a loop; apps are stitched labels in a second row; the logo is an
   embroidered badge (SVG filter in index.html). */
.showcase-section { padding-block: clamp(48px, 6vw, 88px); }
.showcase {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 14px;
  padding: clamp(26px, 4vw, 48px) 0 clamp(18px, 3vw, 30px);
  border-radius: 28px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 5px),
    linear-gradient(165deg, #272D35 0%, #181C21 55%, #111418 100%);
  color: var(--bp-fg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 0 rgba(255, 255, 255, 0.6),
    0 36px 70px -30px rgba(17, 20, 24, 0.8),
    0 14px 28px -16px rgba(17, 20, 24, 0.55);
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  pointer-events: none;
}
.showcase-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-inline: clamp(22px, 4vw, 52px);
}
.showcase-intro { display: grid; gap: 10px; }
.showcase-intro h2 { font-size: var(--fs-h2); line-height: 1; text-transform: uppercase; }
.showcase .eyebrow { color: var(--bp-accent); }
.showcase .lead { max-width: 60ch; color: var(--bp-muted); }
.showcase .link-arrow { color: var(--bp-fg); }
.showcase-actions { display: grid; gap: 10px; justify-items: end; }
.marquee-toggle {
  padding: 6px 14px;
  border: 1px solid var(--bp-line-strong);
  border-radius: 999px;
  background: none;
  color: var(--bp-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.marquee-toggle:hover { border-color: var(--bp-fg); color: var(--bp-fg); }
.showcase-label {
  margin-top: 10px;
  padding-inline: clamp(22px, 4vw, 52px);
  color: var(--bp-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.showcase-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-inline: clamp(22px, 4vw, 52px);
}
.showcase-row .showcase-label { padding: 0; }

.logo-patch {
  width: clamp(112px, 13vw, 168px);
  transform: rotate(-6deg);
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.55)) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.logo-patch svg { display: block; width: 100%; height: auto; }
.logo-patch:hover { transform: rotate(0deg) translateY(-4px) scale(1.03); }

/* Moving rows. Without script, or with reduced motion, they scroll by hand. */
.marquee {
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee.is-moving { overflow: hidden; }
.marquee-track { display: flex; width: max-content; margin: 0; padding: 26px 0 30px; list-style: none; }
.marquee:not(.is-moving) .marquee-track { padding-inline: clamp(22px, 4vw, 52px); }
.marquee-track > li { flex: none; margin-right: 22px; }
.marquee.is-moving .marquee-track { animation: marquee var(--marquee-time, 30s) linear infinite; }
.marquee.is-reverse.is-moving .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track,
.marquee.is-offscreen .marquee-track,
.marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Embroidered system patches */
.patch {
  --fill-1: #2C333C;
  --fill-2: #1B1F24;
  --edge-1: #3C444E;
  --edge-2: #0F1215;
  --thread: rgba(255, 255, 255, 0.6);
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  width: 200px;
  min-height: 210px;
  padding: 24px 18px 20px;
  border: 5px solid transparent;
  border-radius: 28px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1.5px, transparent 1.5px 4.5px) padding-box,
    radial-gradient(120% 90% at 30% 12%, rgba(255, 255, 255, 0.16), transparent 60%) padding-box,
    linear-gradient(170deg, var(--fill-1), var(--fill-2)) padding-box,
    repeating-linear-gradient(62deg, var(--edge-1) 0 1.6px, var(--edge-2) 1.6px 3.4px) border-box;
  color: #FFFFFF;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 18px 28px -14px rgba(0, 0, 0, 0.85), 0 6px 10px -4px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
}
.patch::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed var(--thread);
  border-radius: 20px;
  pointer-events: none;
}
.patch.is-red { --fill-1: #EA2D34; --fill-2: #B5121A; --edge-1: #F4646A; --edge-2: #870B11; --thread: rgba(255, 255, 255, 0.72); }
.patch.is-soon { --thread: rgba(255, 255, 255, 0.42); }
.patch:hover,
.patch:focus-visible {
  transform: translateY(-10px) rotate(-2deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 30px 36px -16px rgba(0, 0, 0, 0.9), 0 10px 14px -6px rgba(0, 0, 0, 0.5);
}
.patch-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.14);
}
.patch-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 -0.5px 0 rgba(255, 255, 255, 0.35));
}
.patch-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.45), 0 -1px 0 rgba(255, 255, 255, 0.18);
}
.patch-hint { max-width: 20ch; color: rgba(255, 255, 255, 0.82); font-size: 0.84rem; line-height: 1.3; }
.patch-soon {
  position: absolute;
  top: -13px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #F2EDE3;
  color: #1B1F24;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.patch-soon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px dashed rgba(27, 31, 36, 0.45);
  border-radius: 3px;
}

/* Stitched app labels */
.app-ribbon > li { margin-right: 16px; }
.app-ribbon a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, rgba(27, 31, 36, 0.035) 0 1.5px, transparent 1.5px 4px), #F2EDE3;
  color: #1B1F24;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 12px 18px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.app-ribbon a::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px dashed rgba(27, 31, 36, 0.32);
  border-radius: 999px;
  pointer-events: none;
}
.app-ribbon a:hover, .app-ribbon a:focus-visible { transform: translateY(-5px); }
.app-ribbon .app-icon { width: 42px; height: 42px; border-radius: 50%; font-size: 0.95rem; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }

@media (max-width: 860px) {
  .showcase-head { grid-template-columns: auto minmax(0, 1fr); }
  .showcase-actions { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; }
}
@media (max-width: 560px) {
  .showcase { border-radius: 20px; }
  .showcase::before { inset: 7px; border-radius: 15px; }
  .showcase-head { grid-template-columns: minmax(0, 1fr); }
  .logo-patch { width: 108px; }
  .patch { width: 172px; min-height: 196px; }
  .marquee-track > li { margin-right: 16px; }
}

/* The logo stands slightly raised off the page, like the embroidered badge. */
.brand img, .tb-brand img { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 2px rgba(27, 31, 36, 0.3)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img,
  :root:not([data-theme="light"]) .tb-brand img { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
  :root:not([data-theme="light"]) .showcase { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.07), 0 36px 70px -30px rgba(0, 0, 0, 0.95); }
}
:root[data-theme="dark"] .brand img,
:root[data-theme="dark"] .tb-brand img { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
:root[data-theme="dark"] .showcase { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.07), 0 36px 70px -30px rgba(0, 0, 0, 0.95); }

/* ---------- Founder profile: conferences & events ---------- */
.event-video { display: grid; gap: 14px; margin: 4px 0 8px; }
.yt-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000000;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.6), 0 26px 44px -24px rgba(27, 31, 36, 0.6);
}
.yt-frame iframe,
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-facade { padding: 0; background: #000000; cursor: pointer; }
.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s;
}
.yt-facade:hover img, .yt-facade:focus-visible img { transform: scale(1.03); opacity: 1; }
.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78px;
  height: 55px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s;
}
.yt-play svg { display: block; width: 100%; height: 100%; }
.yt-play path:first-child { fill: var(--accent); }
.yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.08); }
.event-video figcaption { display: grid; gap: 6px; }
.event-video figcaption strong { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.1; text-transform: uppercase; }
.event-video .link-arrow { justify-self: start; }
.event-meta,
.event-kind { color: var(--accent-ink); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.events { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.events li {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.event-date { padding-top: 2px; color: var(--ink); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; }
.event-body { display: grid; gap: 4px; }
.event-body strong { font-size: 1.05rem; line-height: 1.35; }
.event-where { color: var(--muted); font-size: var(--fs-sm); }
.event-link { justify-self: start; margin-top: 2px; color: var(--accent-ink); font-family: var(--font-mono); font-size: 0.78rem; }
@media (max-width: 560px) { .events li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.yt-countdown {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.78);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.event-photos { display: grid; gap: 12px; margin-bottom: 8px; }
.event-photos a {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.6), 0 18px 32px -20px rgba(27, 31, 36, 0.6);
}
.event-photos img { display: block; width: 100%; height: auto; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.event-photos a:hover img, .event-photos a:focus-visible img { transform: scale(1.03); }
.viewer {
  width: min(1240px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #111418;
  color: #FFFFFF;
  overflow: hidden;
}
.viewer::backdrop { background: rgba(10, 12, 14, 0.84); }
.viewer img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.viewer-caption { padding: 12px 18px 16px; color: var(--bp-muted); font-size: var(--fs-sm); }
.viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.viewer-close:hover { background: var(--accent); }

/* ---------- Founder profile: headline numbers, projects, research areas ---------- */
.cv-stats { margin-top: 6px; }
.cv-stats dd { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); white-space: nowrap; }
@media (max-width: 1100px) { .cv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grant-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.grant-list li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 20px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--accent);
}
.grant-amount {
  grid-row: span 2;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.grant-list strong { font-size: 1.05rem; line-height: 1.35; }
.grant-by { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 560px) {
  .grant-list li { grid-template-columns: minmax(0, 1fr); }
  .grant-amount { grid-row: auto; }
}

.area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.area-list li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--accent);
}
.area-list strong { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.1; text-transform: uppercase; }
.area-list span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }

/* Founder profile: portrait, project notes and links */
.profile-photo {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 26px -14px rgba(27, 31, 36, 0.6);
}
.grant-note { grid-column: 2; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.grant-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; font-family: var(--font-mono); font-size: 0.78rem; }
.grant-links a { color: var(--accent-ink); }
@media (max-width: 560px) {
  .grant-note, .grant-links { grid-column: auto; }
  .profile-photo { width: 112px; height: 112px; }
}
@media print { .profile-photo { width: 110px; height: 110px; box-shadow: none; } }

/* ---------- Founder profile: Google Scholar figures and per-year chart ---------- */
.scholar-panel { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 14px; }
.scholar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.scholar-stats div { display: grid; align-content: center; gap: 6px; padding: 16px 18px; background: var(--surface); }
.scholar-stats dt { color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.scholar-stats dd { margin: 0; font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; line-height: 1; }
.scholar-stats div:first-child dd { color: var(--accent-ink); }

.year-chart { display: grid; gap: 14px; margin: 0; padding: 16px 18px 12px; background: var(--surface); border: 1px solid var(--rule-strong); }
.chart-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.chart-switch button {
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.chart-switch button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.year-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  height: 160px;
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule-strong);
}
.year-bars li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.year-bars b { margin-bottom: 4px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1; }
.year-bars .bar {
  width: min(56px, 70%);
  height: calc(var(--h, 0%) * 0.82);
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #EA2D34, var(--accent));
  transition: height 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.year-bars li:last-child .bar { background: repeating-linear-gradient(135deg, var(--accent) 0 6px, #EA2D34 6px 12px); }
.year-bars .yr { position: absolute; bottom: -22px; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; }
.year-chart figcaption { color: var(--muted); font-size: 0.82rem; }
.year-chart figcaption a { color: var(--accent-ink); }
.pub-cites {
  justify-self: start;
  margin-top: 2px;
  padding: 2px 9px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
@media (max-width: 760px) { .scholar-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Page by page: Home, About, Team, Services, Contact ---------- */
/* The dock under the footer names the next page; scrolling on at the end of a page fills its bar (--pull, 0 to 1)
   and then the next page slides in. */
.site-footer:has(+ .page-dock) { padding-bottom: 56px; }
.page-dock { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.dock-fill {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
  transform: scaleX(var(--pull, 0));
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.page-dock.is-pulling .dock-fill { transition-duration: 0.08s; }
.dock-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding-block: 34px 40px; }
.dock-prev,
.dock-kicker,
.dock-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dock-prev { justify-self: start; color: inherit; opacity: 0.75; text-decoration: none; }
.dock-prev:hover { opacity: 1; text-decoration: underline; }
.dock-main { grid-column: 2; display: grid; justify-items: center; gap: 10px; text-align: center; }
.dock-kicker, .dock-hint { opacity: 0.7; }
.dock-next { display: inline-flex; align-items: center; gap: 16px; color: inherit; text-align: left; text-decoration: none; }
.dock-next strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.dock-next small { display: block; margin-top: 4px; font-size: 0.95rem; opacity: 0.75; }
.dock-arrow {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1.3rem;
  transform: translateX(calc(var(--pull, 0) * 10px));
  transition: transform 0.3s, box-shadow 0.3s;
}
.dock-next:hover .dock-arrow { transform: translateX(6px); }
.page-dock.is-ready .dock-arrow { box-shadow: 0 0 0 8px rgba(216, 25, 32, 0.35); }
.dock-dots { display: flex; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.dock-dots a { display: block; width: 8px; height: 8px; border-radius: 999px; background: currentColor; opacity: 0.3; transition: width 0.3s, opacity 0.3s; }
.dock-dots a:hover { opacity: 0.7; }
.dock-dots a[aria-current="page"] { width: 24px; background: var(--accent); opacity: 1; }
@media (max-width: 640px) {
  .dock-inner { grid-template-columns: minmax(0, 1fr); padding-block: 26px 34px; }
  .dock-main { grid-column: 1; }
  .dock-prev { justify-self: center; }
}
@media print { .page-dock { display: none; } }

/* The next page slides in from the right (browsers with cross-document view transitions; others get a short
   slide from the script). Only page turns made here animate: the script skips the transition for other links. */
@view-transition { navigation: auto; }
html:active-view-transition .site-header { view-transition-name: site-header; }
html:active-view-transition .wa-fab { view-transition-name: wa-fab; }
::view-transition-old(root) { animation: page-out 0.36s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes page-out { to { transform: translateX(-28%); opacity: 0; } }
@keyframes page-in { from { transform: translateX(36%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- Team profiles (team page links, /people/<name> pages) ---------- */
.member-name a { color: inherit; text-decoration: none; }
.member-name a:hover { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.member-photo { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); }
.cv .quals { padding: 0; }
.cv-note { padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); }
.preview-bar { position: sticky; top: var(--header-h); z-index: 20; padding: 10px var(--gutter); background: #B8860B; color: #FFFFFF; font-weight: 600; text-align: center; }

/* ---------- Where our apps are used (home showcase: Google Play installs by country) ---------- */
/* Shown only when installs figures have been uploaded on the Studio 13 Desk. One hue, light = more installs. */
.reach { display: grid; gap: 12px; margin-top: 14px; }
.reach-total { color: var(--bp-fg); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.02em; }
.reach-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 270px);
  gap: clamp(16px, 3vw, 36px);
  align-items: center;
  padding-inline: clamp(22px, 4vw, 52px);
}
.reach-map { position: relative; margin: 0; }
.reach-map svg { display: block; width: 100%; height: auto; }
.reach-map path { fill: rgba(255, 255, 255, 0.07); stroke: rgba(255, 255, 255, 0.14); stroke-width: 0.5; }
.reach-map path.b1 { fill: #8A3038; }
.reach-map path.b2 { fill: #B5262D; }
.reach-map path.b3 { fill: #E0474D; }
.reach-map path.b4 { fill: #F58489; }
.reach-map path.b5 { fill: #FFC2C4; }
.reach-map path[data-n] { cursor: default; outline: none; }
.reach-map path[data-n]:hover, .reach-map path[data-n]:focus-visible { stroke: #FFFFFF; stroke-width: 1.2; }
.reach-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  transform: translate(-50%, calc(-100% - 10px));
  background: #FFFFFF;
  color: #1B1F24;
  font-size: 0.82rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
}
.reach-top { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.reach-top li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; align-items: baseline; gap: 8px; color: var(--bp-fg); font-size: var(--fs-sm); }
.reach-top .rank { color: var(--bp-muted); font-family: var(--font-mono); font-size: 0.72rem; }
.reach-top .n { font-family: var(--font-mono); font-size: 0.8rem; }
.reach-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 14px; color: var(--bp-muted); font-family: var(--font-mono); font-size: 0.64rem; }
.reach-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 2px; }
.reach-note { margin-top: 10px; color: var(--bp-muted); font-size: 0.78rem; line-height: 1.45; }
@media (max-width: 760px) { .reach-body { grid-template-columns: minmax(0, 1fr); } }
