/* trevor's site — hand-written css, no frameworks. spider-verse / the spot. */

:root {
  --paper: #f3efe4;
  --paper-2: #fbf9f3;
  --ink: #111015;
  --muted: #55525e;
  --pink: #ff2e88;
  --cyan: #19d3e6;
  --yellow: #ffe03a;
  --violet: #7b4dff;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Bangers", "Impact", sans-serif;
  --blob-a: 62% 38% 55% 45% / 52% 60% 40% 48%;
  --blob-b: 45% 55% 38% 62% / 58% 42% 58% 42%;
  --blob-c: 55% 45% 63% 37% / 40% 55% 45% 60%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { background: var(--yellow); text-decoration-color: var(--ink); }

::selection { background: var(--pink); color: #fff; }

/* ---------- header ---------- */
.top {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: -4px 2px 0 var(--cyan), 4px -2px 0 var(--pink);
}
.logo a { color: inherit; text-decoration: none; }
.logo a:hover { background: none; }

/* random slice glitch, toggled by js */
.logo.glitching { animation: slice 0.36s steps(1) 1; }
@keyframes slice {
  0%   { transform: translate(-8px, 0) skewX(-6deg); text-shadow: 7px 0 var(--cyan), -7px 0 var(--pink); }
  20%  { transform: translate(10px, -2px) skewX(4deg); text-shadow: -9px 2px var(--yellow), 6px -2px var(--cyan); }
  40%  { transform: translate(-5px, 2px) skewX(-8deg); text-shadow: -8px 0 var(--cyan), 5px 0 var(--pink); }
  60%  { transform: translate(6px, 0) skewX(3deg); text-shadow: 4px 3px var(--pink), -6px -3px var(--cyan); }
  80%  { transform: translate(-2px, 0); }
  100% { transform: none; }
}

.tagline {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- nav as ink spots ---------- */
.nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav a {
  display: grid;
  place-items: center;
  width: 92px;
  height: 78px;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--blob-a);
  transition: transform 0.15s steps(3);
}
.nav a:nth-child(2) { border-radius: var(--blob-b); }
.nav a:nth-child(3) { border-radius: var(--blob-c); }
.nav a:hover { background: var(--ink); transform: scale(1.12) rotate(-6deg); box-shadow: -5px 3px 0 var(--cyan), 5px -3px 0 var(--pink); }
.nav a[aria-current="page"] { box-shadow: -5px 3px 0 var(--cyan), 5px -3px 0 var(--pink); color: var(--yellow); }

/* ---------- layout ---------- */
main {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 40px auto 0;
  padding: 0 20px;
  display: grid;
  gap: 46px;
}

/* ---------- comic panels with boiling ink borders ---------- */
.panel {
  position: relative;
  background: var(--paper-2);
  padding: 34px 28px 26px;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid var(--ink);
  filter: url(#boil);
  pointer-events: none;
}
.panel { box-shadow: 9px 9px 0 var(--shadow, var(--ink)); }
.panel.pink { --shadow: var(--pink); }
.panel.cyan { --shadow: var(--cyan); }
.panel.violet { --shadow: var(--violet); }
.panel:nth-of-type(2n) { transform: rotate(0.35deg); }
.panel:nth-of-type(2n + 1) { transform: rotate(-0.3deg); }

.caption {
  position: absolute;
  top: -16px;
  left: 22px;
  z-index: 1;
  background: var(--yellow);
  border: 3px solid var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  transform: rotate(-1.5deg);
}

.panel > :not(.caption):first-of-type { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  text-shadow: -3px 1px 0 var(--cyan), 3px -1px 0 var(--pink);
}
h3 { font-size: 18px; margin: 18px 0 4px; }

.lede { font-size: 19px; font-weight: 600; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--cyan);
  border: 2px solid var(--ink);
  padding: 0 7px;
  margin-right: 4px;
  transform: rotate(-2deg);
}
.pill.pink { background: var(--pink); color: #fff; }
.pill.gold { background: var(--yellow); }
.pill.violet { background: var(--violet); color: #fff; }

/* ---------- hero with the spot portal ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.portal {
  position: relative;
  aspect-ratio: 1;
  max-width: 340px;
  justify-self: center;
  width: 100%;
}
.portal::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: var(--ink);
  border-radius: var(--blob-a);
  transform: translate(-7px, 5px);
  box-shadow: 10px -6px 0 var(--pink), -14px 8px 0 var(--cyan);
  animation: morph 8s ease-in-out infinite alternate;
}
#cam {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--blob-a);
  animation: morph 8s ease-in-out infinite alternate;
  cursor: crosshair;
  background: #000;
}
.portal-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
}

/* ---------- lists ---------- */
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 9px 0; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); }
.log time { font-family: var(--mono); font-weight: 600; color: var(--pink); margin-right: 10px; font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 26px;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.comic {
  display: block;
  position: relative;
  background: #fff;
  border: 3px solid var(--ink);
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2);
}
.comic:hover { background: #fff; transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 4px 9px 0 var(--pink), 10px 3px 0 var(--cyan); }
.comic h3 { margin-top: 10px; }
.comic p { margin: 0; color: var(--muted); font-size: 14.5px; }
.comic .pow {
  position: absolute;
  top: -16px;
  right: -12px;
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 1px 9px;
  transform: rotate(8deg);
  clip-path: polygon(0 10%, 12% 0, 30% 8%, 50% 0, 70% 8%, 88% 0, 100% 12%, 94% 50%, 100% 88%, 85% 100%, 65% 92%, 45% 100%, 25% 92%, 8% 100%, 0 85%, 6% 50%);
}

.pubs { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pubs li {
  counter-increment: pub;
  position: relative;
  padding: 12px 0 12px 52px;
  border-bottom: 2px dashed rgba(17, 16, 21, 0.18);
  font-weight: 600;
  font-size: 15px;
}
.pubs li::before {
  content: counter(pub);
  position: absolute;
  left: 0;
  top: 10px;
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--display);
  font-size: 17px;
  border-radius: var(--blob-b);
}
.pubs .who { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.pubs .who b { color: var(--ink); }
.pubs .where { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--pink); }
.pubs .where.soon { color: var(--muted); }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 14px 0; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); }
.posts .lvl { display: block; font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--pink); }
.posts a { font-weight: 700; font-size: 19px; }
.posts p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- blog post body ---------- */
.post h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  text-shadow: -3px 1px 0 var(--cyan), 3px -1px 0 var(--pink);
}
.post .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.post blockquote {
  position: relative;
  margin: 22px 0;
  padding: 14px 18px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 28px;
  font-weight: 600;
}
.post blockquote::after {
  content: "";
  position: absolute;
  left: 40px;
  bottom: -18px;
  border: 9px solid transparent;
  border-top: 12px solid var(--ink);
}
.post code { font-family: var(--mono); background: var(--ink); color: var(--yellow); padding: 1px 5px; font-size: 13px; }
.post pre { background: var(--ink); color: var(--paper-2); padding: 14px; overflow-x: auto; font-size: 13px; box-shadow: 6px 6px 0 var(--cyan); }
.post table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 14px 0; background: #fff; }
.post th, .post td { border: 3px solid var(--ink); padding: 6px 10px; text-align: left; }
.post th { background: var(--yellow); font-family: var(--mono); text-transform: uppercase; font-size: 12px; }
.post .back { font-family: var(--mono); font-weight: 600; font-size: 13px; }

.callout {
  border: 3px solid var(--ink);
  background: var(--yellow);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 13.5px;
  box-shadow: 6px 6px 0 var(--pink);
  transform: rotate(-0.6deg);
}

/* ---------- footer ---------- */
footer {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 70px auto 40px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
footer .links a { margin-right: 14px; }

/* ---------- portal page transition ---------- */
#portal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--ink);
  pointer-events: none;
  clip-path: circle(0 at 50% 50%);
}
#portal.open { transition: clip-path 0.45s cubic-bezier(0.7, 0, 0.3, 1); }

/* ---------- the spot's dimension (konami) ---------- */
body.inverted { filter: invert(1) hue-rotate(180deg); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .top { flex-direction: column; align-items: flex-start; }
  .nav a { width: 74px; height: 62px; font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .portal { max-width: 260px; }
  .panel { padding: 30px 18px 20px; }
  h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .spot, .portal::before, #cam { animation: none; }
  .logo.glitching { animation: none; }
  .comic, .nav a { transition: none; }
}


/* ================= v3 additions ================= */
canvas#dots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* hobby holes (margin black spots) */
.holes { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.hole {
  position: absolute;
  background: var(--ink);
  border-radius: var(--blob-a);
  pointer-events: auto;
  cursor: pointer;
  animation: morph 9s ease-in-out infinite alternate;
  transition: transform 0.15s steps(3);
}
.hole:nth-child(2n) { border-radius: var(--blob-b); animation-duration: 11s; }
.hole:nth-child(3n) { border-radius: var(--blob-c); animation-duration: 13s; }
.hole:hover { transform: scale(1.2) rotate(-8deg); animation-duration: 1.3s; box-shadow: -5px 3px 0 var(--cyan), 5px -3px 0 var(--pink); }
.hole.wobble { animation: wobble 0.5s steps(5); }
@keyframes morph { 33% { border-radius: var(--blob-b); } 66% { border-radius: var(--blob-c); } 100% { border-radius: var(--blob-a); } }
@keyframes wobble { 0% { transform: scale(1); } 25% { transform: scale(1.35, 0.7) rotate(6deg); } 50% { transform: scale(0.75, 1.3) rotate(-6deg); } 75% { transform: scale(1.15, 0.9); } 100% { transform: scale(1); } }
@media (max-width: 1260px) { .holes { display: none; } }

.tip {
  position: fixed; z-index: 60; pointer-events: none; opacity: 0; transform: translateY(6px) rotate(-1.5deg);
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--pink);
  padding: 6px 10px; max-width: 240px; font-family: var(--mono); font-size: 12px; line-height: 1.4;
  transition: opacity 0.12s steps(2), transform 0.12s steps(2);
}
.tip b { text-transform: uppercase; display: block; font-size: 13px; }
.tip.show { opacity: 1; transform: translateY(0) rotate(-1.5deg); }

/* ticker */
.ticker {
  position: relative; z-index: 2; max-width: 1060px; margin: 22px auto 0; overflow: hidden; white-space: nowrap;
  background: var(--ink); color: var(--paper-2); font-family: var(--mono); font-size: 13px; font-weight: 600;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); box-shadow: 0 5px 0 var(--pink);
}
.ticker .track { display: inline-flex; animation: scroll 70s linear infinite; }
.ticker span { padding: 7px 40px 6px 0; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* typography reacts to the cursor */
.logo, h2, .post h1 { transition: text-shadow 0.12s steps(2); }
.logo:hover, h2:hover, .post h1:hover { text-shadow: -8px 3px 0 var(--cyan), 8px -3px 0 var(--pink); filter: url(#warp); }

.small { font-size: 13.5px; color: var(--muted); }
.lede + p { margin-top: 12px; }
.now { list-style: none; padding: 0; margin: 0; }
.now li { padding: 10px 0; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); }
.now li:last-child { border-bottom: 0; }
a.portal { display: block; }
.comic.soon { opacity: 0.7; border-style: dashed; }
.comic.soon:hover { transform: none; box-shadow: 6px 6px 0 var(--ink); }

/* figures in posts */
.post img { display: block; max-width: 100%; height: auto; margin: 6px auto; border: 3px solid var(--ink); background: #fff; }
figure { margin: 24px 0; }
figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.post h2 { font-size: 34px; margin-top: 34px; }
.post h3 { margin-top: 24px; }
.post hr { border: 0; border-top: 3px dashed var(--ink); margin: 28px 0; }
.post li { margin: 4px 0; }
.katex-display { overflow-x: auto; overflow-y: hidden; }

/* research rows */
.rows { list-style: none; padding: 0; margin: 0; }
.row { position: relative; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); }
.row:last-child { border-bottom: 0; }
.row h3 { margin: 0 0 2px; font-size: 19px; }
.row p { margin: 0 0 6px; color: var(--muted); font-size: 14.5px; }
.row.soon h3 { color: var(--muted); }
.row-text { min-width: 0; }
.pv {
  flex: none; width: 200px; height: 110px; background: var(--ink); border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--pink); opacity: 0; transform: scale(0.9) rotate(2deg);
  transition: opacity 0.12s steps(3), transform 0.12s steps(3);
}
.row:hover .pv, .row:focus-within .pv { opacity: 1; transform: scale(1) rotate(-1.5deg); }
@media (hover: none), (max-width: 700px) { .pv { display: none; } }

/* blog list filter */
.filter {
  font-family: var(--mono); font-weight: 600; font-size: 12px; text-transform: uppercase; background: var(--paper-2);
  border: 3px solid var(--ink); padding: 1px 9px; margin: 0 4px 6px 0; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.filter.on { background: var(--yellow); }
.filter:hover { transform: translate(-1px, -1px); }
.posts li.hide { display: none; }

/* hobby pages */
.shelf { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.shelf li { background: #fff; border: 3px solid var(--ink); padding: 3px 12px; box-shadow: 4px 4px 0 var(--cyan); }
.shelf li:nth-child(3n) { box-shadow: 4px 4px 0 var(--pink); }
.shelf li:nth-child(3n+1) { box-shadow: 4px 4px 0 var(--yellow); }

/* demos inside posts */
.demo { margin: 18px 0; border: 3px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 var(--violet); padding: 12px; }
.demo canvas { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto 8px; background: var(--ink); }
.demo .ctl { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12.5px; justify-content: center; }
.demo label { display: flex; align-items: center; gap: 6px; }
.demo input[type=range] { accent-color: var(--pink); }
.c4 { display: inline-block; margin: 16px 0 6px; padding: 10px; background: var(--violet); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.c4 .grid7 { display: grid; grid-template-columns: repeat(7, 34px); gap: 5px; }
.c4 .cell { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); border: 3px solid var(--ink); }
.c4 .cell.R { background: var(--pink); } .c4 .cell.Y { background: var(--yellow); }
.c4-cap { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 14px; }

/* renderer */
.rview { position: relative; border: 3px solid var(--ink); background: #000; box-shadow: 7px 7px 0 var(--cyan); }
#bh { display: block; width: 100%; aspect-ratio: 16 / 9; cursor: grab; touch-action: none; }
#bh:active { cursor: grabbing; }
.rhud { position: absolute; left: 10px; bottom: 8px; font-family: var(--mono); font-size: 11px; color: #cfd; text-shadow: 1px 1px 0 #000; pointer-events: none; }
.controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 22px; margin-top: 18px; font-family: var(--mono); font-size: 12.5px; }
.controls label { display: flex; flex-direction: column; gap: 2px; }
.controls label:has(input[type=checkbox]) { flex-direction: row; align-items: center; gap: 8px; }
.controls input[type=range] { accent-color: var(--pink); width: 100%; }

/* footer: holes row + plush stage */
footer { display: block; margin-top: 60px; margin-bottom: 0; }
#plush { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 5; pointer-events: none; }
.bubble {
  position: fixed; z-index: 7; max-width: 220px; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: 6px 12px; font-size: 13px; line-height: 1.4; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.1s steps(2); box-shadow: 4px 4px 0 var(--yellow);
}
.bubble.show { opacity: 1; }
html.plush-hover, html.plush-hover * { cursor: grab !important; }
html.plush-drag, html.plush-drag * { cursor: grabbing !important; user-select: none !important; }
@media (pointer: coarse) { #plush, .bubble { display: none; } }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.foot-line .tag { font-weight: 600; color: var(--ink); }
.foot-line .links a { margin-left: 14px; }

@media (max-width: 760px) { .row { flex-direction: column; align-items: flex-start; } .plush-stage { height: 230px; } }
@media (prefers-reduced-motion: reduce) { .hole, .ticker .track { animation: none; } .logo:hover, h2:hover, .post h1:hover { filter: none; } }

/* interpretability explorer */
.xp-prompts { margin: 8px 0 4px; }
.xp-label { font-family: var(--mono); font-weight: 600; font-size: 12.5px; margin: 16px 0 6px; }
.xp-tokens { display: flex; flex-wrap: wrap; gap: 4px; }
.tok { font-family: var(--mono); font-size: 14px; border: 3px solid var(--ink); background: #fff; padding: 2px 8px; cursor: pointer; white-space: pre; }
.tok.sel { box-shadow: 4px 4px 0 var(--cyan); transform: translate(-1px, -1px); }
.xp-attn { font-size: 14px; margin: 10px 0 0; }
.xp-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 860px) { .xp-row { grid-template-columns: 1fr; } }
#xp-grid, #xp-head, #xp-norm { display: block; max-width: 100%; border: 3px solid var(--ink); background: #fff; cursor: crosshair; }
.xp-hud { font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 1.4em; margin: 4px 0 0; }
.bar { display: grid; grid-template-columns: 90px 1fr 52px; gap: 8px; align-items: center; font-family: var(--mono); font-size: 13px; margin: 5px 0; }
.bar .bt { font-weight: 600; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.bar .bv { height: 14px; border: 2px solid var(--ink); background: #fff; }
.bar .bv i { display: block; height: 100%; background: var(--pink); }
.xp-lens { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; margin: 6px 0 14px; }
.lcell { border: 3px solid var(--ink); padding: 3px 6px; font-family: var(--mono); font-size: 13px; display: flex; flex-direction: column; line-height: 1.25; }
.lcell small { font-size: 10px; opacity: 0.8; } .lcell em { font-style: normal; font-size: 11px; }
.lcell b { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.lcell.hit { box-shadow: 4px 4px 0 var(--yellow); }

/* learning page */
.reading { list-style: none; padding: 0; margin: 0; }
.reading li { padding: 9px 0; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); }
.reading li:last-child { border-bottom: 0; }
.reading li span { display: block; color: var(--muted); font-size: 14px; }
.nav a { width: 86px; }
@media (max-width: 760px) { .nav a { width: 66px; height: 58px; font-size: 14px; } }

/* hobbies page */
.hobs { list-style: none; padding: 0; margin: 0; }
.hob { padding: 14px 16px 12px; margin: 0 -16px; border-bottom: 2px dashed rgba(17, 16, 21, 0.18); scroll-margin-top: 24px; }
.hob:last-child { border-bottom: 0; }
.hob h3 { margin: 0 0 4px; font-size: 20px; }
.hob p { margin: 4px 0; }
.hob .k { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.hob:target { background: rgba(255, 224, 58, 0.4); box-shadow: -10px 0 0 var(--yellow); }
.panel .k { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin: 16px 0 2px; }
.panel .k:first-child { margin-top: 0; }

a.portal, a.portal:hover { background: none; text-decoration: none; }

/* verification loop demo */
.vf-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; margin-bottom: 6px; font-family: var(--mono); font-size: 13px; }
.vf-top select { font-family: var(--mono); font-size: 13px; border: 3px solid var(--ink); background: var(--paper-2); padding: 2px 6px; }
.vf-steps { display: flex; gap: 4px; margin: 4px 0 6px; flex-wrap: wrap; }
.demo .filter.on { background: var(--yellow); }
.vf-note { font-size: 14px; margin: 6px 0 10px; min-height: 2.6em; }
.vf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .vf-cols { grid-template-columns: 1fr; } }
.vf-k { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin: 6px 0 3px; }
.vf-cols textarea { width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; border: 3px solid var(--ink); background: var(--ink); color: #f3f3f6; padding: 8px; resize: vertical; box-sizing: border-box; }
.vf-verdict { font-family: var(--mono); font-weight: 600; font-size: 13px; padding: 7px 10px; border: 3px solid var(--ink); margin-top: 12px; }
.vf-verdict.ok { background: #b9f5c9; } .vf-verdict.bad { background: #ffb3d1; } .vf-verdict.warn { background: var(--yellow); }
.vf-clauses, .vf-mut ul { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; }
.vf-clauses li, .vf-mut li { padding: 3px 0 3px 24px; position: relative; }
.vf-clauses li::before, .vf-mut li::before { position: absolute; left: 0; font-weight: 700; }
.vf-clauses li.pass::before, .vf-mut li.pass::before { content: "\2713"; color: #138a3d; }
.vf-clauses li.fail::before, .vf-mut li.fail::before { content: "\2717"; color: #d4156d; }
.vf-clauses code { font-family: var(--mono); font-size: 12.5px; }
.vf-mut li.fail { color: #a10f57; }
.vf-mut pre { margin: 4px 0 0; padding: 6px 8px; font-size: 11.5px; background: var(--ink); color: #f3f3f6; overflow-x: auto; }
.vf-weak { font-weight: 600; color: #a10f57; margin: 4px 0; font-size: 14px; }
.vf-strong { font-weight: 600; color: #138a3d; margin: 4px 0; font-size: 14px; }
.vf-ce { margin-top: 6px; }
.vf-svg { width: 100%; max-width: 560px; display: block; background: #fff; border: 3px solid var(--ink); }
.vf-row { display: flex; align-items: center; gap: 4px; margin: 6px 0; font-family: var(--mono); font-size: 13px; }
.vf-row span { width: 54px; font-weight: 600; }
.vf-row b { min-width: 30px; text-align: center; border: 3px solid var(--ink); padding: 2px 6px; }
.vf-foot { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
@media (min-width: 900px) { footer { padding-right: 250px; } }

/* the hero black hole is a link: lean in on hover */
a.portal { transition: transform 0.15s steps(3); }
a.portal:hover { transform: scale(1.04) rotate(-2.5deg); }
a.portal:hover::before { box-shadow: 14px -9px 0 var(--pink), -18px 11px 0 var(--cyan); }
a.portal::after {
  content: "open renderer"; position: absolute; right: -4px; bottom: 6px; z-index: 2;
  background: var(--yellow); border: 3px solid var(--ink); padding: 2px 9px; font-family: var(--mono); font-weight: 600;
  font-size: 12px; text-transform: uppercase; transform: rotate(-4deg); opacity: 0; transition: opacity 0.12s steps(2); pointer-events: none;
}
a.portal:hover::after, a.portal:focus-visible::after { opacity: 1; }

/* stat tiles, callouts and figure rows for long posts */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 6px 0 24px; }
.stats > div { background: #fff; border: 3px solid var(--ink); padding: 10px 12px 8px; box-shadow: 5px 5px 0 var(--cyan); }
.stats > div:nth-child(2n) { box-shadow: 5px 5px 0 var(--pink); }
.stats > div:nth-child(3n) { box-shadow: 5px 5px 0 var(--yellow); }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; letter-spacing: 0.02em; }
.stats span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.post .callout { margin: 22px 0; }
.figrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 22px 0; align-items: start; }
.figrow figure { margin: 0; }
.figrow figure img { margin: 0; width: 100%; }
.post figure svg, .post figure img[src$=".svg"] { background: #fff; }
.formula { font-family: var(--mono); font-weight: 600; font-size: clamp(16px, 3vw, 22px); text-align: center; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--pink); padding: 14px 10px; margin: 20px 0; }

/* interpretability demos */
.demo.light canvas { background: #fff; border: 3px solid var(--ink); max-width: 100%; margin: 6px 0; }
.il-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 8px; font-family: var(--mono); font-size: 13px; }
.il-top select { font-family: var(--mono); font-size: 13px; border: 3px solid var(--ink); background: var(--paper-2); padding: 2px 6px; }
.il-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.il-k { font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.il-cap { font-size: 13.5px; margin: 8px 0; }
.il-slide { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; }
.il-slide input { accent-color: var(--pink); }
.il-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; align-items: flex-start; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--mono); font-size: 10.5px; text-align: center; line-height: 1.25; max-width: 74px; }
.ab-row, .il-steer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .ab-row, .il-steer { grid-template-columns: 1fr; } }
.il-steer > div:first-child { display: grid; gap: 6px; }
.cmp { display: grid; gap: 4px; margin: 6px 0; font-family: var(--mono); font-size: 12px; }
.cmp > div { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 8px; align-items: center; }
.cmpbar { position: relative; display: block; height: 16px; border: 2px solid var(--ink); background: #fff; }
.cmpbar i { display: block; height: 100%; }
.cmpbar b { position: absolute; right: 4px; top: -1px; font-size: 11px; }
.demo button:disabled { opacity: 0.5; }

/* pangram figures, details, pipeline */
.vtag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 1px 7px; border: 2px solid var(--ink); margin-right: 6px; }
.vtag.ai { background: var(--pink); color: #fff; } .vtag.unsure { background: var(--yellow); } .vtag.real { background: var(--cyan); }
.post details { margin: 12px 0 20px; border: 3px solid var(--ink); background: var(--paper); padding: 6px 12px; }
.post details summary { cursor: pointer; font-family: var(--mono); font-weight: 600; font-size: 13px; }
.post details[open] summary { margin-bottom: 8px; }
.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 6px; counter-reset: step; }
.pipe > div { position: relative; background: var(--cyan); border: 3px solid var(--ink); padding: 14px 10px 10px; text-align: center; box-shadow: 5px 5px 0 var(--ink); }
.pipe > div:nth-child(2n) { background: var(--yellow); } .pipe > div:nth-child(3) { background: var(--pink); color: #fff; }
.pipe i { position: absolute; top: -13px; left: 8px; background: var(--ink); color: #fff; font-family: var(--display); font-style: normal; font-size: 15px; padding: 0 8px; }
.pipe b { display: block; font-size: 15px; line-height: 1.25; } .pipe span { display: block; font-size: 12.5px; margin-top: 4px; }
.pipe-cap { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 8px 0 18px; }
.takes { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; gap: 8px; }
.takes li { background: #fff; border: 3px solid var(--ink); padding: 8px 12px; box-shadow: 4px 4px 0 var(--pink); }
.takes li:nth-child(2n) { box-shadow: 4px 4px 0 var(--cyan); }
.takes b { display: block; } .takes span { display: block; color: var(--muted); font-size: 14.5px; }

.rr-key { font-family: var(--mono); font-size: 11.5px; } .rr-key i { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--ink); margin: 0 4px 0 10px; vertical-align: -1px; } .rr-key i:first-child { margin-left: 0; }
.rr-tab { overflow-x: auto; } .rr-tab table { min-width: 640px; }
.demo.light canvas#pc, .demo.light canvas#tc, .demo.light canvas#cc { width: 100%; }
