/* YoRHa - Nier:Automata interface language (based on metakirby5/yorha).
   The whole site. Angular panels, parchment palette, uppercase wide spacing. */

/* ---- self-hosted type (OFL - see assets/fonts/*-OFL.txt) ---- */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/jost-var.woff2") format("woff2");
}
@font-face {
  font-family: "Share Tech Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/share-tech-mono.woff2") format("woff2");
}

:root {
  --yo-bg:     #d1cdb7;
  --yo-grid:   #ccc8b1;
  --yo-ink:    #454138;
  --yo-mid:    #bab5a1;
  --yo-panel:  #dcd8c0;
  --yo-red:    #8a2f2f;
  --yo-green:  #3f7a3a;
  --yo-muted:  #6b6557;
  --yo-sans:   "Jost", helvetica, "Segoe UI", system-ui, sans-serif;
  --yo-mono:   "Share Tech Mono", "Consolas", "Menlo", "DejaVu Sans Mono", monospace;
  --yo-notch:  0.7rem;
  /* crisp integer hairline: rem sub-pixel widths round inconsistently */
  --yo-line:   1px;
  /* YoRHa cursors: idle marker, link pointer, active (pressed) marker */
  --yo-cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%223.4%22%20stroke-linecap%3D%22square%22%3E%3Cpath%20d%3D%22M8%203H3v5%22%2F%3E%3Cpath%20d%3D%22M20%203h5v5%22%2F%3E%3Cpath%20d%3D%22M8%2025H3v-5%22%2F%3E%3Cpath%20d%3D%22M20%2025h5v-5%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23454138%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22square%22%3E%3Cpath%20d%3D%22M8%203H3v5%22%2F%3E%3Cpath%20d%3D%22M20%203h5v5%22%2F%3E%3Cpath%20d%3D%22M8%2025H3v-5%22%2F%3E%3Cpath%20d%3D%22M20%2025h5v-5%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2214%22%20cy%3D%2214%22%20r%3D%221.7%22%20fill%3D%22%23454138%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E") 14 14, crosshair;
  --yo-cursor-link: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2234%22%20height%3D%2234%22%20viewBox%3D%22-3%20-3%2034%2034%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%223.4%22%20stroke-linecap%3D%22square%22%20transform%3D%22rotate%2845%2014%2014%29%22%3E%3Cpath%20d%3D%22M8%203H3v5%22%2F%3E%3Cpath%20d%3D%22M20%203h5v5%22%2F%3E%3Cpath%20d%3D%22M8%2025H3v-5%22%2F%3E%3Cpath%20d%3D%22M20%2025h5v-5%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a2f2f%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22square%22%20transform%3D%22rotate%2845%2014%2014%29%22%3E%3Cpath%20d%3D%22M8%203H3v5%22%2F%3E%3Cpath%20d%3D%22M20%203h5v5%22%2F%3E%3Cpath%20d%3D%22M8%2025H3v-5%22%2F%3E%3Cpath%20d%3D%22M20%2025h5v-5%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2214%22%20cy%3D%2214%22%20r%3D%221.9%22%20fill%3D%22%238a2f2f%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E") 17 17, crosshair;
  --yo-cursor-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%223.4%22%20stroke-linecap%3D%22square%22%3E%3Cpath%20d%3D%22M11%206H6v5%22%2F%3E%3Cpath%20d%3D%22M17%206h5v5%22%2F%3E%3Cpath%20d%3D%22M11%2022H6v-5%22%2F%3E%3Cpath%20d%3D%22M17%2022h5v-5%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a2f2f%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22square%22%3E%3Cpath%20d%3D%22M11%206H6v5%22%2F%3E%3Cpath%20d%3D%22M17%206h5v5%22%2F%3E%3Cpath%20d%3D%22M11%2022H6v-5%22%2F%3E%3Cpath%20d%3D%22M17%2022h5v-5%22%2F%3E%3C%2Fg%3E%3Crect%20x%3D%2211%22%20y%3D%2211%22%20width%3D%226%22%20height%3D%226%22%20fill%3D%22%238a2f2f%22%20stroke%3D%22%23dcd8c0%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E") 14 14, crosshair;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* YoRHa cursors: idle marker everywhere, a pointer on linkable elements,
   and a pressed marker while the mouse button is down. */
html, body { cursor: var(--yo-cursor); }
a, button, [role="button"], label, summary, .eggplant { cursor: var(--yo-cursor-link); }
body:active,
a:active, button:active, [role="button"]:active,
label:active, summary:active, .eggplant:active { cursor: var(--yo-cursor-active); }

body {
  margin: 0;
  font-family: var(--yo-sans);
  font-weight: 300;
  letter-spacing: 0.04rem;
  color: var(--yo-ink);
  background-color: var(--yo-bg);
  background-image:
    linear-gradient(to right, var(--yo-grid) 1px, rgba(204,200,177,0) 1px),
    linear-gradient(to bottom, var(--yo-grid) 1px, rgba(204,200,177,0) 1px);
  background-size: 0.35rem 0.35rem;
}

a { color: inherit; }
a:hover { text-decoration: underline; }

/* body links: a visible underline that thickens on hover
   (panels / nav / tags opt out and style themselves) */
main a:not(.tag):not(.status):not(.pname):not(.plink) {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 0.15s ease-out;
}
main a:not(.tag):not(.status):not(.pname):not(.plink):hover {
  text-decoration-thickness: 0.22em;
}

/* visible keyboard focus everywhere (missing before) */
:focus-visible {
  outline: 0.14rem solid var(--yo-ink);
  outline-offset: 0.18rem;
}
pre:focus-visible, .console:focus-visible,
.console :focus-visible, .shooter-wrap :focus-visible {
  outline-color: var(--yo-panel);
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.2rem; }

/* ---- header + nav ---- */
header.site {
  border-bottom: var(--yo-line) solid var(--yo-ink);
  padding: 1.4rem 0;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  margin: 0;
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.45rem;
  font-size: 1.25rem;
  text-shadow: 0.24rem 0.24rem 0 var(--yo-mid);
}

/* thin YoRHa status strip under the header */
.sysbar {
  border-bottom: var(--yo-line) solid var(--yo-mid);
  background: linear-gradient(var(--yo-panel), var(--yo-panel));
  font-family: var(--yo-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--yo-muted);
}
.sysbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}
.sysbar #yo-hud-clock { color: var(--yo-ink); }

nav[aria-label="primary"] ul {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav[aria-label="primary"] a {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--yo-ink);
  background-color: var(--yo-mid);
  overflow: hidden;
  text-decoration: none;
}
nav[aria-label="primary"] a::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  background-color: var(--yo-ink);
  z-index: -1;
  transition: width 0.2s ease-out;
}
nav[aria-label="primary"] a:hover {
  background-color: transparent;
  color: var(--yo-panel);
  text-decoration: none;
}
nav[aria-label="primary"] a:hover::after { width: 100%; }
nav[aria-label="primary"] a[aria-current="page"] {
  background-color: var(--yo-ink);
  color: var(--yo-panel);
}

/* ---- main ---- */
main {
  padding: 3.5rem 0 3rem;
  animation: page-in 0.35s ease both;
}
main > :first-child {
  margin-top: 1.5rem;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.22s cubic-bezier(0.4,0,0.2,1) both; }
::view-transition-new(root) { animation: vt-in 0.32s cubic-bezier(0.4,0,0.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1 {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.5rem;
  text-shadow: 0.3rem 0.3rem 0 var(--yo-mid);
  margin: 0 0 0.5rem;
}
h2 {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  border: solid var(--yo-ink);
  border-width: var(--yo-line) 0;
  padding: 0.25rem 0.8rem;
  margin: 1.5rem 0 1rem;
}
h3 { font-weight: 300; text-transform: uppercase; letter-spacing: 0.15rem; }

/* numbered section headers: a solid numeral tab, the title, then a rule */
main { counter-reset: yo-section; }
main h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  padding: 0;
  margin: 2.2rem 0 1rem;
  counter-increment: yo-section;
}
main h2::before {
  content: counter(yo-section, decimal-leading-zero);
  font-family: var(--yo-mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1rem;
  line-height: 1;
  color: var(--yo-panel);
  background-color: var(--yo-ink);
  padding: 0.28rem 0.5rem;
}
main h2::after {
  content: "";
  flex: 1;
  height: var(--yo-line);
  background-color: var(--yo-ink);
}

.hero h1 { font-size: 2.6rem; letter-spacing: 0.7rem; margin-bottom: 0.6rem; }
.tagline { color: #6b6557; font-size: 1.1rem; letter-spacing: 0.1rem; }

/* ---- panels ---- */
/* YoRHa panel signature: a clipped top-right corner that keeps its outline,
   plus an L-bracket accent (bottom-left) that reaches out on hover. Applied
   to .status, article.post and .shooter-wrap. The frame colour lives on the
   element; ::before is the inset face, so the diagonal stays outlined. */
.status,
article.post,
.shooter-wrap {
  position: relative;
  border: 0;
  clip-path: polygon(0 0, calc(100% - var(--yo-notch)) 0, 100% var(--yo-notch), 100% 100%, 0 100%);
}
.status > *,
article.post > *,
.shooter-wrap > * { position: relative; z-index: 1; }

.status::before,
article.post::before,
.shooter-wrap::before {
  content: "";
  position: absolute;
  inset: var(--yo-line);
  z-index: 0;
  background-color: var(--yo-panel);
  background-image:
    linear-gradient(var(--yo-ink), var(--yo-ink)),
    linear-gradient(var(--yo-ink), var(--yo-ink));
  background-repeat: no-repeat;
  background-size: var(--yo-line) 0.7rem, 0.7rem var(--yo-line);
  background-position: left 0 bottom 0, left 0 bottom 0;
  clip-path: polygon(0 0, calc(100% - (var(--yo-notch) - var(--yo-line))) 0, 100% calc(var(--yo-notch) - var(--yo-line)), 100% 100%, 0 100%);
  transition: background-size 0.18s ease-out;
  pointer-events: none;
}
.status:hover::before,
article.post:hover::before,
.shooter-wrap:hover::before {
  background-size: var(--yo-line) 1.3rem, 1.3rem var(--yo-line);
}

/* the yorha blockquote: a double left rail + a square marker on the cite */
blockquote {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.8rem;
  margin: 1.2rem 0;
}
blockquote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0.3rem;
  border: solid var(--yo-mid);
  border-width: 0 0.2rem 0 0.6rem;
}
blockquote p { margin: 0 0 0.6rem; }
cite {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  font-size: 0.85rem;
}
cite::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  background-color: var(--yo-ink);
}

/* terminal look shared by the code blocks and the console sections */
pre, .console {
  position: relative;
  background-color: #332f27;
  color: #dcd8c0;
  border: var(--yo-line) solid var(--yo-ink);
  border-left: 0.35rem solid var(--yo-green);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-family: var(--yo-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  letter-spacing: 0.02rem;
  overflow-x: auto;
  tab-size: 4;
}
/* small square marker in the bottom-right of a console block */
pre::after, .console::after {
  content: "";
  position: absolute;
  bottom: 0.55rem;
  right: 0.7rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--yo-green);
  pointer-events: none;
}
pre code { background: transparent; padding: 0; }
code {
  font-family: var(--yo-mono);
  font-size: 0.88em;
  background-color: var(--yo-mid);
  padding: 0.05em 0.4em;
}
.console .cursor::after {
  content: "█";
  animation: blink 1s steps(1) infinite;
  margin-left: 0.2rem;
}
@keyframes blink { 50% { opacity: 0; } }

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}
.status {
  background-color: var(--yo-mid);
  padding: 0.8rem 1rem;
  display: block;
  color: inherit;
  text-decoration: none;
}
.status:hover { background-color: var(--yo-ink); text-decoration: none; }
.status .ok { color: var(--yo-green); font-weight: bold; }
.status .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: #6b6557;
  margin-bottom: 0.3rem;
}
.status p { margin: 0.5rem 0 0; font-size: 0.9rem; }

/* ---- blog ---- */
article.post {
  background-color: var(--yo-ink);
  padding: 1.1rem 1.3rem;
  margin: 1rem 0;
}
article.post time {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  color: var(--yo-ink);
  background-color: var(--yo-mid);
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}
article.post h2 { margin: 0.3rem 0 0.6rem; border: none; padding: 0; letter-spacing: 0.2rem; display: block; counter-increment: none; }
article.post h2::before, article.post h2::after { content: none; }

/* ---- wireframe shooter ---- */
.shooter-wrap {
  background-color: var(--yo-ink);
  padding: 0.6rem;
  max-width: 720px;
  margin: 1.2rem auto;
}
#yo-shooter {
  display: block;
  width: 100%;
  height: auto;
  background: var(--yo-bg);
  cursor: var(--yo-cursor);
}
#yo-shooter:active { cursor: var(--yo-cursor-active); }
.shooter-hud {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0.2rem 0;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---- buttons ---- */
button {
  position: relative;
  z-index: 1;
  padding: 0.5rem 1.2rem;
  font: inherit;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--yo-ink);
  background-color: var(--yo-mid);
  border: none;
  overflow: hidden;
}
button::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  background-color: var(--yo-ink);
  z-index: -1;
  transition: width 0.2s ease-out;
}
button:hover {
  background-color: transparent;
  color: var(--yo-panel);
}
button:hover::after { width: 100%; }

.yo-note {
  font-size: 0.8rem;
  letter-spacing: 0.08rem;
  color: #6b6557;
}

footer.site {
  border-top: var(--yo-line) solid var(--yo-ink);
  padding: 1.2rem 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 0.85rem;
}
footer.site .player {
  margin-top: 0.7rem;
  letter-spacing: 0.1rem;
}
footer.site .player button {
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  margin: 0 0.25rem;
}

@media (max-width: 560px) {
  header.site .wrap { flex-direction: column; align-items: flex-start; }
  h1, .hero h1 { letter-spacing: 0.3rem; font-size: 2rem; }
}

/* ------------------------------------------------------------------
   Infection / glitch mode (body.glitch, driven by glitch.js)
------------------------------------------------------------------- */
.alarm {
  display: none;
}
body.glitch::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  background: repeating-linear-gradient(0deg, rgba(20,10,10,0.16) 0 1px, transparent 1px 3px);
  animation: yo-scan 0.14s steps(2) infinite;
}
@keyframes yo-scan { from { transform: translateY(0); } to { transform: translateY(3px); } }
@keyframes yo-blink { 50% { opacity: 0.4; } }

body.glitch .alarm {
  display: block;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10000;
  background: var(--yo-red);
  color: #f4e9d0;
  padding: 0.5rem 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-weight: bold;
  animation: yo-blink 0.5s steps(1) infinite;
}
body.glitch .alarm button {
  margin-left: 1rem;
  background: #f4e9d0;
  color: var(--yo-red);
}

body.glitch header.site,
body.glitch footer.site,
body.glitch h1, body.glitch h2, body.glitch h3 {
  animation: yo-jitter 0.16s steps(2) infinite;
}
@keyframes yo-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, 0); }
}
body.glitch h1, body.glitch h2, body.glitch h3 {
  text-shadow:
    0.3rem 0.3rem 0 var(--yo-mid),
    -2px 0 0 rgba(255, 0, 60, 0.7),
    2px 0 0 rgba(0, 255, 200, 0.6);
}
body.glitch .status { background-color: var(--yo-red); }
body.glitch .status .ok { color: var(--yo-red); }
body.glitch .status .label { color: #9c2f2f; }
body.glitch .console, body.glitch pre { border-color: var(--yo-red); color: #e8b0b0; }
body.glitch .shooter-hud { color: var(--yo-red); }

/* during the infection, green status words flip to their red alternates */
.ok[data-alt] { position: relative; }
body.glitch .ok[data-alt] { color: transparent; }
body.glitch .ok[data-alt]::before {
  content: attr(data-alt);
  position: absolute;
  left: 0;
  color: var(--yo-red);
  animation: yo-jitter 0.2s steps(2) infinite;
}

/* a tiny eggplant mark in the header (click it 5x to infect) */
.eggplant {
  display: inline-block;
  width: 0.8em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
  background: radial-gradient(ellipse at 38% 30%, #7a4aa6 0%, #4d2c74 100%);
  border: 0.1em solid var(--yo-ink);
  border-radius: 45% 55% 58% 42% / 72% 72% 28% 28%;
}

/* ------------------------------------------------------------------
   Rebuild additions
------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; line-height: 1; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand:hover .site-title { text-decoration: underline; text-decoration-thickness: 0.1rem; text-underline-offset: 0.22rem; }
.brand .eggplant { margin-right: 0; }

.note { color: #6b6557; font-size: 0.95rem; margin: 0.6rem 0; }
.note a { color: inherit; }

ul.plain { margin: 0 0 1rem 1.1rem; padding: 0; }
ul.plain li { margin: 0.2rem 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  background: var(--yo-mid);
  color: inherit;
  padding: 0.15rem 0.5rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.tag:hover { background: var(--yo-ink); color: var(--yo-panel); text-decoration: none; }

/* keep long hostnames / emails inside their cards */
.status,
.status .label,
.status .host,
.status p { overflow-wrap: anywhere; word-break: break-word; }
.status .host { display: block; }

/* projects */
.project .label { font-size: 1rem; }
.project .pname { text-transform: none; letter-spacing: 0.05rem; }
a.pname { color: inherit; }
.project .prow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.25rem; }

/* projects get wider columns than status cards so the text stays readable */
.project-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.project { padding: 1.2rem 1.4rem; }

/* synth visualizer as a barely-visible page background.
   The band behind the content column is masked lighter so it never competes
   with copy; everything else keeps the full reading. */
#yo-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.07;
  pointer-events: none;
  background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 30rem 100% at 50% 50%, rgba(0,0,0,0.28) 0%, #000 100%);
  mask-image: radial-gradient(ellipse 30rem 100% at 50% 50%, rgba(0,0,0,0.28) 0%, #000 100%);
}

/* the service map boxes: big enough to hold the data */
.service-map {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.service-map .status {
  padding: 1.1rem 1.3rem;
  min-height: 5.5rem;
}
.service-map .status .host {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------
   Hero / profile readout
------------------------------------------------------------------- */
.divider {
  height: 0.5rem;
  margin: 1.4rem 0;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--yo-ink), var(--yo-ink)),
    linear-gradient(var(--yo-ink), var(--yo-ink)),
    linear-gradient(var(--yo-ink), var(--yo-ink)),
    linear-gradient(var(--yo-mid), var(--yo-mid));
  background-size: 4rem 0.5rem, 1.2rem 0.5rem, 1.2rem 0.5rem, 100% var(--yo-line);
  background-position: 0 0, 4.6rem 0, 6.2rem 0, 0 calc((0.5rem - var(--yo-line)) / 2);
}
.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.2rem 2rem;
  margin: 1.2rem 0 0;
}
.readout > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: var(--yo-line) solid var(--yo-mid);
  padding: 0.35rem 0;
  min-width: 0;
}
.readout dt {
  flex: 0 0 auto;
  font-family: var(--yo-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--yo-muted);
}
.readout dd { margin: 0; text-align: right; min-width: 0; }

.hero { padding-top: 1rem; }
.hero .tagline { margin-top: 0.2rem; }

/* a small status LED, used on the service map */
.status .led {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  background-color: var(--yo-green);
  box-shadow: 0 0 0 0.14rem rgba(63,122,58,0.22);
  vertical-align: middle;
}
body.glitch .status .led { background-color: var(--yo-red); box-shadow: 0 0 0 0.14rem rgba(138,47,47,0.28); }

/* ------------------------------------------------------------------
   Hit feedback: a short, localised glitch when the player takes damage
   (body.yo-hit is toggled for ~0.4s by the shooter)
------------------------------------------------------------------- */
body.yo-hit::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(138,47,47,0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, rgba(138,47,47,0) 55%, rgba(138,47,47,0.22) 100%);
  animation: yo-hit-flash 0.42s steps(1) 1 both;
}
body.yo-hit header.site,
body.yo-hit .sysbar,
body.yo-hit h1, body.yo-hit h2,
body.yo-hit .shooter-wrap { animation: yo-hit-jitter 0.42s steps(2) 1; }
body.yo-hit #yo-shooter { filter: contrast(1.12) saturate(1.25); }
@keyframes yo-hit-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes yo-hit-jitter {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); }
  75%  { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------------
   Atmosphere layers (subtle / full), toggled from the footer.
   The default is set by hud.js; reduced-motion always wins (see below).
------------------------------------------------------------------- */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(ellipse at center, rgba(69,65,56,0) 52%, rgba(69,65,56,0.30) 100%);
}
html::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 9997;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-atmos="subtle"]::after { opacity: 0.55; }
html[data-atmos="full"]::after { opacity: 1; }
html[data-atmos="full"]::before { opacity: 0.045; animation: yo-grain 0.7s steps(3) infinite; }
@keyframes yo-grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2%, 1%); }
  66%  { transform: translate(1%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------------
   Reduced motion: kill every decorative animation
------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .console .cursor::after { animation: none; }
  body.glitch::before { animation: none; }
  body.glitch .alarm { animation: none; }
  body.glitch header.site, body.glitch footer.site,
  body.glitch h1, body.glitch h2, body.glitch h3 { animation: none; }
  .ok[data-alt]::before { animation: none; }
  html[data-atmos="full"]::before { animation: none; }
  button::after { transition: none; }
  main a:not(.tag):not(.status):not(.pname):not(.plink) { transition: none; }
  #yo-bg { display: none; }
  body.yo-hit::after,
  body.yo-hit header.site, body.yo-hit .sysbar,
  body.yo-hit h1, body.yo-hit h2, body.yo-hit .shooter-wrap { animation: none; }
}
