/* ==========================================================================
   IDEVSLOP/OS — CRT archive terminal
   Single static page. No framework, no build step.
   ========================================================================== */

@font-face {
  font-family: "VT323";
  src: url("../fonts/vt323.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cascadia Mono Web";
  src: url("../fonts/cascadia-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --black: #000000;
  --screen: #020202;
  --panel: #050505;
  --ink: #f4f4f4;
  --dim: #a8a8a8;
  --faint: #757575;
  --line: rgba(255, 255, 255, 0.28);
  --line-soft: rgba(255, 255, 255, 0.12);
  --glow: 0 0 2px rgba(255, 255, 255, 0.35), 0 0 10px rgba(255, 255, 255, 0.09);
  --glow-strong: 0 0 3px rgba(255, 255, 255, 0.55), 0 0 18px rgba(255, 255, 255, 0.16);
  --sans: "VT323", "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --mono: "Cascadia Mono Web", "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #000;
  scrollbar-color: #333 #000;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, #0a0a0a 0%, #030303 55%, #000 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

::selection {
  background: var(--ink);
  color: #000;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #333 #000;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 999;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: #000;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.dim {
  color: var(--dim);
}

.dimmer {
  color: var(--faint);
}

.inline-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.inline-link:hover {
  background: var(--ink);
  color: #000;
  text-decoration: none;
}

.inline-cmd {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.inline-cmd:hover {
  background: var(--ink);
  color: #000;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Monitor / bezel
   -------------------------------------------------------------------------- */

.monitor {
  height: 100vh;
  height: 100dvh;
  padding: clamp(4px, 1.4vw, 22px);
  display: flex;
}

.bezel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: clamp(5px, 0.9vw, 13px);
  border: 1px solid #1d1d1d;
  border-radius: clamp(10px, 1.8vw, 26px);
  background:
    linear-gradient(160deg, #101010 0%, #060606 40%, #0b0b0b 100%);
  box-shadow:
    inset 0 0 0 1px #050505,
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 30px 100px rgba(0, 0, 0, 0.9);
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: clamp(7px, 1.3vw, 18px);
  background: #000;
  box-shadow:
    inset 0 0 80px rgba(255, 255, 255, 0.06),
    inset 0 0 12px rgba(255, 255, 255, 0.08),
    0 0 0 1px #242424,
    0 0 0 2px #050505;
}

.screen-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
}

/* --------------------------------------------------------------------------
   OS bar
   -------------------------------------------------------------------------- */

.os-bar {
  flex: 0 0 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(10px, 2vw, 22px);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.os-id {
  justify-self: start;
  color: var(--ink);
}

.os-id .dim {
  color: var(--faint);
}

.os-mode {
  justify-self: center;
  color: var(--faint);
}

.os-clock {
  justify-self: end;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Terminal
   -------------------------------------------------------------------------- */

.terminal {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(14px, 2.3vw, 32px) clamp(14px, 2.6vw, 38px) clamp(12px, 2vw, 24px);
  cursor: text;
}

.terminal-out {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  font-size: clamp(18px, 1.34vw, 22px);
  line-height: 1.3;
  text-shadow: var(--glow);
}

.line {
  white-space: normal;
  overflow-wrap: anywhere;
}

.line + .line {
  margin-top: 0.04em;
}

.boot-line,
.progress-line,
.preline {
  white-space: pre-wrap;
}

.boot-line {
  color: var(--dim);
}

.boot-line .key {
  color: var(--ink);
}

.boot-gap {
  height: 0.55em;
}

.progress {
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.banner-block {
  margin: clamp(6px, 2.4vh, 30px) 0 clamp(10px, 2vh, 22px);
  text-align: center;
}

.banner {
  display: inline-block;
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(8px, 1.8vw, 27px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
  text-align: left;
  text-shadow: var(--glow-strong);
}

.banner-sub {
  margin-top: 10px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: clamp(8px, 0.78vw, 10px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.welcome {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--dim);
  font-size: 1.02em;
  line-height: 1.4;
  text-align: center;
}

.welcome strong {
  color: var(--ink);
  font-weight: 400;
}

.welcome .cmd-line {
  margin-top: 0.5em;
  color: var(--ink);
}

.boot-hint {
  flex: 0 0 auto;
  padding-bottom: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-align: center;
}

.blink {
  animation: blink 1s steps(1, end) infinite;
}

.terminal-input {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.prompt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(18px, 1.3vw, 21px);
}

.prompt-path {
  flex: 0 0 auto;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: var(--glow);
}

.prompt-user {
  color: var(--ink);
}

.prompt-dir {
  color: var(--dim);
}

.prompt input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  caret-color: var(--ink);
  caret-shape: block;
  outline: none;
  text-shadow: var(--glow);
}

.terminal-hint {
  margin: 7px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-hint .inline-cmd {
  color: var(--dim);
}

.terminal-hint .inline-cmd:hover {
  color: #000;
}

/* --------------------------------------------------------------------------
   Terminal output details
   -------------------------------------------------------------------------- */

.help-list {
  display: grid;
  grid-template-columns: 10ch 1fr;
  gap: 2px 14px;
  margin: 6px 0;
}

.help-list dt {
  margin: 0;
}

.help-list dd {
  margin: 0;
  color: var(--dim);
}

.help-list .inline-cmd {
  color: var(--ink);
}

.help-rule {
  margin: 2px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.9em;
  letter-spacing: 0.02em;
}

.about-block {
  max-width: 72ch;
  margin: 6px 0;
}

.about-block p {
  margin: 0 0 0.55em;
}

.about-block a {
  color: var(--ink);
}

.about-profile {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 78ch;
}

.about-avatar-link {
  flex: 0 0 auto;
  display: inline-block;
  line-height: 0;
}

.about-avatar {
  display: block;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  background: #000;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.about-avatar-link:hover .about-avatar,
.about-avatar-link:focus-visible .about-avatar {
  border-color: var(--ink);
}

.about-copy {
  min-width: 0;
}

.about-handle {
  overflow-wrap: anywhere;
}

.ascii-small {
  margin: 8px 0;
  font-family: var(--mono);
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.1;
  white-space: pre;
  color: var(--ink);
}

/* Seshat command advertisement -------------------------------------------- */

.terminal-ad {
  max-width: 800px;
  margin: 6px 0;
}

.terminal-ad .ad-eyebrow {
  margin: 0 0 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.terminal-ad h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-shadow: var(--glow-strong);
}

.terminal-ad p {
  max-width: 72ch;
  margin: 0 0 8px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.5;
}

.terminal-ad .ad-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-ad .ad-links a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.terminal-ad .ad-links a:hover {
  background: var(--ink);
  color: #000;
  text-decoration: none;
}

.terminal-ad .ad-figure {
  margin: 14px 0 0;
  border: 1px solid var(--line-soft);
  background: #000;
}

.terminal-ad .ad-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terminal-ad .ad-figure figcaption a {
  color: var(--faint);
  text-decoration: none;
}

.terminal-ad .ad-figure figcaption a:hover,
.terminal-ad .ad-figure figcaption a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terminal-ad .ad-figure video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* Snake minigame ----------------------------------------------------------- */

.snake-panel {
  width: min(100%, 820px);
  margin: 10px 0 6px;
  border: 1px solid var(--line-strong);
  background: #000;
  font-family: var(--mono);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.snake-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.snake-title {
  color: var(--ink);
  text-shadow: var(--glow);
}

.snake-stats {
  color: var(--faint);
}

.snake-stats b {
  color: var(--ink);
  font-weight: 400;
}

.snake-hint {
  margin-left: auto;
  color: var(--faint);
}

.snake-board {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  outline: none;
}

.snake-board:focus-visible {
  box-shadow: inset 0 0 0 1px var(--ink);
}

.snake-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
}

.snake-dpad {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(2, 28px);
  gap: 4px;
}

.snake-dpad button:nth-child(1) { grid-column: 2; grid-row: 1; }
.snake-dpad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.snake-dpad button:nth-child(3) { grid-column: 2; grid-row: 2; }
.snake-dpad button:nth-child(4) { grid-column: 3; grid-row: 2; }

.snake-dpad button,
.snake-actions button {
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.snake-dpad button {
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.snake-actions {
  display: flex;
  gap: 6px;
}

.snake-actions button {
  padding: 8px 12px;
}

.snake-dpad button:hover,
.snake-dpad button:focus-visible,
.snake-actions button:hover,
.snake-actions button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: #000;
  outline: none;
}

.noscript-panel {
  max-width: 54ch;
  margin: 40px auto;
  padding: 20px;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
}

.noscript-panel a {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Desktop / project archive
   -------------------------------------------------------------------------- */

.desktop {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background-color: #020202;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
}

.desktop-bar {
  flex: 0 0 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.62);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desktop-menus {
  display: flex;
  gap: 14px;
}

.desktop-menus span:first-child {
  color: var(--ink);
}

.desktop-title {
  justify-self: center;
  color: var(--dim);
}

.desktop-sync {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.desktop-sync:hover,
.desktop-sync:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.desktop-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 42px) clamp(18px, 4vw, 56px) 26px;
}

.desktop-heading {
  max-width: 900px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.desktop-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4.6vw, 62px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-shadow: var(--glow-strong);
}

.desktop-heading p:last-child {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--dim);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.4;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.object {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.44);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.object::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dotted rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.object:hover,
.object:focus-visible {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
  transform: translateY(-2px);
}

.object:focus-visible {
  box-shadow: 0 0 0 1px var(--ink), 0 0 26px rgba(255, 255, 255, 0.18);
}

.object-screen {
  align-self: center;
  margin: 4px 0 5px;
  color: var(--ink);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.object-logo {
  display: block;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(11px, 1.12vw, 17px);
  line-height: 1.04;
  letter-spacing: 0;
  white-space: pre;
}

.object-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.object-desc {
  display: -webkit-box;
  min-height: 2.65em;
  overflow: hidden;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.object-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.object-lang {
  color: var(--ink);
}

.object-badge {
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--dim);
}

.object-stat {
  color: var(--dim);
}

.object-updated {
  margin-left: auto;
}

.object.is-shortcut {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.015);
}

.object.is-shortcut::before {
  border: 0;
}

.object-shortcut-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.object.is-shortcut .object-name {
  flex: 0 0 auto;
  font-size: 11px;
}

.object.is-shortcut .object-desc {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: visible;
  font-size: 13px;
}

.object.is-shortcut .object-lang,
.object.is-shortcut .object-badge {
  display: none;
}

.object.is-shortcut .object-foot {
  width: auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  flex-wrap: nowrap;
}

.object.is-shortcut .object-updated {
  color: var(--ink);
}

.object.is-shortcut:hover,
.object.is-shortcut:focus-visible {
  transform: none;
}

.desktop-note {
  margin: 18px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.object-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  text-align: center;
}

.empty-logo {
  margin: 0 0 14px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.1;
  white-space: pre;
}

.object-empty p {
  margin: 0 0 12px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.taskbar {
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  background: #040404;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-btn {
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.task-btn:hover {
  background: var(--ink);
  color: #000;
}

.task-active {
  padding: 4px 2px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

.task-meta {
  color: var(--dim);
}

.task-hint {
  margin-left: auto;
  white-space: nowrap;
}

.desktop-close {
  position: absolute;
  top: 40px;
  right: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  text-shadow: var(--glow);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.desktop-close:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #000;
}

.desktop-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.desktop-close:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   Object inspector window
   -------------------------------------------------------------------------- */

.window-scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.58);
}

.window {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  width: min(680px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  border: 1px solid var(--ink);
  background: #050505;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 4px var(--line),
    0 28px 90px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%);
}

.window-bar {
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  background: var(--ink);
  color: #000;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-controls > span {
  opacity: 0.6;
}

.window-controls button {
  padding: 1px 4px;
  border: 0;
  background: transparent;
  color: #000;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.window-controls button:hover {
  background: #000;
  color: var(--ink);
}

.window-body {
  display: flex;
  gap: 22px;
  padding: 24px;
  overflow: auto;
}

.window-logo {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: pre;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.window-copy {
  min-width: 0;
}

.window-kicker {
  margin: 0 0 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.15em;
}

.window-copy h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.window-desc {
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.4;
}

.window-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin: 0 0 20px;
  border-top: 1px solid var(--line-soft);
}

.window-meta > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.window-meta dt {
  margin-bottom: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.window-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
}

.window-link {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.window-link:hover {
  background: var(--ink);
  color: #000;
}

.window-link[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--faint);
  cursor: default;
}

.window-link[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--faint);
}

.window-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.window-release-note {
  margin: 10px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-transform: uppercase;
}

.window-readme {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.window-readme-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.window-readme-body {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.window-readme-body > :first-child {
  margin-top: 0;
}

.window-readme-body > :last-child {
  margin-bottom: 0;
}

.window-readme-body h1,
.window-readme-body h2,
.window-readme-body h3,
.window-readme-body h4,
.window-readme-body h5,
.window-readme-body h6 {
  margin: 22px 0 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.window-readme-body h1 {
  font-size: 18px;
}

.window-readme-body h2 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.window-readme-body h3 {
  font-size: 12px;
}

.window-readme-body h4,
.window-readme-body h5,
.window-readme-body h6 {
  font-size: 10px;
  color: var(--dim);
}

.window-readme-body p {
  margin: 0 0 12px;
}

.window-readme-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.window-readme-body a:hover {
  background: var(--ink);
  color: #000;
  text-decoration: none;
}

.window-readme-body .anchor {
  display: none;
}

.window-readme-body img {
  max-width: 100%;
  height: auto;
}

.window-readme-body img[width] {
  border: 1px solid var(--line-soft);
}

.window-readme-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  border: 1px solid var(--line-soft);
  background: #000;
}

.window-readme-body ul,
.window-readme-body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.window-readme-body li {
  margin-bottom: 4px;
}

.window-readme-body blockquote {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 2px solid var(--line);
  color: var(--faint);
}

.window-readme-body code {
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 0.95em;
}

.window-readme-body pre {
  overflow-x: auto;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: #000;
}

.window-readme-body pre code {
  padding: 0;
  background: none;
}

.window-readme-body table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 10px;
}

.window-readme-body th,
.window-readme-body td {
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  text-align: left;
}

.window-readme-body th {
  color: var(--ink);
  font-weight: 400;
}

.window-readme-body hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

.window-readme-body details {
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
}

.window-readme-body summary {
  color: var(--ink);
  cursor: pointer;
}

.window-readme-body .octicon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.window-readme-body .readme-empty {
  margin: 0;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.window-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   CRT overlay
   -------------------------------------------------------------------------- */

.crt {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  filter: url("#crt-warp");
}

.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.5) 100%);
}

.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 26%,
    transparent 72%,
    rgba(255, 255, 255, 0.025) 100%
  );
  mix-blend-mode: screen;
}

.crt-noise {
  position: absolute;
  inset: -20%;
  background-image: url("../img/noise.png");
  background-size: 160px;
  mix-blend-mode: screen;
  opacity: 0.38;
  animation: noise-shift 0.4s steps(2, end) infinite;
}

.crt-scanbar {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  height: 14%;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: scan 7s linear infinite;
}

.crt-glass {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, transparent 48%, rgba(0, 0, 0, 0.2) 100%);
  animation: flicker 5.5s infinite;
}

body.no-fx .crt,
body.no-fx .power {
  display: none;
}

.power {
  display: none;
}

.bezel-foot {
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 5px;
  color: #3f3f3f;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bezel-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.8);
  animation: led 3.2s ease-in-out infinite;
}

.fx-toggle {
  margin-left: auto;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: #6f6f6f;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.fx-toggle:hover {
  color: var(--ink);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes led {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes scan {
  from { top: -20%; }
  to { top: 120%; }
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

@keyframes flicker {
  0%, 100% { opacity: 0.86; }
  2% { opacity: 1; }
  4% { opacity: 0.82; }
  6% { opacity: 1; }
  55% { opacity: 0.92; }
  56% { opacity: 1; }
  57% { opacity: 0.88; }
  58% { opacity: 1; }
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.notfound-code {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(72px, 14vw, 180px);
  line-height: 0.9;
  letter-spacing: 0.08em;
  text-shadow: var(--glow-strong);
}

.notfound h1 {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.notfound p:not(.notfound-code) {
  max-width: 52ch;
  margin: 0;
  color: var(--dim);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
}

.notfound .window-link {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .object-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .task-hint {
    display: none;
  }

  .window-logo {
    font-size: 12px;
  }
}

@media (max-width: 680px) {
  .monitor {
    padding: 4px;
  }

  .bezel {
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  .screen {
    border-radius: 8px;
  }

  .os-bar {
    flex-basis: 26px;
    grid-template-columns: 1fr auto;
    padding: 0 10px;
    font-size: 8px;
  }

  .os-mode {
    display: none;
  }

  .terminal {
    gap: 7px;
    padding: 14px 14px 10px;
  }

  .terminal-out {
    font-size: 19px;
    line-height: 1.3;
  }

  .banner {
    font-size: clamp(7px, 2.05vw, 11px);
  }

  .banner-sub {
    font-size: 7px;
    letter-spacing: 0.22em;
  }

  .welcome {
    font-size: 0.98em;
  }

  .terminal-input {
    padding-top: 8px;
  }

  .prompt {
    gap: 6px;
    font-size: 18px;
  }

  .prompt-path {
    font-size: 0.86em;
  }

  .terminal-hint {
    font-size: 7.5px;
    letter-spacing: 0.08em;
  }

  .hide-mobile {
    display: none;
  }

  .terminal-ad {
    max-width: none;
  }

  .terminal-ad h2 {
    font-size: 30px;
  }

  .terminal-ad p {
    font-size: 14px;
  }

  .about-profile {
    gap: 12px;
  }

  .about-avatar {
    width: 64px;
    height: 64px;
  }

  .snake-hud {
    gap: 8px 12px;
  }

  .snake-hint {
    margin-left: 0;
  }

  .desktop-menus {
    display: none;
  }

  .desktop-bar {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 0 10px;
    font-size: 7.5px;
  }

  .desktop-title {
    justify-self: start;
  }

  .desktop-body {
    padding: 18px 14px 20px;
  }

  .desktop-heading h2 {
    font-size: clamp(30px, 9vw, 46px);
  }

  .desktop-heading p:last-child {
    font-size: 14px;
  }

  .object-grid {
    grid-template-columns: 1fr;
  }

  .object {
    padding: 16px 16px 12px;
  }

  .object-logo {
    font-size: 12px;
  }

  .object-desc {
    min-height: 0;
  }

  .object.is-shortcut {
    flex-wrap: wrap;
  }

  .object.is-shortcut .object-desc {
    flex-basis: 100%;
    order: 3;
  }

  .object.is-shortcut .object-foot {
    margin-left: auto;
  }

  .taskbar {
    flex-basis: 30px;
    gap: 8px;
    font-size: 7px;
  }

  .desktop-close {
    top: 36px;
    right: 12px;
    width: 46px;
    height: 46px;
    font-size: 32px;
  }

  .task-meta {
    margin-left: auto;
  }

  .window {
    width: calc(100% - 16px);
    max-height: calc(100% - 24px);
  }

  .window-body {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .window-logo {
    align-self: center;
    font-size: 11px;
  }

  .window-meta {
    gap: 0 12px;
  }

  .window-foot span:last-child {
    display: none;
  }

  .bezel-foot {
    font-size: 6px;
  }
}

@media (max-height: 620px) {
  .banner-block {
    margin: 2px 0 8px;
  }

  .banner {
    font-size: clamp(6px, 1.3vw, 12px);
  }

  .banner-sub {
    margin-top: 4px;
  }

  .terminal {
    padding-top: 10px;
  }

  .os-bar {
    flex-basis: 24px;
  }
}

/* --------------------------------------------------------------------------
   Lite mode — narrow, touch, or reduced-motion devices
   Keeps the static CRT frame, drops the expensive filter and animated layers.
   -------------------------------------------------------------------------- */

@media (max-width: 680px), (hover: none) and (pointer: coarse), (prefers-reduced-motion: reduce) {
  .screen-content {
    transform: none;
  }

  .crt {
    filter: none;
  }

  .crt-noise,
  .crt-scanbar,
  .crt-glass,
  .crt::after {
    display: none;
  }

  .crt::before {
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
    opacity: 0.7;
  }

  .terminal-out,
  .terminal-out *,
  .desktop,
  .desktop *,
  .notfound,
  .notfound *,
  .bezel-foot,
  .bezel-foot * {
    text-shadow: none !important;
  }

  .bezel {
    box-shadow: inset 0 0 0 1px #050505;
  }

  .screen {
    box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.04);
  }

  .object,
  .window,
  .snake-panel,
  .bezel-led {
    box-shadow: none;
  }

  .object:hover,
  .object:focus-visible {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .crt-scanbar,
  .crt-noise {
    animation: none;
  }

  .power {
    display: none;
  }
}
