/* The v4 design system from the personal site, carried over unchanged.
   Sigil-specific rules live in sigil.css, which loads after this file. */
/* ═══════════════════════════════════════════════════════════
   TOKENS
   One ink. Every tone is the blue mixed with black or white in
   fixed steps (d = darker, l = lighter), as in the reference.
   ═══════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --blue: #0000f2;
  --blue-d20: #0000c2;
  --blue-d40: #000091;
  --blue-d60: #000061;
  --blue-l20: #3333f5;
  --paper: #f2f2f2;
  --yellow: #f2f200;
  --cyan: #00f2f2;
  --magenta: #f200f2;

  --bg: var(--paper);
  --fg: var(--blue);
  --text: var(--blue-d40);
  --text-2: rgba(0, 0, 145, 0.66);
  --surface: #ffffff;
  --surface-line: #ececf6;
  --hair: rgba(0, 0, 242, 0.15);
  --hair-2: rgba(0, 0, 242, 0.08);
  --wash: rgba(0, 0, 0, 0.025);
  --wash-hover: rgba(0, 0, 242, 0.07);
  --row-hover: rgba(0, 0, 242, 0.035);
  --band: var(--blue);
  --band-fg: var(--paper);
  --band-fg-2: rgba(242, 242, 242, 0.76);
  --band-hair: rgba(242, 242, 242, 0.24);
  --band-wash: rgba(255, 255, 255, 0.1);
  --stage: var(--blue-d20);
  --frame: var(--blue-l20);
  --frame-hi: #f5f5f5;
  --primary: var(--blue);
  --on-primary: var(--paper);
  --fold: var(--blue-d60);
  --win-shadow: 0 50px 100px -40px rgba(0, 0, 60, 0.6), 0 0 0 1px rgba(0, 0, 90, 0.06);

  /* Dither palette for the plates, darkest to lightest. */
  --d0: #00009e;
  --d1: #0000f2;
  --d2: #7b7bf7;
  --d3: #f0f0ff;

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fold: cubic-bezier(0.65, 0, 0.35, 1);

  --fw: 5px;
  --head-h: 88px;
  --gutter: clamp(16px, 4.6vw, 48px);
  --inset: clamp(8px, 2.4vw, 24px);
  --band-pad: clamp(20px, 4.6vw, 48px);
  --sec-v: clamp(72px, 10vw, 136px);
  --col: 1240px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d24;
  --fg: #f2f2f2;
  --text: #e6e6ef;
  --text-2: rgba(230, 230, 239, 0.62);
  --surface: #17172e;
  --surface-line: var(--blue-l20);
  --hair: rgba(255, 255, 255, 0.12);
  --hair-2: rgba(255, 255, 255, 0.06);
  --wash: rgba(255, 255, 255, 0.05);
  --wash-hover: rgba(255, 255, 255, 0.1);
  --row-hover: rgba(255, 255, 255, 0.035);
  --band: var(--blue-d40);
  --band-fg: #fafaff;
  --band-fg-2: rgba(250, 250, 255, 0.72);
  --band-hair: rgba(255, 255, 255, 0.16);
  --band-wash: rgba(255, 255, 255, 0.08);
  --stage: #19192f;
  --fold: var(--paper);
  --win-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --d0: #000038;
  --d1: #000091;
  --d2: #4848cc;
  --d3: #dcdcff;
}
@media (max-width: 767px) {
  :root {
    --fw: 3px;
    --head-h: 64px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  background: var(--stage);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 20px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection {
  background: var(--yellow);
  color: var(--blue);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
svg,
canvas {
  display: block;
}
strong {
  font-weight: 600;
  color: var(--fg);
}
:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}
.skip {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--on-primary);
  font: 500 13px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}

/* ═══════════════════════════════════════════════════════════
   FRAME — a fixed bezel round the viewport. Light arcs drift
   along it; while scrolling, the sides glow at the scroll depth.
   ═══════════════════════════════════════════════════════════ */
.frame {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  border: var(--fw) solid var(--frame);
}
.frame-amb {
  position: absolute;
  overflow: hidden;
  opacity: 0.48;
  animation: frame-bloom 42s ease-in-out infinite;
}
.frame-amb::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    160deg,
    transparent 0%,
    var(--frame-hi) 15%,
    var(--frame) 20%,
    var(--blue) 25%,
    transparent 35% 40%,
    var(--frame-hi) 55%,
    var(--frame) 60%,
    var(--blue) 65%,
    transparent 75% 80%,
    var(--frame-hi) 95%,
    var(--frame) 100%
  );
  animation: frame-arc 14s linear infinite alternate;
}
.frame-amb.t,
.frame-amb.b {
  left: calc(-1 * var(--fw));
  right: calc(-1 * var(--fw));
  height: var(--fw);
}
.frame-amb.t {
  top: calc(-1 * var(--fw));
}
.frame-amb.b {
  bottom: calc(-1 * var(--fw));
}
.frame-amb.l,
.frame-amb.r {
  top: 0;
  bottom: 0;
  width: var(--fw);
}
.frame-amb.l {
  left: calc(-1 * var(--fw));
}
.frame-amb.r {
  right: calc(-1 * var(--fw));
}
.frame-scroll {
  position: absolute;
  inset: calc(-1 * var(--fw));
  padding: var(--fw);
  opacity: 0;
  transition: opacity 0.6s ease-out;
  background:
    radial-gradient(ellipse 120px 240px at 0% var(--sy, 10%), var(--frame-hi), transparent),
    radial-gradient(ellipse 120px 240px at 100% var(--sy, 10%), var(--frame-hi), transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
.frame-scroll.on {
  opacity: 0.45;
  transition-duration: 0.16s;
}
@keyframes frame-arc {
  0% {
    transform: translate(-10%, -10%);
  }
  100% {
    transform: translate(-50%, -50%);
  }
}
@keyframes frame-bloom {
  0%,
  68%,
  92%,
  100% {
    opacity: 0.48;
  }
  80% {
    opacity: 0.9;
  }
}

/* Film grain over everything, a few percent strong. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 101;
  pointer-events: none;
  opacity: 0.34;
  background-size: 160px 160px;
  animation: grain 0.9s steps(1) infinite;
}
:root[data-theme="dark"] .grain {
  opacity: 0.26;
}
@keyframes grain {
  0% {
    background-position: 0 0;
  }
  20% {
    background-position: -41px 63px;
  }
  40% {
    background-position: 77px -19px;
  }
  60% {
    background-position: -93px -71px;
  }
  80% {
    background-position: 29px 101px;
  }
}

/* The dog-ear in the top-right corner switches the theme. */
.fold {
  position: fixed;
  z-index: 60;
  top: var(--fw);
  right: var(--fw);
  width: 40px;
  height: 40px;
  display: grid;
  justify-items: end;
  align-items: start;
  color: var(--fold);
  opacity: 0.8;
  transition: opacity 0.2s;
}
.fold svg {
  width: 13px;
  height: 13px;
  transform-origin: 100% 0;
  transition: transform 0.36s var(--ease-fold);
}
.fold:hover {
  opacity: 1;
}
.fold:hover svg,
.fold:focus-visible svg {
  transform: scale(1.7);
}
.fold:focus-visible {
  outline-offset: -4px;
}

/* ═══════════════════════════════════════════════════════════
   HEADER — three links, the badge, three links
   ═══════════════════════════════════════════════════════════ */
.head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--head-h);
  padding: var(--fw) calc(var(--fw) + var(--gutter)) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--hair);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}
.nav-l {
  padding-right: clamp(28px, 10vw, 168px);
}
.nav-r {
  padding-left: clamp(28px, 10vw, 168px);
}
.nav-link {
  position: relative;
  padding: 10px 0;
  font: 500 13px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.22s var(--ease);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}
.badge {
  grid-column: 2;
  color: var(--fg);
  padding: 4px 6px;
  transition: transform 0.36s var(--ease);
}
.badge:hover {
  transform: rotate(-3deg);
}
.badge svg {
  width: 34px;
  height: 44px;
}
.menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 3px;
  background: var(--wash);
  font: 500 13px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.menu-btn i {
  width: 14px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
@media (max-width: 820px) {
  .nav {
    display: none;
  }
  .head {
    grid-template-columns: auto 1fr auto;
  }
  .badge {
    grid-column: 1;
    grid-row: 1;
    padding-left: 0;
  }
  .badge svg {
    width: 28px;
    height: 36px;
  }
  .menu-btn {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    margin-right: 26px;
  }
}

/* ═══════════════════════════════════════════════════════════
   TYPE
   ═══════════════════════════════════════════════════════════ */
/* Single-line display set to exactly the width of its box (see fitOne). */
.fit {
  display: block;
  width: 100%;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 12vw;
  line-height: 0.8;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg);
}
@supports (text-box: trim-both cap alphabetic) {
  .fit {
    line-height: 1;
    text-box: trim-both cap alphabetic;
  }
}
.js .fit:not(.fitted) {
  visibility: hidden;
}
.fit .dim {
  opacity: 0.42;
}
.cur {
  display: inline-block;
  width: 0.045em;
  height: 0.7em;
  margin-left: 0.06em;
  background: currentColor;
  vertical-align: baseline;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.eyebrow {
  font: 700 9.5px/1.3 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
}
.label {
  font: 500 12px/1.25 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg);
}
.h-display {
  margin-top: 18px;
  font: 300 clamp(46px, 6.4vw, 86px) / 0.92 var(--f-display);
  text-transform: uppercase;
  color: var(--fg);
  text-wrap: balance;
}
.h-feat {
  font: 300 clamp(32px, 3.6vw, 48px) / 1.02 var(--f-display);
  color: var(--fg);
  text-wrap: balance;
}
.lede {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  text-wrap: pretty;
}
.band .eyebrow,
.band .label,
.band .h-display,
.band .h-feat {
  color: var(--band-fg);
}
.band .lede {
  color: var(--band-fg-2);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS — a quiet wash or the solid ink, paired edge to edge.
   On hover a light arc runs round the edge.
   ═══════════════════════════════════════════════════════════ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 47px;
  padding: 0 13px;
  border-radius: 3px;
  background: var(--wash);
  color: var(--fg);
  font: 500 15px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color 0.15s ease-out,
    color 0.15s,
    transform 0.15s;
}
.btn:hover {
  background: var(--wash-hover);
  transition-duration: 0s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-p {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-p:hover {
  background: var(--primary);
}
.band .btn {
  background: var(--band-wash);
  color: var(--band-fg);
}
.band .btn-p {
  background: var(--band-fg);
  color: var(--band);
}
.btn .arc {
  position: absolute;
  inset: 0;
  padding: 1.25px;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
.btn .arc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    160deg,
    transparent 0%,
    currentColor 14%,
    transparent 30% 46%,
    currentColor 60%,
    transparent 76%
  );
  animation: frame-arc 1.8s linear infinite alternate;
}
.btn:hover .arc {
  opacity: 1;
}
.btn .ic {
  width: 11px;
  height: 11px;
  flex: none;
}
.pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--bg);
  color: var(--fg);
  font: 500 10px/1 var(--f-mono);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: calc(var(--head-h) + clamp(18px, 2.6vw, 28px)) var(--gutter) clamp(44px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cmd {
  width: min(720px, 100%);
  height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px 0 14px;
  background: var(--surface);
  border: 2px solid var(--surface-line);
  border-radius: 1.75px;
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
  transition: border-color 0.2s;
}
.cmd:hover {
  border-color: var(--hair);
}
.cmd-owl {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--fg);
}
.cmd-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-label b {
  font-weight: 400;
  color: var(--fg);
}
.cmd-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.cmd-hint span {
  margin-right: 6px;
}
@media (hover: none) {
  .cmd-hint {
    display: none;
  }
}

/* Positioning lens: same facts, different lead. Two equal columns so the
   sliding fill lands exactly on a button whatever the label lengths. */
.lens {
  margin-top: clamp(26px, 3.6vw, 38px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.lens-seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 1px solid var(--hair);
  border-radius: 3px;
}
.lens-seg::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 2px;
  background: var(--primary);
  transition: transform 0.45s var(--ease);
}
body[data-mode="eng"] .lens-seg::before {
  transform: translateX(100%);
}
.lens-btn {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  font: 700 9.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  transition: color 0.3s;
}
.lens-btn[aria-pressed="true"] {
  color: var(--on-primary);
}
.hero-name {
  margin-top: 24px;
  width: min(100%, var(--col));
}
.hero-role {
  margin-top: clamp(18px, 2.4vw, 26px);
  font: 400 clamp(16px, 1.9vw, 22px) / 1.2 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}
.hero-role .sep {
  margin: 0 0.55em;
  opacity: 0.45;
}
.hero-copy {
  margin-top: 16px;
  max-width: 452px;
  display: grid;
  gap: 10px;
  font-size: 15px;
  line-height: 1.42;
  color: var(--text);
  text-wrap: pretty;
}
.hero .pair {
  margin-top: 28px;
}

/* ═══════════════════════════════════════════════════════════
   BANDS & PLATES
   ═══════════════════════════════════════════════════════════ */
.scroll {
  position: relative;
  z-index: 2;
  padding: 0 var(--fw);
  background: var(--bg);
}
.band {
  position: relative;
  margin: 0 var(--inset);
  border-radius: 4px;
  background: var(--band);
  color: var(--band-fg);
  overflow: hidden;
}
.band strong {
  color: var(--band-fg);
}
.plate {
  position: relative;
  overflow: hidden;
  background: var(--d1);
  isolation: isolate;
}
.plate canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
/* The thin RGB strip the reference runs down the edge of its images. */
.plate::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  top: 14%;
  height: 44%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--magenta) 12%,
    var(--magenta) 40%,
    var(--cyan) 42%,
    var(--cyan) 76%,
    transparent
  );
  opacity: 0.85;
}
.datacol {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: clamp(40px, 4.6vw, 60px);
  overflow: hidden;
  pointer-events: none;
  font: 400 7.5px/1.34 var(--f-mono);
  letter-spacing: 0.04em;
  white-space: pre;
  color: var(--d3);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.datacol.l {
  left: 12px;
}
.datacol.r {
  right: 12px;
  text-align: right;
}
.datacol > div {
  animation: datacol 90s linear infinite;
}
.datacol.r > div {
  animation-duration: 70s;
  animation-direction: reverse;
}
@keyframes datacol {
  to {
    transform: translateY(-50%);
  }
}
.hud {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--d3);
}
.hud span {
  position: absolute;
  opacity: 0.85;
}
.hud .tl {
  top: 18px;
  left: clamp(64px, 7vw, 92px);
}
.hud .tr {
  top: 18px;
  right: clamp(64px, 7vw, 92px);
}
.hud .bl {
  bottom: 18px;
  left: clamp(64px, 7vw, 92px);
}
.hud .br {
  bottom: 18px;
  right: clamp(64px, 7vw, 92px);
}

.hero-band .plate {
  aspect-ratio: 16 / 8.2;
  max-height: min(80vh, 820px);
  border-radius: 4px 4px 0 0;
}
.band-pad {
  padding: 0 var(--band-pad);
}
.band-fit {
  padding: clamp(40px, 6vw, 76px) 0 clamp(36px, 5vw, 60px);
  color: var(--band-fg);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--band-hair);
}
.stat {
  padding: 22px 20px 30px 0;
}
.stat + .stat {
  padding-left: 20px;
  border-left: 1px solid var(--band-hair);
}
.stat-v {
  font: 300 clamp(44px, 5.4vw, 76px) / 0.9 var(--f-display);
}
.stat-l {
  margin-top: 12px;
  font: 500 12px/1.3 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--band-fg-2);
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS — ordered per mode by SECTION_ORDER
   ═══════════════════════════════════════════════════════════ */
.stack {
  display: flex;
  flex-direction: column;
  padding: calc(var(--sec-v) * 0.5) 0;
}
.sec {
  position: relative;
  padding: calc(var(--sec-v) * 0.5) var(--gutter);
}
.sec.band {
  margin: calc(var(--sec-v) * 0.5) var(--inset);
  padding: var(--sec-v) var(--band-pad) calc(var(--sec-v) * 0.6);
}
.wrap {
  max-width: var(--col);
  margin: 0 auto;
}
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.sec-meta {
  padding-bottom: 6px;
  color: var(--text-2);
}
.glyph {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  color: var(--fg);
}

/* ── Profile ── */
.split {
  width: 100%;
  max-width: 1000px;
  margin-top: clamp(30px, 4vw, 46px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 9vw, 168px);
  text-align: left;
}
.split p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}
.avail {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--hair);
  border-radius: 3px;
}
.dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
.specs {
  width: 100%;
  margin-top: clamp(52px, 6vw, 76px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  text-align: left;
}
.spec {
  padding: 22px 22px 4px 0;
}
.spec + .spec {
  padding-left: 22px;
  border-left: 1px solid var(--hair);
}
.spec .label {
  color: var(--text-2);
}
.spec-v {
  margin-top: 14px;
  font: 300 clamp(36px, 3.8vw, 50px) / 0.92 var(--f-display);
  text-transform: uppercase;
  color: var(--fg);
}
.spec-s {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}

/* ── Selected work: alternating feature rows on the band ── */
.feat {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(32px, 5vw, 60px) 0;
  border-top: 1px solid var(--band-hair);
}
.feats {
  margin-top: clamp(40px, 5vw, 64px);
}
.feat:nth-child(even) .feat-copy {
  order: 2;
}
.feat-copy .h-feat {
  margin: 16px 0 18px;
}
.feat-copy p {
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.52;
  color: var(--band-fg-2);
  text-wrap: pretty;
}
.feat-copy .btn {
  margin-top: 26px;
}
.feat-label {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.tag-hot {
  padding: 4px 7px;
  border-radius: 2px;
  background: var(--band-fg);
  color: var(--band);
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.06em;
}
.feat-art {
  aspect-ratio: 7 / 5;
  border-radius: 3px;
}
.feat-art .datacol.l {
  display: none;
}
.feat-art .hud .tl,
.feat-art .hud .bl {
  left: 16px;
}

/* ── Experience: a ledger ── */
.ledger {
  list-style: none;
  margin-top: clamp(40px, 5vw, 60px);
  border-top: 1px solid var(--hair);
}
.role {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(18px, 3vw, 40px);
  padding: 28px 14px 30px;
  border-bottom: 1px solid var(--hair);
  transition: background-color 0.2s;
}
.role:hover {
  background: var(--row-hover);
}
.role-meta .label + .label {
  margin-top: 6px;
  color: var(--text-2);
}
.now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 9px;
  border-radius: 2px;
  background: var(--primary);
  color: var(--on-primary);
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.now .dot {
  width: 5px;
  height: 5px;
}
.role-title {
  font: 400 clamp(26px, 2.5vw, 32px) / 1 var(--f-display);
  color: var(--fg);
  text-wrap: balance;
}
.role-org {
  margin-top: 12px;
}
.role-where {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}
.role-lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}
.role-body {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.role-body strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Stack ── */
.rows {
  margin-top: clamp(40px, 5vw, 60px);
}
.row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
  padding: 26px 0;
  border-top: 1px solid var(--hair);
}
.row > .label {
  padding-top: 9px;
  color: var(--text-2);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 9px 11px;
  border: 1px solid var(--hair);
  border-radius: 1.75px;
  font: 500 13px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.chip:hover {
  background: var(--row-hover);
  border-color: var(--fg);
}
.chip.p {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}
.row .split {
  margin-top: 0;
  max-width: none;
  gap: clamp(20px, 4vw, 56px);
}

/* ── Patents & research ── */
.creds {
  list-style: none;
}
.cred {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
}
.cred:last-child {
  border-bottom: 0;
}
.cred-n {
  font: 300 34px/1 var(--f-display);
  color: var(--fg);
  opacity: 0.55;
}
.cred-name {
  font: 400 clamp(22px, 2.2vw, 28px) / 1.08 var(--f-display);
  color: var(--fg);
  text-wrap: balance;
}
.codes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.code {
  padding: 6px 8px;
  border: 1px solid var(--hair);
  border-radius: 1.75px;
  font: 500 11.5px/1 var(--f-mono);
  color: var(--text);
  white-space: nowrap;
}

/* ── Contact ── */
.contact-fit {
  width: min(100%, 1040px);
  margin-top: 26px;
}
.contact-sub {
  display: block;
  margin-top: 22px;
  font: 300 clamp(28px, 3.4vw, 46px) / 1.04 var(--f-display);
  color: var(--fg);
}
.contact-links {
  margin-top: 30px;
}
.contact-plate {
  margin: clamp(44px, 5vw, 68px) calc(var(--inset) - var(--gutter)) 0;
  padding: clamp(16px, 6vw, 92px) clamp(10px, 6.5vw, 104px);
  border-radius: 4px;
}

/* The shell, dressed as a desktop app window on the plate. */
.win {
  position: relative;
  z-index: 4;
  max-width: 1040px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--win-shadow);
  color: var(--text);
  text-align: left;
}
.win-bar {
  height: 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--hair-2);
  font-size: 12px;
  color: var(--text-2);
}
.win-ico {
  display: flex;
  gap: 10px;
}
.win-ico.r {
  justify-content: flex-end;
}
.win-ico i {
  width: 11px;
  height: 11px;
  border: 1.25px solid var(--hair);
  border-radius: 2.5px;
}
.win-ico i.o {
  border-radius: 50%;
}
.win-title b {
  font-weight: 500;
  color: var(--fg);
}
.win-main {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  height: clamp(360px, 46vh, 460px);
}
.win-side {
  padding: 14px 10px;
  border-right: 1px solid var(--hair-2);
  overflow-y: auto;
}
.win-sect {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 7px;
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg);
}
.win-sect::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
}
.win-sect:first-child {
  padding-top: 4px;
}
.win-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 3px;
  font: 400 12.5px/1.2 var(--f-ui);
  color: var(--text);
  text-align: left;
}
.win-item::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border: 1px solid var(--hair);
  border-radius: 50%;
}
.win-item:hover,
.win-item.on {
  background: var(--row-hover);
  color: var(--fg);
}
.win-item.on::before {
  background: var(--fg);
  border-color: var(--fg);
}
.win-term {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 22px 18px;
}
.term-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font: 400 12.5px/1.68 var(--f-mono);
  color: var(--text);
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
}
.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}
.term-prompt {
  color: var(--fg);
}
.t-dim {
  color: var(--text-2);
}
.t-key {
  color: var(--fg);
  font-weight: 500;
}
.t-ok {
  color: var(--fg);
}
.t-err {
  color: #e0004a;
}
:root[data-theme="dark"] .t-err {
  color: #ff7aa8;
}
.t-warn {
  color: #b26b00;
}
:root[data-theme="dark"] .t-warn {
  color: #f2c200;
}
.t-link {
  color: var(--fg);
  border-bottom: 1px solid var(--hair);
}
.t-link:hover {
  border-bottom-color: currentColor;
}
.term-in {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 12px;
  height: 42px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  font: 400 12.5px/1 var(--f-mono);
  transition: border-color 0.2s;
}
.term-in:focus-within {
  border-color: var(--fg);
}
.term-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  caret-color: var(--fg);
}
.term-send {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font: 500 12px/1 var(--f-mono);
}
.win-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 30px;
  padding: 0 14px;
  border-top: 1px solid var(--hair-2);
  font: 500 10.5px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.win-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.win-status .dot {
  width: 5px;
  height: 5px;
  color: var(--fg);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER — on wide screens it waits underneath the page and
   sharpens into view as the content scrolls off it.
   ═══════════════════════════════════════════════════════════ */
.foot {
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}
.foot-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 26px calc(var(--fw) + var(--gutter));
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--hair);
}
.foot-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--fg);
  opacity: 0.13;
  pointer-events: none;
}
.foot-col {
  position: relative;
  display: grid;
  gap: 7px;
}
.foot-col.r {
  justify-items: end;
  text-align: right;
}
.foot-col a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.foot-badges {
  position: relative;
  display: flex;
  gap: 12px;
}
.mini {
  display: grid;
  place-items: center;
  width: 28px;
  height: 38px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
  background: var(--bg);
  font: 600 12px/1 var(--f-display);
  letter-spacing: 0.04em;
  transition: transform 0.3s var(--ease);
}
.mini:hover {
  transform: translateY(-2px);
}
.mini svg {
  width: 20px;
  height: 26px;
}
.foot-art {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: var(--band);
}
.foot-art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
@media (min-width: 768px) {
  .scroll {
    margin-bottom: 100dvh;
  }
  .foot {
    position: fixed;
    inset: 0;
    z-index: 1;
    padding: var(--head-h) var(--fw) var(--fw);
    opacity: calc(0.4 + 0.6 * var(--fr, 0));
    filter: blur(calc(10px * (1 - var(--fr, 0))));
  }
}

/* ═══════════════════════════════════════════════════════════
   COMMAND PALETTE (⌘K)
   ═══════════════════════════════════════════════════════════ */
.pal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: calc(var(--head-h) + 22px) 16px 16px;
}
.pal[hidden] {
  display: none;
}
.pal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 50, 0.24);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade 0.2s ease-out;
}
.pal-box {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  border: 2px solid var(--primary);
  border-radius: 1.75px;
  background: var(--band);
  color: var(--band-fg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.2);
  animation: pal-in 0.36s var(--ease);
}
.pal-top {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 12px 0 14px;
  background: var(--surface);
  color: var(--fg);
}
.pal-top .cmd-owl {
  width: 28px;
  height: 28px;
}
.pal-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--fg);
}
.pal-input::placeholder {
  color: var(--text-2);
}
.pal-esc {
  display: grid;
  padding: 4px;
  margin-right: -4px;
}
.pal-box:focus {
  outline: none;
}
.pal-body {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.pal-side {
  padding: 20px 16px;
  border-right: 1px dashed var(--band-hair);
}
.pal-side .label {
  color: var(--band-fg-2);
}
.pal-title {
  margin-top: 10px;
  font: 300 36px/0.9 var(--f-display);
  text-transform: uppercase;
}
.pal-list {
  list-style: none;
  max-height: min(440px, calc(100dvh - var(--head-h) - 150px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--band-hair) transparent;
}
.pal-group {
  padding: 14px 18px 6px;
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--band-fg-2);
}
.pal-opt {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font: 500 13px/1.25 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.pal-opt.mono .l {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.pal-opt .c {
  opacity: 0.5;
}
.pal-opt .h {
  overflow: hidden;
  max-width: 22ch;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--band-fg-2);
}
.pal-opt .a {
  font-family: var(--f-mono);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.pal-opt[aria-selected="true"] {
  background: var(--band-wash);
}
.pal-opt[aria-selected="true"] .a {
  opacity: 1;
  transform: none;
}
.pal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 9px 14px;
  border-top: 1px solid var(--band-hair);
  font: 500 10.5px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--band-fg-2);
}
.pal-foot b {
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--band-fg);
}
@keyframes pal-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@media (max-width: 640px) {
  .pal {
    padding: calc(var(--head-h) + 8px) 10px 10px;
    align-items: stretch;
  }
  .pal-box {
    display: flex;
    flex-direction: column;
  }
  .pal-body {
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .pal-list {
    max-height: none;
  }
  .pal-side,
  .pal-foot {
    display: none;
  }
}

.toast {
  position: fixed;
  z-index: 220;
  left: 50%;
  bottom: 30px;
  padding: 12px 15px;
  border-radius: 3px;
  background: var(--primary);
  color: var(--on-primary);
  font: 500 12.5px/1 var(--f-ui);
  font-stretch: 84%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  pointer-events: none;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ═══════════════════════════════════════════════════════════
   MOTION
   ═══════════════════════════════════════════════════════════ */
.swap {
  transition:
    opacity 0.28s ease,
    filter 0.28s ease;
}
body.swapping .swap {
  opacity: 0.1;
  filter: blur(3px);
}
.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .rv.in {
  opacity: 1;
  transform: none;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
@media (prefers-reduced-motion: reduce) {
  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .frame-amb,
  .frame-amb::before,
  .grain,
  .datacol > div,
  .cur,
  .dot::after,
  .btn .arc::before {
    animation: none;
  }
  .frame-scroll {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   SMALL SCREENS
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .role {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .role-copy {
    grid-column: 2;
  }
  .specs {
    grid-template-columns: 1fr 1fr;
  }
  .spec:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .spec:nth-child(n + 3) {
    border-top: 1px solid var(--hair);
    margin-top: 22px;
  }
  .win-main {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .hero-band .plate {
    aspect-ratio: 4 / 4.6;
  }
  .hud .tl,
  .hud .bl {
    left: 16px;
  }
  .hud .tr,
  .hud .br {
    right: 16px;
  }
  .hud .tr,
  .hud .bl {
    display: none;
  }
  .datacol {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--band-hair);
  }
  .split,
  .row .split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .feat {
    grid-template-columns: 1fr;
  }
  .feat-art {
    order: -1;
  }
  .feat:nth-child(even) .feat-copy {
    order: 0;
  }
  .role {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 0 26px;
  }
  .role-copy {
    grid-column: auto;
  }
  .role-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
  }
  .role-meta .label + .label {
    margin-top: 0;
  }
  .now {
    margin-top: 0;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .row > .label {
    padding-top: 0;
  }
  .cred {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .codes {
    grid-column: 2;
    justify-content: flex-start;
  }
  .cred-n {
    font-size: 26px;
  }
  .win-main {
    grid-template-columns: minmax(0, 1fr);
    height: 400px;
  }
  .win-side {
    display: none;
  }
  .win-term {
    padding: 14px 14px 14px;
  }
  .term-scroll {
    font-size: 11.5px;
  }
  .win-status .opt {
    display: none;
  }
  .foot-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
  }
  .foot-col.r {
    justify-items: center;
    text-align: center;
  }
  .foot-art {
    min-height: 92vw;
  }
}
@media (max-width: 480px) {
  .specs {
    grid-template-columns: 1fr;
  }
  .spec + .spec {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--hair);
    margin-top: 22px;
  }
  .lens {
    flex-direction: column;
    gap: 10px;
  }
  .lens-btn {
    padding: 9px 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   TECHNOMANCER — the v4 layer over the v2 system: two
   vocabularies, the dictionary entry, tenets, schools, familiars.
   ═══════════════════════════════════════════════════════════ */
/* One pitch, two vocabularies. Copy that differs carries both, and the body
   says which one shows. */
body[data-mode="lore"] .pl,
body[data-mode="plain"] .lo {
  display: none;
}
body[data-mode="plain"] .lens-seg::before {
  transform: translateX(100%);
}
.lo,
.pl,
.nav-link,
#cta-main {
  transition:
    opacity 0.28s ease,
    filter 0.28s ease;
}
body.swapping .lo,
body.swapping .pl,
body.swapping .nav-link,
body.swapping #cta-main {
  opacity: 0.1;
  filter: blur(3px);
}

/* ── The entry, set like a dictionary page ── */
.entry {
  width: min(100%, var(--col));
  margin-top: clamp(34px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.entry-pos span {
  opacity: 0.55;
}
.entry-word {
  margin-top: clamp(18px, 2.4vw, 28px);
}
.entry-syl {
  margin-top: clamp(20px, 2.6vw, 30px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 0.14em;
  font: 400 clamp(19px, 2.1vw, 26px) / 1.1 var(--f-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
}
.entry-syl i {
  font-style: normal;
  opacity: 0.7;
}
.entry-syl .ipa {
  margin-left: 0.9em;
  font: 400 14px/1.1 var(--f-mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
}
.senses {
  list-style: none;
  width: min(100%, 660px);
  margin-top: clamp(28px, 3.6vw, 42px);
  text-align: left;
  border-bottom: 1px solid var(--hair);
}
.senses li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 20px 0 22px;
  border-top: 1px solid var(--hair);
}
.sense-n {
  font: 300 24px/1 var(--f-display);
  color: var(--fg);
  opacity: 0.55;
}
.sense {
  font-size: 17.5px;
  line-height: 1.42;
  color: var(--text);
  text-wrap: pretty;
}
.senses li + li .sense {
  font-size: 15px;
  color: var(--text-2);
}
.usage {
  margin-top: 12px;
  font: italic 400 19px/1.34 "EB Garamond", Georgia, serif;
  color: var(--text-2);
  text-wrap: pretty;
}
.entry #sense,
.entry #usage {
  transition:
    opacity 0.26s ease,
    filter 0.26s ease;
}
.entry.sw #sense,
.entry.sw #usage {
  opacity: 0;
  filter: blur(4px);
}
.entry-etym {
  width: min(100%, 660px);
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  text-align: left;
  text-wrap: pretty;
}
.entry-etym .label {
  display: block;
  margin-bottom: 8px;
}
.entry-etym .nw {
  white-space: nowrap;
}
.entry-etym i {
  font: italic 400 16px/1 "EB Garamond", Georgia, serif;
  color: var(--text);
}
.entry-links {
  margin-top: 32px;
}
.entry-links .ic {
  width: 12px;
  height: 12px;
}

/* ── The headline band ── */
.band-eyebrow {
  padding-top: clamp(30px, 4.4vw, 50px);
}
.band-eyebrow + .band-fit {
  padding-top: clamp(18px, 2.4vw, 28px);
}

/* ── Premise: three tenets ── */
.tenets {
  list-style: none;
  margin-top: clamp(40px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
}
.tenet {
  padding: 24px 28px 6px 0;
}
.tenet + .tenet {
  padding-left: 28px;
  border-left: 1px solid var(--hair);
}
.tenet-n {
  font: 300 clamp(44px, 5vw, 66px) / 0.9 var(--f-display);
  color: var(--fg);
  opacity: 0.5;
}
.tenet h3 {
  margin-top: clamp(26px, 3.4vw, 44px);
  font: 400 clamp(26px, 2.5vw, 34px) / 1 var(--f-display);
  text-transform: uppercase;
  color: var(--fg);
  text-wrap: balance;
}
.tenet p {
  margin-top: 16px;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}

/* ── Schools: eight fields, one card each ── */
.schools {
  margin-top: clamp(40px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--hair);
}
.school {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 20px 22px 22px;
  border-top: 1px solid var(--hair);
}
.school:not(:nth-child(4n + 1)) {
  border-left: 1px solid var(--hair);
}
.school:hover {
  background: var(--row-hover);
}
.school-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.school-n {
  font: 300 34px/1 var(--f-display);
  color: var(--fg);
  opacity: 0.55;
}
.school-glyph {
  width: 40px;
  height: 40px;
  color: var(--fg);
  transition: transform 0.5s var(--ease);
}
.school:hover .school-glyph {
  transform: rotate(-8deg) scale(1.06);
}
.school-name {
  margin-top: clamp(34px, 4vw, 52px);
  font: 400 clamp(26px, 2.3vw, 32px) / 1 var(--f-display);
  text-transform: uppercase;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.school-plain {
  margin-top: 8px;
  color: var(--text-2);
}
.school-text {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.52;
  color: var(--text);
  text-wrap: pretty;
}
.school-where {
  margin-top: auto;
  padding-top: 22px;
  font: 400 11px/1.4 var(--f-mono);
  color: var(--text-2);
}

/* ── Artifacts: the seals and research rows sit on the band ── */
.seals {
  margin-top: clamp(12px, 2vw, 24px);
}
.band .row {
  border-top-color: var(--band-hair);
}
.band .row > .label {
  color: var(--band-fg-2);
}
.band .cred {
  border-bottom-color: var(--band-hair);
}
.band .cred-n,
.band .cred-name {
  color: var(--band-fg);
}
.band .code {
  border-color: var(--band-hair);
  color: var(--band-fg);
}

/* ── Familiars ── */
.creed {
  margin-top: clamp(30px, 4vw, 46px);
  font: 300 clamp(30px, 3.6vw, 50px) / 1.02 var(--f-display);
  text-transform: uppercase;
  color: var(--fg);
  text-wrap: balance;
}
.spells {
  list-style: none;
  display: grid;
  gap: 12px;
  padding-top: 5px;
}
.spells li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  max-width: 78ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}
.spells li::before {
  content: ":";
  font: 500 15px/1.5 var(--f-mono);
  color: var(--fg);
}

/* ── Lineage: each role names the schools it practised ── */
.role-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rtag {
  padding: 5px 7px;
  border: 1px solid var(--hair);
  border-radius: 1.75px;
  font: 700 8.5px/1 var(--f-ui);
  font-stretch: 125%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg);
}
.role.current .rtag {
  border-color: var(--fg);
}

.summon-specs {
  max-width: 1040px;
}

@media (max-width: 960px) {
  .schools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .school:not(:nth-child(4n + 1)) {
    border-left: 0;
  }
  .school:nth-child(even) {
    border-left: 1px solid var(--hair);
  }
  .school {
    min-height: 320px;
  }
}
@media (max-width: 767px) {
  .tenets {
    grid-template-columns: 1fr;
  }
  .tenet {
    padding: 22px 0 18px;
  }
  .tenet + .tenet {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--hair);
  }
  .tenet h3 {
    margin-top: 18px;
  }
  .entry-syl .ipa {
    flex-basis: 100%;
    margin: 8px 0 0;
    text-align: center;
  }
  .sense {
    font-size: 16.5px;
  }
  .usage {
    font-size: 18px;
  }
}
@media (max-width: 600px) {
  .schools {
    grid-template-columns: 1fr;
  }
  .school:nth-child(even) {
    border-left: 0;
  }
  .school {
    min-height: 0;
    padding: 20px 0 22px;
  }
  .school:hover {
    background: none;
  }
  .school-name {
    margin-top: 22px;
  }
}
@media (max-width: 480px) {
  .entry-links {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .entry-links .btn-p {
    grid-column: 1 / -1;
  }
  .senses li {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}
