:root{
  --bg:      #05030a;
  --bg2:     #0b0616;
  --magenta: #ff2d95;
  --cyan:    #00e6ff;
  --orange:  #ff8a1f;
  --violet:  #b06bff;
  --text:    #d3dae8;
  --dim:     #8d93a8;
  --rule:    rgba(255,45,149,.28);
  --rule2:   rgba(0,230,255,.22);
  --mono:    'Share Tech Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
  --display: 'VT323', 'Share Tech Mono', 'Courier New', monospace;
}

*{ box-sizing:border-box; }

html,body{ margin:0; padding:0; }

body{
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,45,149,.16), transparent 60%),
    radial-gradient(ellipse at 50% 115%, rgba(0,230,255,.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  letter-spacing: .015em;
}

/* --------------------------------------------------------------------------
   CRT overlays (purely decorative)
   -------------------------------------------------------------------------- */
.crt-lines, .crt-vignette{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}
.crt-lines{
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0)   0px,
    rgba(0,0,0,0)   2px,
    rgba(0,0,0,.28) 3px,
    rgba(0,0,0,.28) 4px
  );
  opacity: .55;
  mix-blend-mode: multiply;
}
.crt-vignette{
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.72) 100%);
}

/* --------------------------------------------------------------------------
   Blinking cursor
   -------------------------------------------------------------------------- */
.cursor{
  display: inline-block;
  width: .62em;
  height: 1.05em;
  margin-left: .12em;
  background: currentColor;
  vertical-align: -.16em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* --------------------------------------------------------------------------
   Boot sequence (index.html only)
   Hidden unless JS is running, so a no-JS visitor sees the menu directly.
   -------------------------------------------------------------------------- */
#boot{ display:none; }
.js #boot{
  display: block;
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: #04030a;
  padding: 6vh 5vw;
  overflow: hidden;
  transition: opacity .7s ease, filter .7s ease;
  cursor: pointer;
}
.js #boot.off{
  opacity: 0;
  filter: brightness(2.4) blur(2px);
  pointer-events: none;
}
#bootlog{
  font-family: var(--mono);
  font-size: clamp(12px, 1.6vw, 16px);
  line-height: 1.85;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,230,255,.45);
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 900px;
}
#bootlog .l-dim     { color: var(--dim);     text-shadow:none; }
#bootlog .l-magenta { color: var(--magenta); text-shadow: 0 0 10px rgba(255,45,149,.55); }
#bootlog .l-orange  { color: var(--orange);  text-shadow: 0 0 10px rgba(255,138,31,.45); }
#bootlog .l-grant{
  color: var(--magenta);
  font-size: 1.35em;
  letter-spacing: .18em;
  text-shadow: 0 0 14px rgba(255,45,149,.8), 0 0 34px rgba(255,45,149,.35);
}

#skiphint{
  position: absolute;
  left: 0; right: 0; bottom: 5vh;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: .28em;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{opacity:.35} 50%{opacity:.95} }

/* --------------------------------------------------------------------------
   Short page transition (every page except the index boot)
   Pure CSS: a scanline sheet wipes down once, then gets out of the way.
   -------------------------------------------------------------------------- */
#wipe{
  position: fixed;
  inset: 0;
  z-index: 8500;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,230,255,.10), rgba(5,3,10,.96) 42%, #04030a 100%),
    repeating-linear-gradient(to bottom,
      rgba(255,45,149,.16) 0px, rgba(255,45,149,.16) 1px,
      rgba(0,0,0,0) 1px, rgba(0,0,0,0) 4px);
  animation: wipe-out .62s cubic-bezier(.45,.02,.35,1) forwards;
}
#wipe::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 18px 4px rgba(0,230,255,.85), 0 0 44px 10px rgba(255,45,149,.35);
}
@keyframes wipe-out{
  0%   { clip-path: inset(0 0 0 0);      opacity:1; }
  70%  { clip-path: inset(0 0 100% 0);   opacity:1; }
  100% { clip-path: inset(0 0 100% 0);   opacity:0; visibility:hidden; }
}

/* Content settles in behind the wipe. */
.page{
  animation: page-in .55s ease .08s both;
}
@keyframes page-in{
  from{ opacity:0; transform: translateY(10px); }
  to  { opacity:1; transform: none; }
}

/* Brief flicker on the frame itself. */
.topbar{ animation: flicker .5s steps(2) 1; }
@keyframes flicker{
  0%{ opacity:.15 } 25%{ opacity:.85 } 50%{ opacity:.35 } 75%{ opacity:.95 } 100%{ opacity:1 }
}

/* --------------------------------------------------------------------------
   Persistent nav bar
   -------------------------------------------------------------------------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 7000;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(6,3,14,.92);
  backdrop-filter: blur(3px);
  border-bottom: 1px solid var(--rule);
  font-size: .84rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.topbar::after{
  content: "";
  position: absolute; left:0; right:0; bottom:-1px;
  height: 1px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(255,45,149,.55);
}
.tb-brand{
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: .12em;
  line-height: 1;
  color: #fff;
  border: 0;
  text-shadow: 0 0 8px rgba(255,45,149,.85), 0 0 24px rgba(255,45,149,.35);
}
.tb-brand:hover, .tb-brand:focus{ color:#fff; border:0; }
.tb-sep{ color: var(--violet); opacity:.6; }
.tb-links{
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.1rem;
  list-style: none;
  margin: 0; padding: 0;
}
.tb-links a{
  border-bottom: 1px solid transparent;
  color: var(--dim);
}
.tb-links a:hover, .tb-links a:focus{ color: var(--magenta); }
.tb-links a.is-current{
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,230,255,.5);
}
.tb-status{
  margin-left: auto;
  color: var(--orange);
  font-size: .74rem;
  letter-spacing: .22em;
  text-shadow: 0 0 10px rgba(255,138,31,.4);
}
@media (max-width: 620px){
  .tb-status{ display:none; }
  .topbar{ font-size:.76rem; }
}

/* --------------------------------------------------------------------------
   Landing menu (index.html)
   -------------------------------------------------------------------------- */
#menu{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}
.js #menu{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease .1s, transform .8s ease .1s;
}
.js #menu.on{ opacity:1; transform:none; }

.menu-frame{
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255,45,149,.07), rgba(0,230,255,.04));
  padding: 2.25rem clamp(1.1rem, 4vw, 2.5rem) 1.75rem;
  position: relative;
}
.menu-frame::before{
  content: "";
  position: absolute; left:-1px; right:-1px; top:-1px;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan), var(--orange));
  box-shadow: 0 0 14px rgba(255,45,149,.6);
}
.brand{
  font-family: var(--display);
  font-size: clamp(3rem, 13vw, 6rem);
  line-height: .88;
  margin: 0;
  letter-spacing: .07em;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255,45,149,.9),
    0 0 30px rgba(255,45,149,.5),
    0 0 70px rgba(255,45,149,.22);
}
.brand-sub{
  margin: .35rem 0 0;
  color: var(--cyan);
  font-size: clamp(.78rem, 2.6vw, .95rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0,230,255,.35);
}
.brand-sub .ok{
  color: var(--orange);
  text-shadow: 0 0 12px rgba(255,138,31,.6);
}
.menu-meta{
  margin: 1.4rem 0 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--dim);
  font-size: .82rem;
  letter-spacing: .08em;
}
.menu-meta .ps1{ color: var(--violet); }

.menu-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list li{ margin: 0 0 .55rem; padding:0; }
.menu-list li::before{ content: none; }

.menu-item{
  display: grid;
  grid-template-columns: 3.1rem minmax(0,10rem) 1fr;
  align-items: baseline;
  gap: .2rem .9rem;
  padding: .7rem .85rem;
  border: 1px solid transparent;
  border-left: 2px solid rgba(255,45,149,.35);
  background: rgba(255,255,255,.015);
  color: var(--text);
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.menu-item::before{ content: none; }
.menu-item .mi-idx{
  color: var(--dim);
  font-size: .82rem;
  letter-spacing: .1em;
}
.menu-item .mi-cmd{
  color: var(--cyan);
  font-size: 1.12rem;
  letter-spacing: .1em;
  text-shadow: 0 0 12px rgba(0,230,255,.35);
}
.menu-item .mi-desc{
  color: var(--dim);
  font-size: .84rem;
  letter-spacing: .05em;
}
.menu-item:hover, .menu-item:focus,
.menu-item.is-active{
  background: rgba(255,45,149,.10);
  border-color: var(--rule);
  border-left-color: var(--magenta);
  outline: none;
  transform: translateX(3px);
}
.menu-item:hover .mi-cmd,
.menu-item:focus .mi-cmd,
.menu-item.is-active .mi-cmd{
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255,45,149,.8);
}
.menu-item:hover .mi-idx,
.menu-item:focus .mi-idx,
.menu-item.is-active .mi-idx{ color: var(--orange); }

.menu-hint{
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--dim);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.menu-out{
  margin: .9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  font-size: .84rem;
}
@media (max-width: 560px){
  .menu-item{ grid-template-columns: 2.4rem 1fr; }
  .menu-item .mi-desc{ grid-column: 2; }
}

/* --------------------------------------------------------------------------
   Generic page shell
   -------------------------------------------------------------------------- */
.page{
  max-width: 860px;
  margin: 0 auto;
  padding: 2.75rem 1.75rem 6rem;
}
.page-wide{ max-width: 1080px; }

/* Masthead */
header.mast{
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255,45,149,.07), rgba(0,230,255,.04));
  padding: 1.6rem 1.5rem 1.35rem;
  position: relative;
  margin-bottom: 2.75rem;
}
header.mast::before{
  content: "";
  position: absolute; left:-1px; right:-1px; top:-1px;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan), var(--orange));
  box-shadow: 0 0 14px rgba(255,45,149,.6);
}
h1{
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: .95;
  margin: 0 0 .35rem;
  letter-spacing: .06em;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255,45,149,.85),
    0 0 26px rgba(255,45,149,.45),
    0 0 60px rgba(255,45,149,.2);
}
.tagline{
  color: var(--cyan);
  font-size: .95rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  text-shadow: 0 0 10px rgba(0,230,255,.35);
}
.mast-links{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  font-size: .93rem;
}

/* Section headings styled as shell prompts */
section{ margin-bottom: 2.9rem; }
h2{
  font-size: 1rem;
  font-weight: normal;
  margin: 0 0 1.35rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: .05em;
  word-break: break-word;
}
h2 .ps1{ color: var(--violet); opacity:.85; }
h2 .cmd{
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255,45,149,.55), 0 0 26px rgba(255,45,149,.22);
}
h2 .cursor{ color: var(--magenta); height:.95em; width:.5em; }

/* Entries (resume) */
.entry{ margin-bottom: 1.9rem; }
.entry:last-child{ margin-bottom: 0; }

.role{
  color: var(--cyan);
  font-size: 1.12rem;
  margin: 0;
  text-shadow: 0 0 12px rgba(0,230,255,.3);
}
.org{
  color: var(--text);
  margin: .1rem 0 .1rem;
  font-size: 1rem;
}
.meta{
  color: var(--orange);
  font-size: .87rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0 0 .7rem;
}

.sub{ color: var(--dim); font-size: .9rem; }
.code{ color: var(--violet); letter-spacing: .06em; }

/* Terminal-style bulleted lists inside content areas */
.arrows ul, .post ul{ list-style: none; margin: 0; padding: 0; }
.arrows ul li, .post ul li{
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .6rem;
}
.arrows ul li::before, .post ul li::before{
  content: "\25B8";
  position: absolute;
  left: .15rem;
  top: 0;
  color: var(--magenta);
  text-shadow: 0 0 8px rgba(255,45,149,.6);
}
.arrows ul li:last-child, .post ul li:last-child{ margin-bottom:0; }

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a{
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dotted rgba(0,230,255,.45);
  transition: color .18s ease, text-shadow .18s ease, border-color .18s ease;
}
a:hover, a:focus{
  color: var(--magenta);
  border-bottom-color: var(--magenta);
  text-shadow: 0 0 12px rgba(255,45,149,.75);
  outline: none;
}
/* Arrow affordance only in prose/content regions, never in nav or cards. */
.arrows a::before,
.menu-out a::before{ content: "\2192\00a0"; opacity:.6; }
/* ...but not in generated structures: TOC, footnote refs and backlinks. */
.post-toc a::before,
a.footnote-ref::before,
a.footnote-back::before,
.footnotes a::before{ content: none; }

/* --------------------------------------------------------------------------
   Card grid (projects)
   -------------------------------------------------------------------------- */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}
.card{
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255,45,149,.05), rgba(0,230,255,.03));
  padding: 1.15rem 1.15rem 1rem;
  position: relative;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card::before{
  content: "";
  position: absolute; left:-1px; right:-1px; top:-1px;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan));
  opacity: .55;
}
.card:hover{
  border-color: rgba(255,45,149,.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px -12px rgba(255,45,149,.5);
}
.card:hover::before{ opacity:1; box-shadow: 0 0 14px rgba(255,45,149,.6); }
.card-idx{
  color: var(--dim);
  font-size: .72rem;
  letter-spacing: .22em;
  margin: 0 0 .35rem;
}
.card-title{
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: .04em;
  margin: 0 0 .55rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,45,149,.55);
}
.card-desc{
  margin: 0 0 .9rem;
  font-size: .92rem;
  color: var(--text);
}
.tags{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.tags li{ margin:0; padding:0; position:static; }
.tags li::before{ content: none; }
.tag{
  display: inline-block;
  border: 1px solid var(--rule2);
  color: var(--cyan);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .12rem .45rem;
  background: rgba(0,230,255,.05);
}
.card-links{
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.1rem;
  font-size: .84rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.card.is-placeholder{ opacity: .72; border-style: dashed; }
.card.is-placeholder .card-title{ color: var(--dim); text-shadow:none; }

/* A card that breaks the grid to run the full width — used for the diagram,
   which is unreadable at column width. */
.card-wide{ grid-column: 1 / -1; }

/* --------------------------------------------------------------------------
   Framed diagram + click-to-enlarge
   -------------------------------------------------------------------------- */
.diagram{ margin: 0 0 1rem; }

.diagram-link{
  display: block;
  position: relative;
  padding: 6px;
  background: #08050f;
  border: 1px solid var(--rule2);
  box-shadow:
    0 0 0 1px rgba(255,45,149,.10),
    0 0 22px -6px rgba(0,230,255,.45),
    inset 0 0 60px -30px rgba(0,230,255,.6);
  transition: border-color .18s ease, box-shadow .18s ease;
  cursor: zoom-in;
  line-height: 0;          /* kill the inline-image descender gap */
}
.diagram-link:hover, .diagram-link:focus{
  border-color: rgba(255,45,149,.6);
  box-shadow:
    0 0 0 1px rgba(255,45,149,.25),
    0 0 30px -6px rgba(255,45,149,.55),
    inset 0 0 60px -30px rgba(255,45,149,.6);
  outline: none;
  text-shadow: none;
}
.diagram-link img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.diagram-hint{
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  padding: .12rem .5rem;
  background: rgba(5,3,10,.85);
  border: 1px solid var(--rule2);
  color: var(--cyan);
  font-size: .66rem;
  line-height: 1.6;
  letter-spacing: .18em;
  opacity: .55;
  transition: opacity .18s ease, color .18s ease, border-color .18s ease;
}
.diagram-link:hover .diagram-hint,
.diagram-link:focus .diagram-hint{
  opacity: 1;
  color: var(--magenta);
  border-color: rgba(255,45,149,.6);
}

.diagram figcaption{
  color: var(--dim);
  font-size: .78rem;
  letter-spacing: .1em;
  line-height: 1.5;
  margin-top: .5rem;
}

/* Lightbox — built by script.js, so it only ever exists when JS is running.
   Sits above the CRT overlays (z-index 9000) so the diagram stays legible. */
.lb{
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(4,3,10,.94);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
  cursor: zoom-out;
}
.lb.on{ opacity: 1; }

.lb-figure{
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  cursor: default;
}
.lb-figure img{
  display: block;
  min-height: 0;           /* lets the flex child actually shrink */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #08050f;
  border: 1px solid var(--rule2);
  box-shadow: 0 0 40px -10px rgba(0,230,255,.5), 0 0 90px -30px rgba(255,45,149,.6);
}
.lb-cap{
  flex: none;
  color: var(--dim);
  font-size: .78rem;
  letter-spacing: .1em;
  line-height: 1.5;
  text-align: center;
}

.lb-close{
  position: absolute;
  top: clamp(.6rem, 2vw, 1.2rem);
  right: clamp(.6rem, 2vw, 1.2rem);
  padding: .25rem .7rem;
  background: rgba(5,3,10,.9);
  border: 1px solid var(--rule);
  color: var(--magenta);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .18em;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.lb-close:hover, .lb-close:focus{
  color: #fff;
  border-color: var(--magenta);
  box-shadow: 0 0 16px -4px rgba(255,45,149,.8);
  outline: none;
}

/* Keep the page behind the overlay from scrolling under it. */
body.lb-open{ overflow: hidden; }

/* --------------------------------------------------------------------------
   Write-up index list
   -------------------------------------------------------------------------- */
.postlist{
  list-style: none;
  margin: 0;
  padding: 0;
}
.postlist > li{
  margin: 0 0 1.4rem;
  padding: 0 0 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  position: static;
}
.postlist > li::before{ content: none; }
.postlist > li:last-child{ border-bottom: 0; margin-bottom:0; padding-bottom:0; }

.pl-date{
  color: var(--orange);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 .2rem;
}
.pl-title{
  margin: 0 0 .45rem;
  font-size: 1.3rem;
  font-family: var(--display);
  letter-spacing: .04em;
  line-height: 1.15;
}
.pl-title a{
  color: #fff;
  border-bottom: 1px solid transparent;
  text-shadow: 0 0 10px rgba(255,45,149,.55);
}
.pl-title a:hover, .pl-title a:focus{
  color: var(--magenta);
  border-bottom-color: var(--magenta);
}
.pl-excerpt{
  margin: 0 0 .6rem;
  color: var(--text);
  font-size: .93rem;
}
.postlist .tags{ margin-bottom: 0; }

.empty-note{
  border: 1px dashed var(--rule);
  padding: 1.1rem 1.2rem;
  color: var(--dim);
  font-size: .9rem;
}

/* --------------------------------------------------------------------------
   Write-up post body (Pandoc output lands here)
   -------------------------------------------------------------------------- */
.post{
  max-width: 800px;
  margin: 0 auto;
  padding: 2.75rem 1.75rem 6rem;
}
.post-head{
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
}
.post-date{
  color: var(--orange);
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 .4rem;
}
.post-title{
  font-family: var(--display);
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1;
  letter-spacing: .04em;
  margin: 0 0 .7rem;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255,45,149,.85),
    0 0 26px rgba(255,45,149,.4);
}
.post-tags{ margin: 0; display:flex; flex-wrap:wrap; gap:.35rem; }

.post-toc{
  border: 1px solid var(--rule2);
  background: rgba(0,230,255,.03);
  padding: 1rem 1.2rem;
  margin-bottom: 2.25rem;
  font-size: .9rem;
}
.post-toc::before{
  content: "// CONTENTS";
  display: block;
  color: var(--violet);
  font-size: .72rem;
  letter-spacing: .24em;
  margin-bottom: .5rem;
}
/* Specific enough to beat the general `.post ul li` bullet rules. */
.post-toc ul{ list-style:none; margin:0; padding:0 0 0 .2rem; }
.post-toc ul ul{ padding-left: 1.1rem; margin-top: .25rem; }
.post-toc ul li{ position:relative; padding-left:1.1rem; margin-bottom:.25rem; }
.post-toc ul li::before{
  content: "\00b7";
  position: absolute;
  left: .2rem;
  top: 0;
  color: var(--cyan);
  text-shadow: none;
}
.post-toc a{ border-bottom-color: transparent; }
.post-toc a:hover, .post-toc a:focus{ border-bottom-color: var(--magenta); }

/* Headings inside a post */
.post h1{ font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 2.4rem 0 1rem; }
.post h2{
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: .04em;
  color: var(--magenta);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35rem;
  margin: 2.6rem 0 1.1rem;
  text-shadow: 0 0 12px rgba(255,45,149,.5);
}
.post h2::before{
  content: "## ";
  color: var(--violet);
  opacity: .6;
  font-family: var(--mono);
  font-size: .8rem;
}
.post h3{
  font-size: 1.12rem;
  font-weight: normal;
  letter-spacing: .08em;
  color: var(--cyan);
  margin: 2rem 0 .7rem;
  text-shadow: 0 0 10px rgba(0,230,255,.3);
}
.post h4{
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 1.6rem 0 .5rem;
}
.post p{ margin: 0 0 1.1rem; }
.post ul, .post ol{ margin: 0 0 1.2rem; }
.post ol{ list-style: decimal; padding-left: 1.6rem; }
.post ol li{ padding-left: .3rem; margin-bottom:.5rem; }
.post ol li::before{ content: none; }

.post blockquote{
  margin: 0 0 1.2rem;
  padding: .6rem 1rem;
  border-left: 2px solid var(--violet);
  background: rgba(176,107,255,.06);
  color: var(--dim);
}
.post blockquote p:last-child{ margin-bottom:0; }

.post hr{
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--magenta), transparent);
  margin: 2.4rem 0;
}

.post img{ max-width:100%; height:auto; border:1px solid var(--rule); }
.post figure{ margin: 0 0 1.4rem; }
.post figcaption{
  color: var(--dim);
  font-size: .8rem;
  letter-spacing: .1em;
  margin-top: .4rem;
}

/* Code */
code, kbd, samp{
  font-family: var(--mono);
  font-size: .92em;
}
:not(pre) > code{
  color: var(--orange);
  background: rgba(255,138,31,.09);
  border: 1px solid rgba(255,138,31,.22);
  padding: .04em .34em;
  word-break: break-word;
}
pre{
  margin: 0 0 1.4rem;
  padding: .95rem 1.1rem;
  background: #08050f;
  border: 1px solid var(--rule2);
  border-left: 2px solid var(--cyan);
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
  box-shadow: inset 0 0 40px -18px rgba(0,230,255,.5);
}
pre code{
  color: #cfe9f2;
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
}

/* Tables */
.post table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: .9rem;
}
.post th, .post td{
  border: 1px solid var(--rule);
  padding: .45rem .7rem;
  text-align: left;
  vertical-align: top;
}
.post th{
  color: var(--cyan);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: normal;
  background: rgba(0,230,255,.05);
}
.table-scroll{ overflow-x:auto; }

/* Pandoc footnotes */
.post .footnotes{
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: .85rem;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer.eof{
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--dim);
  font-size: .82rem;
  letter-spacing: .2em;
}
footer.eof .cursor{ color: var(--cyan); height:.9em; width:.45em; }

/* --------------------------------------------------------------------------
   Small screens / reduced motion
   -------------------------------------------------------------------------- */
@media (max-width: 560px){
  .page, .post{ padding: 2rem 1.1rem 4rem; }
  h2{ font-size: .88rem; }
  .mast-links{ gap:.4rem; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce){
  .cursor, #skiphint{ animation: none; }
  .js #menu{ transition: none; }
  .js #boot{ transition: opacity .2s linear; }
  .page, .topbar{ animation: none; }
  #wipe{ animation: wipe-fade .25s linear forwards; }
  @keyframes wipe-fade{ to{ opacity:0; visibility:hidden; } }
  .card:hover, .menu-item:hover{ transform: none; }
  .lb{ transition: none; }
}
