/* Shell: floating header, the identity rail on the left, and ONE clearly raised container on the right.
   Work, About and every case study open by making that container grow over the rail
   (the header stays); Home folds it back. Used by index.html. */
html.shell {
  --stage: #1d1a22;
  --stage-line: rgba(244, 242, 244, .2);
  --hdr: rgba(26, 23, 29, .97);
  --bg: #060607;
  --shell-max: 1480px;
  --gutter: max(16px, calc((100vw - var(--shell-max)) / 2));
  --main-t: 82px;
  --main-s: 16px;
  --rail-w: 340px;
  --shadow-stage:
    0 1px 0 rgba(255, 255, 255, .1) inset,
    0 0 0 6px rgba(255, 255, 255, .03),
    0 70px 100px -30px rgba(0, 0, 0, .95),
    0 30px 50px -18px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(0, 0, 0, .6);
  --shadow-hdr: 0 18px 40px -14px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .07) inset;
}
html.shell[data-theme="light"] {
  --bg: #ffffff;
  --stage: #ffffff;
  --stage-line: rgba(20, 24, 32, .16);
  --hdr: #eceef1;
  --shadow-stage:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 0 0 6px rgba(20, 24, 32, .045),
    0 70px 90px -34px rgba(24, 30, 44, .55),
    0 28px 44px -18px rgba(24, 30, 44, .36),
    0 0 0 1px rgba(20, 24, 32, .12);
  --shadow-hdr: 0 18px 36px -16px rgba(24, 30, 44, .4), 0 0 0 1px rgba(20, 24, 32, .1);
}
html.shell, html.shell body { height: 100%; overflow: hidden; background: var(--bg); }
html.shell body { margin: 0; }

/* ---------- Header: no bar, just the home mark, Work | About and the presence chip.
   It shares the same max width as the rail and the container. ---------- */
.shell-header {
  position: fixed;
  top: 14px;
  right: var(--gutter);
  left: var(--gutter);
  z-index: 80;
  display: flex;
  height: 52px;
  align-items: center;
  gap: 18px;
  animation: hdr-in .6s cubic-bezier(.2, .8, .2, 1) backwards;
}
@keyframes hdr-in { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.brand { display: inline-flex; flex: none; align-items: center; color: var(--ink); }
.brand-mark {
  display: inline-grid;
  height: 44px;
  place-items: center;
  padding: 0 20px;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  background: var(--hdr);
  box-shadow: var(--shadow-hdr);
  font: 700 15px/1 "JetBrains Mono", monospace;
  letter-spacing: -.02em;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), background-color .25s ease, color .25s ease;
}
.brand:hover .brand-mark { transform: translateY(-1px) rotate(-1.5deg); background: var(--primary); color: var(--primary-ink); }
.shell-nav {
  position: absolute;
  left: 50%;
  display: flex;
  padding: 4px;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  background: var(--hdr);
  box-shadow: var(--shadow-hdr);
  transform: translateX(-50%);
}
.shell-nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 24px;
  border-radius: 999px;
  color: var(--ink-soft);
  font: 500 15px/1 "Outfit", sans-serif;
  transition: color .3s ease;
}
.shell-nav a:hover { color: var(--ink); }
.shell-nav a.is-active { color: var(--primary-ink); }
.nav-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transition: transform .5s cubic-bezier(.3, 1.35, .5, 1), width .5s cubic-bezier(.3, 1.35, .5, 1), opacity .3s ease;
}
.shell-actions { display: flex; flex: none; align-items: center; gap: 16px; margin-left: auto; }

/* Presence chip, big enough to notice */
.presence-chip.is-inline {
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  background: var(--hdr);
  box-shadow: var(--shadow-hdr);
  color: var(--ink);
  font: 500 14px/1 "Outfit", sans-serif;
}
.presence-chip.is-inline .presence-avs .presence-av { width: 30px; height: 30px; margin-left: -9px; border-color: var(--hdr); font-size: 12px; }
.presence-chip.is-inline .presence-avs .presence-av:first-child { margin-left: 0; }
.presence-chip.is-inline .presence-key { border-color: var(--line); background: var(--btn); color: var(--ink-soft); }

/* ---------- The "o" in Product is the light / dark switch ---------- */
.rail-home { color: inherit; }
.o-switch {
  position: relative;
  display: inline-block;
  width: 1.08em;
  height: .56em;
  margin: 0 .035em 0 .02em;
  padding: 0;
  vertical-align: baseline;
  border: .11em solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  box-shadow: inset 0 .05em .09em rgba(0, 0, 0, .55), 0 .03em 0 rgba(255, 255, 255, .12);
  transition: background-color .45s ease, box-shadow .45s ease;
  -webkit-tap-highlight-color: transparent;
}
.o-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(255, 255, 255, .04));
  opacity: .9;
  transition: opacity .45s ease;
}
.o-knob {
  position: absolute;
  top: 50%;
  left: .035em;
  width: .3em;
  height: .3em;
  margin-top: -.15em;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #ffffff 0 12%, #d9ccff 34%, #7c4dff 74%, #5b34e0 100%);
  box-shadow: 0 .05em .08em rgba(0, 0, 0, .6), inset 0 -.03em .05em rgba(0, 0, 0, .3), inset 0 .02em .02em rgba(255, 255, 255, .85);
  transform: translateX(.58em);
  transition: transform .55s cubic-bezier(.3, 1.6, .45, 1), background .4s ease;
}
.o-switch:hover .o-knob { scale: 1.12; }
.o-switch:active .o-knob { scale: .92; }
.o-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: .06em; }
html[data-theme="light"] .o-switch { box-shadow: inset 0 .05em .09em rgba(120, 40, 8, .5), 0 .03em 0 rgba(255, 255, 255, .9); }
html[data-theme="light"] .o-switch::before { background: linear-gradient(180deg, rgba(185, 166, 255, .95), rgba(255, 214, 196, .7)); }
html[data-theme="light"] .o-knob {
  transform: translateX(0);
  background: radial-gradient(circle at 32% 26%, #ffffff 0 12%, #e3d9ff 36%, #9a73ff 78%, #5b34e0 100%);
}

/* ---------- Layout: rail on the left, container on the right ---------- */
.shell-main {
  position: fixed;
  inset: var(--main-t) var(--gutter) var(--main-s);
  z-index: 10;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 32px;
}
html.shell .rail { position: relative; top: auto; height: 100%; min-height: 0; padding: 14px 0 6px 10px; overflow: hidden; }
html.shell .rail .rail-links { margin-top: auto; }
.stage-slot { position: relative; min-width: 0; min-height: 0; }

/* ---------- The raised container ---------- */
.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: 30px;
  background: var(--stage);
  box-shadow: var(--shadow-stage);
  animation: stage-in .7s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: .08s;
}
@keyframes stage-in { from { transform: translateY(34px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.stage.is-moving { position: fixed; inset: auto; z-index: 50; animation: none; }
.stage.is-expanded {
  position: fixed;
  inset: var(--main-t) var(--gutter) var(--main-s);
  z-index: 50;
  animation: none;
}
.stage-body { position: relative; flex: 1 1 auto; min-height: 0; }
.view { position: absolute; inset: 0; background: var(--stage); transition: opacity .4s ease; }
.view[hidden] { display: none; }
.view.is-pending { opacity: 0; }
.view.is-leaving { opacity: 0; transition: opacity .22s ease; }
.view > iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--stage); opacity: 0; transition: opacity .45s ease; }
.view > iframe.is-ready { opacity: 1; }

/* Skeleton loader while a page opens inside the container */
html.shell { --sk-a: rgba(255, 255, 255, .06); --sk-b: rgba(255, 255, 255, .14); }
html.shell[data-theme="light"] { --sk-a: rgba(20, 18, 20, .07); --sk-b: rgba(20, 18, 20, .14); }
.stage-loading { position: absolute; inset: 0; z-index: 9; display: block; overflow: hidden; padding: 56px 60px; background: var(--stage); }
.stage-loading[hidden] { display: none; }
.sk { display: grid; max-width: 1000px; gap: 16px; }
.sk > span {
  display: block;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--sk-a) 0%, var(--sk-b) 50%, var(--sk-a) 100%);
  background-size: 220% 100%;
  animation: sk-shimmer 1.35s ease-in-out infinite;
}
.sk-eyebrow { width: 130px; height: 13px; border-radius: 7px !important; }
.sk-title { width: 72%; height: 46px; }
.sk-title--short { width: 48%; }
.sk-text { width: 64%; height: 15px; border-radius: 8px !important; }
.sk-text--mid { width: 54%; }
.sk-text--short { width: 36%; }
.sk-block { width: 100%; height: 300px; margin-top: 18px; border-radius: 20px !important; }
@keyframes sk-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---------- Home view: two columns of equal-height tiles, the second column offset ---------- */
html.shell { --tile-h: clamp(340px, 58vh, 580px); --tile-gap: 16px; }
html.shell .stage .tiles {
  position: absolute;
  inset: 0;
  height: 100%;
  overflow-y: auto;
  padding: 0 18px;
  scrollbar-width: none;
}
html.shell .stage .tiles::-webkit-scrollbar { display: none; }
html.shell .tiles-set { gap: var(--tile-gap); padding-top: 0; }
html.shell .tiles-set + .tiles-set { margin-top: var(--tile-gap); }
html.shell .tile-col { gap: var(--tile-gap); }
html.shell .tile, html.shell .tile--tall { height: var(--tile-h); aspect-ratio: auto; border-radius: 16px; }
html.shell .tile-col:nth-child(2) { transform: translateY(calc(var(--tile-h) / 2 + var(--tile-gap) / 2)); }

@media (max-width: 1180px) {
  html.shell { --rail-w: 280px; }
  .shell-nav a { padding: 0 18px; }
}
@media (max-width: 980px) {
  .presence-chip.is-inline .presence-count { display: none; }
}
@media (max-width: 860px) {
  html.shell { --main-t: 78px; --main-s: 8px; --tile-h: 360px; }
  .shell-header { gap: 8px; height: 54px; padding: 0 8px 0 16px; }
  .brand-name { font-size: 15px; }
  .brand-dot { display: none; }
  .shell-nav { position: static; margin-left: auto; transform: none; }
  .shell-nav a { padding: 0 14px; min-height: 36px; }
  .shell-actions { margin-left: 0; gap: 8px; }
  .shell-actions .presence-chip { display: none; }
  .ts-track { width: 70px; height: 36px; }
  .ts-thumb { width: 26px; height: 26px; transform: translateX(34px); }
  html[data-theme="light"] .ts-thumb { transform: translateX(0); }
  .shell-main { grid-template-columns: 1fr; }
  html.shell .rail { display: none; }
  html.shell .tiles-set { grid-template-columns: 1fr; }
  html.shell .tile-col:nth-child(2) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shell-header, .stage { animation: none; }
  .nav-pill { transition: none; }
  .sk > span { animation: none; }
}

/* ---------- Rail title: Senior Product Designer is the big line, the name is small ---------- */
html.shell .rail-name { font-size: clamp(42px, 3.9vw, 58px); line-height: .98; }
html.shell .rail-status--name { font-size: 13px; }
html.shell .rail-status--name::before { display: none; }
@media (max-width: 860px) {
  html.shell { --gutter: 8px; --main-t: 70px; }
  .shell-header { height: 46px; gap: 10px; }
  .brand-mark { height: 38px; padding: 0 14px; font-size: 13px; }
  .shell-nav { position: static; margin-left: auto; transform: none; }
  .shell-nav a { padding: 0 16px; min-height: 34px; }
  .shell-actions { display: none; }
}
html.shell .rail-name .rail-home > span:not(.iw) { color: #7c4dff; }
html.shell[data-theme="light"] .rail-name .rail-home > span:not(.iw) { color: #e04a0c; }
.o-switch { font: inherit; letter-spacing: inherit; }
.word-nb { white-space: nowrap; }
html[data-theme="light"] .o-knob { background: radial-gradient(circle at 32% 26%, #ffffff 0 16%, #fafafc 36%, #e4e5ea 74%, #b9bcc6 100%); }

/* ---------- Phones: a compact introduction stays fixed above the container ---------- */
@media (max-width: 860px) {
  .shell-main { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  html.shell .rail {
    display: flex;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 2px 6px 0;
    overflow: visible;
  }
  html.shell .rail { gap: 8px 10px; padding: 4px 10px 2px; }
  html.shell .rail-status--name { width: 100%; margin: 0; color: var(--ink-mute); font-size: 12px; letter-spacing: .01em; }
  html.shell .rail-name { width: 100%; margin: 0; font-size: clamp(36px, 10.2vw, 46px); line-height: .98; letter-spacing: -.035em; }
  html.shell .rail-bio {
    display: -webkit-box;
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  html.shell .rail .rail-links { display: none; }
  html.shell .rail-actions { width: 100%; margin: 2px 0 0; gap: 8px; }
  html.shell .rail-actions .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }
  .shell-actions { display: none; }
}
@media (max-width: 860px) and (max-height: 700px) {
  html.shell .rail-bio { display: none; }
}
/* "Product" keeps the ink colour; only the full stop is yellow */
html.shell .rail-name > .word-nb { color: inherit; }

/* ---------- Cycling role badge (Designer, Lead, Design Manager, Engineer) in hot yellow ---------- */
.role-cycle {
  display: inline;
  padding: .02em .2em .08em;
  border-radius: .14em;
  background: var(--role, #7c4dff);
  color: #1a0900 !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: opacity .25s ease, transform .25s ease;
}
.role-cycle.is-swapping { opacity: 0; transform: translateY(.12em); }
html.shell .rail-name { line-height: 1.12; }
html.shell .rail-name .rail-home:hover .role-cycle { filter: brightness(1.08); }
@media (max-width: 860px) { html.shell .rail-bio { -webkit-line-clamp: 3; } }
@media (prefers-reduced-motion: reduce) { .role-cycle { transition: none; } }

/* Say hi is the hot yellow call to action; Resume stays gray */
html.shell .btn--light, html[data-theme="light"] .btn--light { background: #7c4dff; color: #ffffff; }
html.shell .btn--light:hover, html[data-theme="light"] .btn--light:hover { background: #5b34e0; }

/* ---------- Hand-written note on the rail: what I'm building right now ---------- */
.rail-scribble {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  align-self: flex-start;
  margin: 26px 0 6px 4px;
  color: #ffe28a;
  font-family: "Caveat", cursive;
  transform: rotate(-4deg);
  transform-origin: left bottom;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.rail-scribble:hover { transform: rotate(-1deg) scale(1.05); }
.rs-arrow { width: 48px; height: 42px; margin-bottom: 2px; flex: none; }
.rs-text { display: grid; line-height: .95; }
.rs-small { font-size: 22px; font-weight: 500; opacity: .95; }
/* Yellow, so the note stands out against the purple accent (amber on light for contrast) */
.rs-big { color: #ffd54a; }
html[data-theme="light"] .rs-big { color: #9a5200; }
.rs-big {
  position: relative;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .01em;
}
.rs-big::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -4px;
  bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5c10-5 18 4 28-1s18 4 28-1 18 4 28-1 18 4 33 0' fill='none' stroke='%23ffd54a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
html[data-theme="light"] .rail-scribble { color: #9a5200; }
html[data-theme="light"] .rs-big::after { filter: saturate(.9) brightness(.82); }
@media (max-width: 860px) { .rail-scribble { display: none; } }

/* Role badge: one line, fixed line height, so swapping words never moves the page */
.role-cycle { display: inline-block; white-space: nowrap; line-height: 1; vertical-align: baseline; }

/* ---------- Home tiles: the caption sits UNDER the picture, not on top of it ---------- */
html.shell .tile { display: flex; flex-direction: column; }
html.shell .tile-media { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; }
html.shell .tile-cap {
  position: relative;
  right: auto; bottom: auto; left: auto;
  flex: 0 0 auto;
  gap: 4px;
  padding: 12px 16px 13px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
html.shell .tile:hover .tile-cap, html.shell .tile:focus-visible .tile-cap { transform: none; }
html.shell .tile-title { display: -webkit-box; overflow: hidden; font-size: clamp(15px, 1.2vw, 17px); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
html.shell .tile-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- SENIOR PRODUCT in capitals; the role word below keeps its own case ---------- */
html.shell .rail-name > .rail-home:first-child, html.shell .rail-name .word-nb { text-transform: uppercase; letter-spacing: -.02em; }
html.shell .rail-name { font-size: clamp(38px, 3.5vw, 54px); }
@media (max-width: 860px) { html.shell .rail-name { font-size: clamp(32px, 9vw, 42px); } }

/* ---------- Light / dark: a flip switch shaped like the O, and a hand that reaches in to flip it ----------
   Dark: the lever is down and the hand comes up from below. Light: lever up, hand comes down from above. */
.o-switch {
  width: .54em;
  height: .74em;
  margin: 0 .03em;
  border: .085em solid currentColor;
  border-radius: .2em;
  overflow: visible;
  vertical-align: baseline;
  perspective: 2.2em;
  box-shadow: inset 0 .04em .08em rgba(0, 0, 0, .55);
}
.o-switch::before { display: none; }
.o-knob { display: none; }
.o-plate { position: absolute; inset: .05em; border-radius: .11em; background: linear-gradient(180deg, #19161b, #2c2830 50%, #19161b); transform-style: preserve-3d; overflow: hidden; }
.o-lever {
  position: absolute; left: .05em; right: .05em; height: .3em;
  border-radius: .07em;
  background: linear-gradient(180deg, #d9ccff, #7c4dff 55%, #5b34e0);
  box-shadow: 0 .03em .05em rgba(0, 0, 0, .6), inset 0 .015em 0 rgba(255, 255, 255, .7);
  transform-origin: 50% 50%;
  top: 50%;
  transform: translateY(.02em) rotateX(-38deg);
  transition: transform .5s cubic-bezier(.3, 1.6, .45, 1), background .4s ease;
}
html[data-theme="light"] .o-plate { background: linear-gradient(180deg, #fff, #eceef1 50%, #d9dbe0); }
html[data-theme="light"] .o-lever { transform: translateY(-.32em) rotateX(38deg); }
.o-switch:hover .o-lever { filter: brightness(1.08); }

/* the hand */
.o-finger {
  position: absolute; left: 50%; z-index: 3;
  width: .5em; height: .75em; margin-left: -.18em;
  top: 78%;
  opacity: 0; pointer-events: none;
  filter: drop-shadow(0 .05em .05em rgba(0, 0, 0, .45));
  transform-origin: 50% 0;
  transform: translate(.22em, .45em) rotate(16deg) rotateX(55deg) scale(.8);
  transition: opacity .2s ease, transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
html[data-theme="light"] .o-finger { top: auto; bottom: 78%; transform-origin: 50% 50%; transform: translate(.22em, -.45em) rotate(164deg) rotateX(55deg) scale(.8); }
@media (hover: hover) and (pointer: fine) {
  .o-switch:hover .o-finger, .o-switch:focus-visible .o-finger { opacity: 1; transform: translate(0, 0) rotate(8deg) rotateX(0) scale(1); animation: o-poke 1.25s ease-in-out .35s infinite; }
  html[data-theme="light"] .o-switch:hover .o-finger, html[data-theme="light"] .o-switch:focus-visible .o-finger { transform: translate(0, 0) rotate(172deg) rotateX(0) scale(1); animation-name: o-poke-down; }
}
/* hovering: the fingertip nudges the lever, as if about to flip it */
@keyframes o-poke { 0%, 100% { translate: 0 0; } 45% { translate: 0 -.07em; } 60% { translate: 0 -.05em; } }
@keyframes o-poke-down { 0%, 100% { translate: 0 0; } 45% { translate: 0 .07em; } 60% { translate: 0 .05em; } }
/* clicking: a firm flick, then the hand pulls back */
.o-switch.is-flipping .o-finger { opacity: 1; animation: o-flick-up .72s cubic-bezier(.3, .7, .2, 1) both !important; }
html[data-theme="light"] .o-switch.is-flipping .o-finger { animation-name: o-flick-down !important; }
@keyframes o-flick-up {
  0% { opacity: 1; transform: translate(0, 0) rotate(8deg); }
  28% { opacity: 1; transform: translate(0, -.2em) rotate(-4deg) scale(.96); }
  55% { opacity: 1; transform: translate(.04em, -.08em) rotate(10deg); }
  100% { opacity: 0; transform: translate(.22em, .45em) rotate(16deg) rotateX(55deg) scale(.8); }
}
@keyframes o-flick-down {
  0% { opacity: 1; transform: translate(0, 0) rotate(172deg); }
  28% { opacity: 1; transform: translate(0, .2em) rotate(184deg) scale(.96); }
  55% { opacity: 1; transform: translate(.04em, .08em) rotate(170deg); }
  100% { opacity: 0; transform: translate(.22em, -.45em) rotate(164deg) rotateX(55deg) scale(.8); }
}
.o-switch.is-flipping .o-lever { transition-duration: .42s; }
/* the hand may reach outside the title */
html.shell .rail-name, html.shell .rail-name .word-nb { overflow: visible; }
@media (prefers-reduced-motion: reduce) { .o-lever, .o-finger { transition: none; animation: none !important; } }

/* ---------- The O as a real wall light switch, lying on its side ----------
   Grey plastic frame, brushed-metal face, two LED strips that light up in light mode,
   and a toggle that tips left (off, dark) or right (on, light). */
html.board-cursor .o-switch, html.board-cursor .o-switch * { cursor: none !important; } /* the hand replaces your cursor here */
html:has(.o-switch:hover) .pc-halo { opacity: 0 !important; }
.o-switch {
  width: .98em;
  height: .66em;
  margin: 0 .04em;
  border: 0;
  border-radius: .12em;
  background: linear-gradient(160deg, #f4f4f2 0%, #dcdcd8 45%, #b9b9b4 100%);
  box-shadow: 0 .05em .09em rgba(0, 0, 0, .55), inset 0 .015em 0 rgba(255, 255, 255, .9), inset 0 -.02em .02em rgba(0, 0, 0, .25);
  perspective: 1.6em;
}
.o-plate {
  inset: .085em;
  border-radius: .06em;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, rgba(0, 0, 0, .04) 1px 2px),
    linear-gradient(180deg, #e9ecee, #c4c9cd 55%, #dfe3e6);
  box-shadow: inset 0 .02em .04em rgba(0, 0, 0, .45), inset 0 -.01em 0 rgba(255, 255, 255, .7);
  overflow: hidden;
}
html[data-theme="light"] .o-plate { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, rgba(0, 0, 0, .04) 1px 2px), linear-gradient(180deg, #f1f3f4, #ccd1d4 55%, #e6e9eb); }
/* LED strips: grey when off, warm white and glowing when on */
.o-led {
  position: absolute; left: 14%; right: 14%; height: .055em;
  border-radius: .03em;
  background: linear-gradient(90deg, #aeb3b6, #c9cdd0, #aeb3b6);
  box-shadow: inset 0 .01em .01em rgba(0, 0, 0, .3);
  transition: background .35s ease, box-shadow .35s ease;
}
.o-led--t { top: .05em; }
.o-led--b { bottom: .05em; }
html[data-theme="light"] .o-led {
  background: linear-gradient(90deg, #fff7d6, #ffffff, #fff7d6);
  box-shadow: 0 0 .08em .02em rgba(255, 236, 160, .95), 0 0 .2em .05em rgba(255, 214, 120, .55);
}
/* toggle: a small rounded base with a bat that tips left or right */
.o-base {
  position: absolute; left: 50%; top: 50%;
  width: .26em; height: .2em; margin: -.1em 0 0 -.13em;
  border-radius: .05em;
  background: linear-gradient(180deg, #f2f2ef, #c9c9c4);
  box-shadow: 0 .015em .03em rgba(0, 0, 0, .45), inset 0 .01em 0 rgba(255, 255, 255, .9);
  transform-style: preserve-3d;
}
.o-lever {
  position: absolute; top: 50%; left: 50%;
  width: .2em; height: .1em; margin: -.05em 0 0 -.1em;
  border-radius: .04em;
  background: linear-gradient(90deg, #fbfbf8, #e3e3de 50%, #b8b8b2);
  box-shadow: -.03em .02em .03em rgba(0, 0, 0, .45);
  transform-origin: 50% 50%;
  transform: translateX(-.035em) rotateY(-48deg);
  transition: transform .45s cubic-bezier(.3, 1.6, .45, 1), box-shadow .45s ease;
}
html[data-theme="light"] .o-lever {
  transform: translateX(.035em) rotateY(48deg);
  background: linear-gradient(90deg, #b8b8b2, #e3e3de 50%, #fbfbf8);
  box-shadow: .03em .02em .03em rgba(0, 0, 0, .45);
}
.o-switch:hover .o-lever { filter: none; }
.o-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: .08em; }

/* the hand always comes up from below; it pushes the toggle toward the other side */
html[data-theme="light"] .o-finger { top: 64%; bottom: auto; transform-origin: 50% 0; transform: translate(.22em, .45em) rotate(16deg) rotateX(55deg) scale(.8); }
.o-finger { top: 64%; margin-left: -.2em; }
@media (hover: hover) and (pointer: fine) {
  .o-switch:hover .o-finger, .o-switch:focus-visible .o-finger { animation-name: o-poke-right; transform: translate(-.04em, 0) rotate(-6deg) rotateX(0) scale(1); }
  html[data-theme="light"] .o-switch:hover .o-finger, html[data-theme="light"] .o-switch:focus-visible .o-finger { animation-name: o-poke-left; transform: translate(.04em, 0) rotate(6deg) rotateX(0) scale(1); }
}
@keyframes o-poke-right { 0%, 100% { translate: 0 0; rotate: 0deg; } 45% { translate: .05em -.02em; rotate: 5deg; } 60% { translate: .035em -.01em; rotate: 3deg; } }
@keyframes o-poke-left { 0%, 100% { translate: 0 0; rotate: 0deg; } 45% { translate: -.05em -.02em; rotate: -5deg; } 60% { translate: -.035em -.01em; rotate: -3deg; } }
.o-switch.is-flipping .o-finger, html[data-theme="light"] .o-switch.is-flipping .o-finger { animation-name: o-flick-side !important; }
/* flick: the tip sweeps across the toggle, then the hand drops away */
@keyframes o-flick-side {
  0% { opacity: 1; transform: translate(var(--fx0, -.04em), 0) rotate(var(--fr0, -6deg)); }
  30% { opacity: 1; transform: translate(var(--fx1, .14em), -.03em) rotate(var(--fr1, 10deg)) scale(.97); }
  55% { opacity: 1; transform: translate(var(--fx1, .14em), 0) rotate(var(--fr1, 10deg)); }
  100% { opacity: 0; transform: translate(.22em, .45em) rotate(16deg) rotateX(55deg) scale(.8); }
}
/* going from light to dark the sweep runs the other way (the class is set before the theme changes) */
.o-switch.is-flipping.to-dark { --fx0: .04em; --fr0: 6deg; --fx1: -.14em; --fr1: -10deg; }
@media (max-width: 860px) { .o-switch { width: .92em; height: .62em; } }
/* a bigger, clearer toggle */
.o-base { width: .32em; height: .26em; margin: -.13em 0 0 -.16em; border-radius: .06em; box-shadow: 0 .02em .04em rgba(0, 0, 0, .55), inset 0 .012em 0 rgba(255, 255, 255, .95), inset 0 -.015em .02em rgba(0, 0, 0, .2); }
.o-lever { width: .26em; height: .15em; margin: -.075em 0 0 -.13em; border-radius: .05em; box-shadow: -.05em .03em .05em rgba(0, 0, 0, .55), inset .01em 0 0 rgba(255, 255, 255, .9); }
html[data-theme="light"] .o-lever { box-shadow: .05em .03em .05em rgba(0, 0, 0, .55), inset -.01em 0 0 rgba(255, 255, 255, .9); }

/* ---------- The O as a sliding switch: a wide pill with a round knob ----------
   Dark: night track with stars, the knob sits right and shows a moon.
   Light: day sky, the knob slides left and shows a sun. */
.o-plate, .o-led, .o-base, .o-lever { display: none !important; }
.o-switch {
  width: 1.22em;
  height: .64em;
  margin: 0 .05em;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: 0 .04em .08em rgba(0, 0, 0, .5);
  perspective: none;
}
.o-track {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, #14122a, #2b2552);
  box-shadow: inset 0 .04em .08em rgba(0, 0, 0, .65), inset 0 0 0 .04em rgba(255, 255, 255, .12);
  transition: background .45s ease;
}
html[data-theme="light"] .o-track { background: linear-gradient(180deg, #8fd3f4, #c9ecff); box-shadow: inset 0 .04em .08em rgba(20, 70, 110, .35), inset 0 0 0 .04em rgba(255, 255, 255, .6); }
.o-star { position: absolute; width: .045em; height: .045em; border-radius: 50%; background: #fff; box-shadow: 0 0 .04em #fff; transition: opacity .35s ease, transform .45s ease; }
.o-star--1 { left: 18%; top: 28%; }
.o-star--2 { left: 34%; top: 62%; width: .035em; height: .035em; }
.o-star--3 { left: 46%; top: 30%; width: .03em; height: .03em; }
.o-cloud { position: absolute; right: 16%; top: 40%; width: .3em; height: .12em; border-radius: 999px; background: #fff; opacity: 0; transform: translateX(.2em); transition: opacity .35s ease, transform .45s ease; }
.o-cloud::before { content: ""; position: absolute; left: .06em; bottom: .05em; width: .14em; height: .14em; border-radius: 50%; background: #fff; }
html[data-theme="light"] .o-star { opacity: 0; transform: translateY(.1em); }
html[data-theme="light"] .o-cloud { opacity: .95; transform: none; }
.o-thumb {
  position: absolute; top: .06em; left: .06em;
  display: grid; place-items: center;
  width: .52em; height: .52em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e6e4f2 60%, #b9b6cc);
  box-shadow: 0 .04em .07em rgba(0, 0, 0, .55), inset 0 -.02em .03em rgba(0, 0, 0, .2);
  transform: translateX(.58em);
  transition: transform .5s cubic-bezier(.3, 1.5, .45, 1), background .4s ease;
}
html[data-theme="light"] .o-thumb { transform: translateX(0); background: radial-gradient(circle at 35% 30%, #fff7d6, #ffd54a 55%, #ff9f1c); }
.o-ico { position: absolute; width: .34em; height: .34em; transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.5, .45, 1); }
.o-moon { fill: #6b6890; opacity: 1; transform: rotate(0deg) scale(1); }
.o-sun { fill: #c95a00; stroke: #c95a00; opacity: 0; transform: rotate(-90deg) scale(.5); }
html[data-theme="light"] .o-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
html[data-theme="light"] .o-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.o-switch:hover .o-thumb { box-shadow: 0 .05em .1em rgba(0, 0, 0, .6), 0 0 0 .04em rgba(255, 255, 255, .25), inset 0 -.02em .03em rgba(0, 0, 0, .2); }
.o-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: .08em; }

/* the hand comes up from below the knob and pushes it across */
.o-finger { top: 66%; left: auto; right: .02em; margin-left: 0; }
html[data-theme="light"] .o-finger { top: 66%; right: auto; left: .02em; }
@media (hover: hover) and (pointer: fine) {
  .o-switch:hover .o-finger, .o-switch:focus-visible .o-finger { animation-name: o-poke-left; transform: translate(.02em, 0) rotate(6deg) rotateX(0) scale(1); }
  html[data-theme="light"] .o-switch:hover .o-finger, html[data-theme="light"] .o-switch:focus-visible .o-finger { animation-name: o-poke-right; transform: translate(-.02em, 0) rotate(-6deg) rotateX(0) scale(1); }
}
/* dark to light: the knob goes left; light to dark: it goes right */
.o-switch.is-flipping.to-light { --fx0: .02em; --fr0: 6deg; --fx1: -.5em; --fr1: -8deg; }
.o-switch.is-flipping.to-dark { --fx0: -.02em; --fr0: -6deg; --fx1: .5em; --fr1: 8deg; }
@media (max-width: 860px) { .o-switch { width: 1.12em; height: .6em; } .o-thumb { width: .48em; height: .48em; } html:not([data-theme="light"]) .o-thumb { transform: translateX(.52em); } }
@media (prefers-reduced-motion: reduce) { .o-thumb, .o-ico, .o-star, .o-cloud, .o-track { transition: none; } }

/* ---------- When a page fails to load inside the container ----------
   A plug and socket that keep trying to connect, then the message and two ways forward. */
.stage-error {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 24px; text-align: center;
  background: var(--stage);
  animation: se-in .35s ease both;
}
@keyframes se-in { from { opacity: 0; } to { opacity: 1; } }
.se-scene { position: relative; width: 220px; height: 90px; margin-bottom: 8px; }
.se-cord { position: absolute; top: 43px; height: 4px; border-radius: 4px; background: var(--ink-mute); }
.se-cord--a { left: 0; width: 70px; }
.se-cord--b { right: 0; width: 70px; }
.se-plug { position: absolute; top: 28px; width: 38px; height: 34px; border-radius: 10px; background: linear-gradient(180deg, #b9a6ff, #7c4dff 60%, #5b34e0); box-shadow: 0 8px 16px rgba(0, 0, 0, .35); }
.se-plug--a { left: 66px; animation: se-try-a 2.4s cubic-bezier(.6, 0, .3, 1) infinite; }
.se-plug--a::after { content: ""; position: absolute; right: -10px; top: 9px; width: 10px; height: 4px; border-radius: 2px; background: #c9c3cb; box-shadow: 0 12px 0 #c9c3cb; }
.se-plug--b { right: 66px; border-radius: 10px; background: linear-gradient(180deg, #3a363e, #26232a); animation: se-try-b 2.4s cubic-bezier(.6, 0, .3, 1) infinite; }
html[data-theme="light"] .se-plug--b { background: linear-gradient(180deg, #d7d9de, #b9bcc4); }
.se-spark { position: absolute; left: 50%; top: 36px; width: 18px; height: 18px; margin-left: -9px; background: radial-gradient(circle, #ffd54a 0 30%, transparent 70%); opacity: 0; animation: se-spark 2.4s ease infinite; }
@keyframes se-try-a { 0%, 100% { transform: translateX(0); } 40%, 55% { transform: translateX(14px); } }
@keyframes se-try-b { 0%, 100% { transform: translateX(0); } 40%, 55% { transform: translateX(-14px); } }
@keyframes se-spark { 0%, 38% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; transform: scale(1.2); } 60%, 100% { opacity: 0; transform: scale(.6); } }
.se-title { color: var(--ink); font: 600 22px/1.25 "Outfit", sans-serif; }
.se-text { max-width: 36ch; margin: 0; color: var(--ink-soft); font: 400 15px/1.5 "Outfit", sans-serif; }
.se-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.se-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--btn, transparent); color: var(--ink); font: 600 14px "Outfit", sans-serif; text-decoration: none; cursor: pointer; }
.se-btn--primary { border-color: transparent; background: #7c4dff; color: #ffffff; }
.se-btn--primary:hover { background: #5b34e0; }
.se-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .stage-error, .se-plug, .se-spark { animation: none; } }

/* The switch matches the capital letters' height (Outfit cap height is about .7em) and is a little wider */
.o-switch { width: 1.34em; height: .7em; vertical-align: .065em; }
.o-thumb { top: .07em; left: .07em; width: .56em; height: .56em; transform: translateX(.64em); }
html[data-theme="light"] .o-thumb { transform: translateX(0); }
.o-ico { width: .36em; height: .36em; }
@media (max-width: 860px) {
  .o-switch { width: 1.26em; height: .7em; }
  .o-thumb { width: .56em; height: .56em; }
  html:not([data-theme="light"]) .o-thumb { transform: translateX(.56em); }
}

/* Optical size: a pill looks shorter than flat-topped capitals, so (like the letter O itself) it overshoots
   the cap height slightly and is centred on the capitals: cap height .7em, centre .35em above the baseline. */
.o-switch { width: 1.44em; height: .8em; vertical-align: -.05em; }
.o-thumb { top: .075em; left: .075em; width: .65em; height: .65em; transform: translateX(.64em); }
html[data-theme="light"] .o-thumb { transform: translateX(0); }
.o-ico { width: .4em; height: .4em; }
@media (max-width: 860px) {
  .o-switch { width: 1.36em; height: .8em; }
  .o-thumb { width: .65em; height: .65em; }
  html:not([data-theme="light"]) .o-thumb { transform: translateX(.56em); }
}

/* Phones: breathing room above and below the container (home and open case studies), clear of the home bar */
@media (max-width: 860px) {
  html.shell { --main-t: 78px; --main-s: calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* The changing role word is in capitals too, like SENIOR PRODUCT above it */
html.shell .rail-name .role-cycle { text-transform: uppercase; letter-spacing: -.02em; }

/* Phones: scrolling content stops short of the container's top and bottom edges instead of running into them */
@media (max-width: 860px) {
  .stage-body { margin: 14px 0; }
}


/* ---------- Pull cord: a light switch hanging from the top of the screen ---------- */
.pull {
  --pull: 0px;
  --cord: 56px;
  position: fixed;
  top: 0;
  left: calc(var(--gutter) + 196px);
  z-index: 60;
  width: 44px;
  height: calc(var(--cord) + 30px);
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  transform-origin: 50% 0;
  -webkit-tap-highlight-color: transparent;
}
.pull:active, .pull.is-dragging { cursor: grabbing; }
.pull-cord {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: calc(var(--cord) + var(--pull));
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--pull-cord, rgba(244, 242, 244, .5)) 18px);
  transition: height .5s cubic-bezier(.3, 1.7, .4, 1);
}
.pull-bead {
  position: absolute;
  top: calc(var(--cord) + var(--pull) - 2px);
  left: 50%;
  width: 14px;
  height: 22px;
  margin-left: -7px;
  border-radius: 8px;
  background: radial-gradient(circle at 35% 28%, #ffffff 0 10%, #d9ccff 32%, #7c4dff 72%, #5b34e0 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .45), inset 0 -2px 3px rgba(0, 0, 0, .25);
  transition: top .5s cubic-bezier(.3, 1.7, .4, 1), scale .2s ease;
}
html[data-theme="light"] .pull { --pull-cord: rgba(20, 18, 20, .45); }
html[data-theme="light"] .pull-bead { box-shadow: 0 4px 8px rgba(120, 40, 8, .3), inset 0 -2px 3px rgba(0, 0, 0, .2); }
.pull.is-dragging .pull-cord, .pull.is-dragging .pull-bead { transition: none; }
.pull:hover .pull-bead, .pull:focus-visible .pull-bead { scale: 1.12; }
.pull:hover:not(.is-dragging):not(.is-snapping) { animation: pull-sway 1.6s ease-in-out infinite; }
.pull:focus-visible { outline: none; }
.pull:focus-visible .pull-bead { outline: 2px solid var(--accent, #7c4dff); outline-offset: 3px; }
.pull.is-snapping .pull-cord { animation: pull-cord .7s cubic-bezier(.3, 1.6, .4, 1); }
.pull.is-snapping .pull-bead { animation: pull-bead .7s cubic-bezier(.3, 1.6, .4, 1); }
.pull.is-snapping { animation: pull-swing .9s ease-out; }
@keyframes pull-sway { 0%, 100% { rotate: 0deg; } 30% { rotate: 3deg; } 70% { rotate: -3deg; } }
@keyframes pull-cord { 0% { height: var(--cord); } 22% { height: calc(var(--cord) + 30px); } 100% { height: var(--cord); } }
@keyframes pull-bead { 0% { top: calc(var(--cord) - 2px); } 22% { top: calc(var(--cord) + 28px); } 100% { top: calc(var(--cord) - 2px); } }
@keyframes pull-swing { 0%, 30% { rotate: 0deg; } 50% { rotate: 6deg; } 70% { rotate: -4deg; } 85% { rotate: 2deg; } 100% { rotate: 0deg; } }
@media (max-width: 860px) {
  .pull { --cord: 46px; left: calc(50% - 30px); }
}
@media (prefers-reduced-motion: reduce) {
  .pull, .pull-cord, .pull-bead { animation: none !important; transition: none !important; }
}

/* The pull cord is for every page except Home (Home has the O switch). It drops in from the top when you leave Home. */
.pull { transition: translate .45s cubic-bezier(.3, 1.5, .45, 1), opacity .25s ease; }
html.on-home .pull { translate: 0 -110%; opacity: 0; pointer-events: none; visibility: hidden; transition: translate .3s ease, opacity .2s ease, visibility 0s .3s; }
.pull.is-arriving { animation: pull-swing 1s ease-out .3s; }

/* ---------- Home tiles: spotlight. Hover one and the rest step back slightly ---------- */
html.shell .tiles .tile { transition: opacity .35s ease, filter .35s ease; }
html.shell .tiles.is-spotlight .tile:not(.is-lit) { opacity: .62; filter: saturate(.75); }
@media (prefers-reduced-motion: reduce) { html.shell .tiles .tile { transition: none; } }


/* Phones: the gap above and below an open page takes that page's own background, so there is no grey band */
@media (max-width: 860px) {
  .stage.is-expanded { background: var(--frame-bg, var(--stage)); }
}

/* Same place in every browser: align the switch by the line's middle (not by an empty button's baseline, which
   phones place differently) and lift it so its centre sits on the middle of the capitals (cap height .71em, x-height .5em) */
html.shell .o-switch { vertical-align: middle; position: relative; top: -.103em; }

/* Accent buttons: a purple gradient, white text */
html.shell .btn--light, html[data-theme="light"] .btn--light, .se-btn--primary { background-image: linear-gradient(135deg, #7c4dff 0%, #4b2bd1 100%); color: #fff; }
html.shell .btn--light:hover, html[data-theme="light"] .btn--light:hover, .se-btn--primary:hover { background-image: none; }

/* Home tiles stand clear of the container in both themes: a visible edge and a caption surface of its own */
html.shell .tiles .tile { box-shadow: 0 0 0 1px rgba(244, 242, 244, .22); background: #121114; }
html.shell .tiles .tile-cap { background: #17161b; }
html[data-theme="light"].shell .tiles .tile { box-shadow: 0 0 0 1px rgba(20, 24, 32, .24), 0 8px 22px rgba(20, 24, 32, .08); background: #eceef1; }
html[data-theme="light"].shell .tiles .tile-cap { background: #f5f6f9; border-color: rgba(20, 24, 32, .2); }
