/* =========================================================
   PERSONAL.DEV — cyberpunk CRT dashboard
   ========================================================= */

/* ===== custom faces — Cyberpunk display + Blender Pro body ===== */
@font-face {
  font-family: "Cyberpunk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/Cyberpunk.otf") format("opentype");
}

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

:root {
  /* base — warm red-black */
  --bg-0: #0a0506;
  --bg-1: #120708;
  --bg-2: #1a0a0c;
  --ink: #e8dcbf;
  --ink-dim: #d4c9a3;
  --ink-mute: #9c906b;
  --ink-faint: #4a3a2a;

  /* primary — neon arterial red */
  --hue-1: #ff1f3d;
  --hue-1-soft: #ff1f3d66;
  --hue-1-faint: #ff1f3d22;
  /* secondary — bone white */
  --hue-2: #e8dcd6;
  --hue-2-soft: #e8dcd655;
  --hue-2-faint: #e8dcd618;
  /* reserved neon accent — acid green (use sparingly) */
  --acid: #b6ff3a;
  --acid-soft: #b6ff3a55;
  --acid-faint: #b6ff3a18;

  /* fonts — Cyberpunk display headings · Blender Pro body & code */
  --f-pixel: "BlenderProBook", "IBM Plex Mono", ui-monospace, monospace;
  --f-mono: "JetBrains Mono", ui-monospace, "Fira Code", Consolas, monospace;
  --f-tiny: "BlenderProBook", "Titillium Web", ui-sans-serif, system-ui, sans-serif;
  --f-display: "Chakra Petch", "Titillium Web", sans-serif;

  --r-sm: 0;
  --r-md: 0;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ===== unified blood-red identity — all tabs share one palette ===== */
body.theme-tokyo,
body.theme-y2k,
body.theme-vapor,
body.theme-cyber {
  --hue-1: #ff1f3d;
  --hue-1-soft: #ff1f3d66;
  --hue-1-faint: #ff1f3d22;
  --hue-2: #e8dcd6;
  --hue-2-soft: #e8dcd655;
  --hue-2-faint: #e8dcd618;
}

* {
  box-sizing: border-box;
}

/* images never overflow their column; class rules override where sized */
img {
  max-width: 100%;
  height: auto;
}

/* headings — Cyberpunk display face (route bare h1–h6 to --f-display) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-display);
  letter-spacing: normal;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: #d4c9a3;
  font-family: var(--f-pixel);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.15em;
  text-shadow: none;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: justify;
  /* image-rendering: pixelated; */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  transition: --hue-1 0.6s var(--ease), --hue-2 0.6s var(--ease);
  /* Cyberpunk pixel-art background + dim filter overlay for text readability */
  background:
    linear-gradient(rgba(10, 5, 6, 0.2), rgba(10, 5, 6, 0.2)),
    url('assets/blackwall.gif') center center / cover no-repeat fixed;
}

/* ===================== background layers ===================== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 90%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 15%, var(--hue-1-faint), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 85%, var(--hue-2-faint), transparent 70%),
    radial-gradient(ellipse 80% 80% at 50% 120%, var(--hue-1-faint), transparent 60%);
  transition: background 0.6s var(--ease);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0.22) 2px,
      rgba(0, 0, 0, 0) 3px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}

/* repurposed as a fine film-grain / digital-corruption layer */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

.sparkle-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.sparkle-field span {
  position: absolute;
  background: var(--ink-mute);
  opacity: 0.35;
  animation: spark 3.4s var(--ease) infinite;
}

@keyframes spark {

  0%,
  100% {
    opacity: 0.05;
    transform: scale(0.8);
  }

  50% {
    opacity: 0.45;
    transform: scale(1);
  }
}

/* ===================== topbar ===================== */
.topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 28px 60px;
  background: rgba(0, 0, 0, 0);
}

.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50%;
  transform: translate(-50%, -50%);
}

.brand-chip img {
  height: 90px;
  width: auto;
  object-fit: stretch;
  display: block;
}

.brand-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: var(--hue-1);
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 0 6px var(--hue-1-soft);
}

.brand-dot::before {
  content: "\26E7";
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--hue-1);
  text-shadow: 0 0 6px var(--hue-1-soft);
  animation: rgb-jitter 3.2s steps(2, end) infinite;
}

.greet-line {
  min-width: 0;
}

.greet {
  font-family: var(--f-pixel);
  font-size: 22px;
  color: var(--hue-1);
  line-height: 1.1;
  text-shadow: 0 0 10px var(--hue-1-soft);
}

.greet .accent {
  color: var(--hue-1);
}

.motd {
  font-family: var(--f-pixel);
  font-size: 16px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  grid-column: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  grid-column: end;
}

.thumb-frame {
  width: 64px;
  height: 38px;
  border: 2px solid var(--hue-1);
  padding: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.date-block {
  font-family: var(--f-pixel);
  text-align: right;
  color: var(--hue-1);
  line-height: 1.1;
}

.date-main {
  font-size: 18px;
  letter-spacing: 1px;
}

.date-year {
  font-size: 14px;
  color: var(--ink-mute);
}

.clock-frame {
  padding: 6px 12px;
  border: 2px solid var(--hue-2);
  background: var(--hue-2-faint);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  border-radius: var(--r-sm);
  animation: crt-flicker 7.3s steps(1, end) infinite;
}

.clock {
  font-family: var(--f-pixel);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--hue-2);
  text-shadow: 0 0 8px var(--hue-2-soft);
}

.sign-out {
  width: 100%;
  height: 100%;
  object-fit: cover;
  grid-column: 1;
  align-self: bottom;
  image-rendering: pixelated;
  display: block;
}

/* ===================== main tabs =====================
   Edge-to-edge bar. Each tab has a fixed section accent (its
   own colour identity) that stays consistent across themes.
   Active tab glows brighter, thicker top marker + underline.
*/
.main-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 13px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.28);
}

.main-tab {
  --tab-c: var(--hue-1);
  position: relative;
  background: transparent;
  border: 0;
  padding: 6px 30px 10px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--f-tiny);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-dim);
  cursor: pointer;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.18s var(--ease), text-shadow 0.18s var(--ease);
}

/* glowing red pipe separator between items */
.main-tab+.main-tab::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: var(--hue-1);
  box-shadow: 0 0 9px var(--hue-1);
}

.main-tab:hover {
  color: var(--ink);
}

/* number plate hidden in pipe nav (kept in DOM for JS/markup) */
.main-tab .mt-num {
  display: none;
}

.main-tab .mt-label {
  font-size: inherit;
}

/* active: red label + glowing acid underline */
.main-tab.active {
  color: var(--hue-1);
  text-shadow: 0 0 10px var(--hue-1-soft);
}

.main-tab.active::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 2px;
  height: 3px;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid), 0 -2px 14px var(--acid-soft);
}

/* ===================== stage ===================== */
.stage {
  position: relative;
  z-index: 4;
  flex: 1;
  padding: 26px 28px 28px;
  overflow-y: auto;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
}

.pane {
  display: none;
}

.pane.active {
  display: block;
  animation: fade-in 0.35s var(--ease);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ===================== frame ===================== */
.frame {
  position: relative;
  border: 2px solid var(--hue-1);
  background: rgba(10, 5, 6, 0.92);
  padding: 22px 24px 20px;
  margin-bottom: 22px;
  box-shadow:
    0 0 0 1px var(--hue-1-faint),
    6px 6px 0 rgba(0, 0, 0, 0.55);
  grid-column: 1/3;
}

.frame::before,
.frame::after {
  content: "\2720";
  position: absolute;
  font-family: var(--f-pixel);
  color: var(--hue-1);
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 0 4px var(--hue-1-soft);
}

.frame::before {
  top: -8px;
  left: -8px;
}

.frame::after {
  top: -8px;
  right: -8px;
}

/* extra corner pluses on hero frame */
.frame-plus {
  position: absolute;
  font-family: var(--f-pixel);
  color: var(--hue-1);
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 6px var(--hue-1-soft);
}

.frame-plus.tl {
  top: -8px;
  left: -8px;
}

.frame-plus.tr {
  top: -8px;
  right: -8px;
}

.frame-plus.bl {
  bottom: -8px;
  left: -8px;
}

.frame-plus.br {
  bottom: -8px;
  right: -8px;
}

.frame-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-tiny);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.frame-glyph {
  color: var(--hue-1);
}

.frame-fill {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
  color: var(--hue-1);
}

.frame-aux {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 1px;
}

/* ===================== home hero ===================== */
.home-hero {
  display: grid;
  grid-template-columns: 180px 1fr 240px;
  grid-template-rows: auto auto;
  gap: 22px;
  align-items: stretch;
}

.home-hello {
  grid-column: 1 /3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.big-greet {
  grid-column: 1;
  margin: 0;
  font-family: var(--f-pixel);
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.5px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.big-greet .name {
  color: var(--hue-1);
  text-shadow: 0 0 10px var(--hue-1-soft);
}

.prompt {
  margin: 0;
  font-family: var(--f-pixel);
  font-size: 22px;
  color: var(--hue-2);
  text-shadow: 0 0 6px var(--hue-2-soft);
}

.home-portrait {
  grid-column: 1;
  grid-row: 1;
  width: 160px;
  align-self: start;
  border: 2px solid var(--hue-1);
  background: linear-gradient(180deg, var(--hue-1-faint), rgba(0, 0, 0, 0.4));
  padding: 4px;
  aspect-ratio: 1 / 1;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.Profile {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}

.home-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: saturate(1.1) contrast(1.05);
  display: block;
}



.caret {
  display: inline-block;
  margin-left: 4px;
  animation: blink 1.05s steps(1, end) infinite;
  color: var(--hue-2);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.home-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--hue-1-faint);
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--f-pixel);
  font-size: 17px;
}

.stat-k {
  color: var(--hue-1);
  letter-spacing: 1px;
}

.stat-v {
  color: var(--ink);
}

/* ===================== shortcut tiles ===================== */
.tile-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.jump-tile {
  position: relative;
  background: rgba(10, 5, 6, 0.92);
  border: 2px solid var(--hue-1);
  padding: 22px 18px 18px;
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  font-family: var(--f-pixel);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}

.jump-tile::before,
.jump-tile::after {
  content: "\26E7";
  position: absolute;
  color: var(--hue-1-soft);
  font-size: 12px;
  line-height: 1;
}

.jump-tile::before {
  top: 5px;
  left: 7px;
}

.jump-tile::after {
  bottom: 5px;
  right: 7px;
}

.jump-tile:hover {
  transform: translate(-2px, -2px);
  border-color: var(--hue-2);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.5);
}

.tile-glyph {
  font-family: var(--f-pixel);
  font-size: 30px;
  color: var(--hue-1);
  text-shadow: 0 0 10px var(--hue-1-soft);
  margin-bottom: 4px;
}

.tile-name {
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 2px;
}

.tile-sub {
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ===================== dual col layout ===================== */
.dual-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 720px) {
  .dual-col {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-portrait {
    max-width: 160px;
    justify-self: end;
  }
}

/* ===================== activity log ===================== */
.activity-log {
  list-style: none;
  padding: 0;
  margin: 20px;
}

.activity-log li {
  display: grid;
  grid-template-columns: 120px 120px 1fr;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  font-family: var(--f-pixel);
  font-size: 17px;
}

.activity-log .t {
  color: var(--hue-2);
  letter-spacing: 1px;
}

.activity-log .tag {
  font-family: var(--f-pixel);
  font-size: 14px;
  color: var(--hue-1);
  letter-spacing: 1.5px;
}

.tag-lang {
  color: var(--hue-2);
}

.tag-mus {
  color: var(--ink-dim);
}

.tag-work {
  color: var(--hue-2);
}

.tag-foc {
  color: var(--acid);
}

.tag-sys {
  color: var(--ink-mute);
}

.tag-php {
  color: var(--hue-1);
}

.activity-log .msg {
  color: var(--ink-dim);
}

/* ---- Notes feature:

/* a note row = [ time | message (flexible) | ✕ ] */
.activity-log li:has(.note-del) {
  grid-template-columns: 120px 120px 1fr auto;
}

/* let long messages wrap normally instead of stair-stepping */
.activity-log .msg {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* the per-note delete form shouldn't add its own box/spacing */
.note-del {
  margin: 0;
  display: flex;
}

.note-del button {
  font-family: var(--f-pixel);
  font-size: 13px;
  line-height: 1;
  padding: 2px 7px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity .15s ease;
}


/* the add-note form */
.note-form {
  display: flex;
  gap: 8px;
  margin: 16px 0 14px;
}

.note-form .note-input,
.note-form input[type="text"] {
  flex: 1;
  font-size: 15px;
  padding: 6px 10px;
}

.note-form button {
  font-family: var(--f-pixel);
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
}


/* ===================== bar list ===================== */
.bar-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.bar-list li {
  display: grid;
  grid-template-columns: 70px 1fr 50px;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  font-family: var(--f-pixel);
  font-size: 17px;
}

.bk {
  color: var(--hue-1);
  letter-spacing: 1px;
}

.bar {
  position: relative;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hue-1-faint);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background:
    repeating-linear-gradient(90deg,
      var(--hue-1) 0,
      var(--hue-1) 6px,
      transparent 6px,
      transparent 8px);
  box-shadow: 0 0 8px var(--hue-1-soft);
}

.bv {
  color: var(--hue-2);
  text-align: right;
}

/* ===================== queue / todo ===================== */
.queue-head {
  font-family: var(--f-pixel);
  font-size: 18px;
  color: var(--hue-2);
  margin: 8px 0 6px;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-list li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  font-family: var(--f-pixel);
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.todo-list li:hover {
  border-color: var(--hue-1-faint);
  background: rgba(255, 31, 61, 0.05);
}

.cb {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--hue-1);
  position: relative;
}

.todo-list li.done .cb::after {
  content: "×";
  position: absolute;
  inset: -4px 0 0 1px;
  color: var(--hue-1);
  font-size: 18px;
  line-height: 1;
}

.todo-list li.done .lbl {
  color: var(--ink-mute);
  text-decoration: line-through;
}

.qtag {
  font-family: var(--f-pixel);
  font-size: 13px;
  color: var(--hue-2);
  border: 1px solid var(--hue-2);
  padding: 1px 8px;
  letter-spacing: 1px;
}

.qtag-lang {
  color: var(--hue-2);
  border-color: var(--hue-2-soft);
}

.qtag-code {
  color: var(--acid);
  border-color: var(--acid-soft);
}

.qtag-mus {
  color: var(--ink-dim);
  border-color: var(--ink-faint);
}

.qtag-work {
  color: var(--hue-2);
  border-color: var(--hue-2-soft);
}

/* ===================== programming — modules ===================== */
.sub-pane {
  display: none;
}

.sub-pane.active {
  display: block;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 980px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .module-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  position: relative;
  background: rgba(10, 5, 6, 0.92);
  border: 2px solid var(--hue-1);
  padding: 14px 14px 12px;
  text-align: left;
  color: var(--ink);
  font-family: var(--f-pixel);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.module-card::before,
.module-card::after,
.module-card .mc-pl-bl,
.module-card .mc-pl-br {
  content: none;
}

.module-card:hover:not(.locked):not(.empty) {
  transform: translate(-2px, -2px);
  border-color: var(--hue-2);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

.module-card.locked,
.module-card.empty {
  opacity: 0.5;
  cursor: not-allowed;
  background-image: repeating-linear-gradient(45deg, rgba(255, 31, 61, 0.06) 0, rgba(255, 31, 61, 0.06) 8px, transparent 8px, transparent 16px);
}

.mc-head {
  display: inline-block;
  font-family: var(--f-tiny);
  font-size: 9px;
  color: var(--bg-0);
  background: var(--hue-1);
  padding: 3px 7px 2px;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.mc-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--hue-1);
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-shadow: 0 0 8px var(--hue-1-soft);
}

.mc-desc {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 12px;
  min-height: 2.2em;
}

.mc-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hue-1-faint);
  margin-bottom: 6px;
  overflow: hidden;
}

.mc-progress i {
  display: block;
  height: 100%;
  background: var(--hue-1);
  box-shadow: 0 0 8px var(--hue-1-soft);
}

.mc-foot {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 0.5px;
}

.mc-foot-done {
  color: var(--hue-1);
}

.mc-lock {
  font-size: 14px;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 6px;
}

.track-overview {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--hue-1-faint);
}

.to-head {
  font-family: var(--f-pixel);
  font-size: 20px;
  color: var(--hue-1);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--hue-1-soft);
}

.to-body {
  margin: 0;
  font-family: var(--f-pixel);
  font-size: 17px;
  color: var(--ink-dim);
  letter-spacing: 0.6px;
}

.to-body .hl {
  color: var(--hue-2);
  text-shadow: 0 0 6px var(--hue-2-soft);
}

/* ===================== programming — PHP sub-shell ===================== */
.back-btn {
  background: transparent;
  border: 1px solid var(--hue-2);
  color: var(--hue-2);
  font-family: var(--f-pixel);
  font-size: 15px;
  padding: 3px 10px;
  cursor: pointer;
  letter-spacing: 1px;
}

.back-btn:hover {
  background: var(--hue-2-faint);
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--hue-1-faint);
}

.sub-tab {
  background: transparent;
  border: 1px solid var(--hue-1-faint);
  color: var(--ink-mute);
  font-family: var(--f-pixel);
  font-size: 14px;
  padding: 4px 9px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.sub-tab:hover {
  color: var(--ink-dim);
  border-color: var(--hue-1-soft);
}

.sub-tab.active {
  color: var(--hue-1);
  border-color: var(--hue-1);
  background: var(--hue-1-faint);
  text-shadow: 0 0 6px var(--hue-1-soft);
}

.sub-tab.done {
  color: var(--hue-2);
  border-color: var(--hue-2);
  background: var(--hue-2-faint);
  text-shadow: 0 0 6px var(--hue-2-soft);
}

.sub-tab.active.done {
  color: var(--hue-2);
  border-color: var(--hue-2);
  background: var(--hue-2-faint);
}

.chapter-progress {
  margin: 4px 0 18px;
  padding: 10px 14px;
  border: 1px dashed var(--hue-1-faint);
  background: rgba(255, 255, 255, 0.02);
}

.cp-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hue-1-faint);
  overflow: hidden;
  margin-bottom: 8px;
}

.cp-bar i {
  display: block;
  height: 100%;
  background: var(--hue-2);
  box-shadow: 0 0 8px var(--hue-2-soft);
  transition: width 0.3s var(--ease);
}

.cp-text {
  font-family: var(--f-pixel);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.5px;
}

.mark-done-form {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--hue-1-faint);
  display: flex;
  justify-content: flex-end;
}

.sub-panes .sub-pane {
  display: none;
  padding: 8px 0;
}

.sub-panes .sub-pane.active {
  display: block;
}

.sub-panes h2,
.sub-panes h3 {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hue-1);
  letter-spacing: 0.5px;
  margin: 16px 0 8px;
  text-shadow: 0 0 6px var(--hue-1-soft);
}

.sub-panes h2 {
  font-size: 26px;
}

.sub-panes h3 {
  font-size: 20px;
  color: var(--hue-2);
  text-shadow: 0 0 6px var(--hue-2-soft);
}

.sub-panes p,
.sub-panes li {
  font-family: var(--f-pixel);
  font-size: 17px;
  color: var(--ink-dim);
  line-height: 1.45;
}

.sub-panes a {
  color: var(--hue-2);
  text-decoration: underline dotted;
}

.sub-panes a:hover {
  color: var(--hue-1);
}

.sub-panes code,
.sub-panes pre {
  font-family: "BlenderProBook", var(--f-mono);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--hue-1-faint);
  padding: 1px 5px;
  color: var(--hue-2);
}

.sub-panes pre {
  display: block;
  padding: 10px 12px;
  margin: 10px 0;
  overflow-x: auto;
  line-height: 1.4;
}

.sub-panes ul,
.sub-panes ol {
  padding-left: 22px;
}

.sub-panes strong {
  color: var(--ink);
}

/* ===================== tutorial interactive boxes ===================== */
.sub-panes .tldr,
.sub-panes .tryit,
.sub-panes .checkpoint,
.sub-panes .challenge,
.sub-panes .project,
.sub-panes .note,
.sub-panes .danger {
  position: relative;
  margin: 16px 0;
  padding: 12px 16px 14px;
  border-left: 3px solid var(--hue-1);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--f-pixel);
  font-size: 16px;
  color: var(--ink-dim);
  line-height: 1.45;
}

.sub-panes .tldr::before,
.sub-panes .tryit::before,
.sub-panes .checkpoint::before,
.sub-panes .challenge::before,
.sub-panes .project::before {
  content: attr(data-label);
  display: inline-block;
  font-family: var(--f-tiny);
  font-size: 10px;
  letter-spacing: 2px;
  padding: 2px 8px;
  margin-bottom: 8px;
  margin-right: 8px;
}

/* TL;DR — dim, skim-friendly */
.sub-panes .tldr {
  border-left-color: var(--ink-mute);
  background: rgba(255, 255, 255, 0.025);
}

.sub-panes .tldr::before {
  content: "TL;DR";
  background: var(--ink-mute);
  color: var(--bg-0);
}

/* TRY IT — cyan, action prompt */
.sub-panes .tryit {
  border-left-color: var(--hue-2);
  background: rgba(232, 220, 214, 0.04);
  box-shadow: 0 0 0 1px var(--hue-2-faint);
}

.sub-panes .tryit::before {
  content: "▶ TRY IT";
  background: var(--hue-2);
  color: var(--bg-0);
  text-shadow: none;
}

/* CHECKPOINT — green, verify-yourself */
.sub-panes .checkpoint {
  border-left-color: var(--acid);
  background: rgba(182, 255, 58, 0.05);
  box-shadow: 0 0 0 1px var(--acid-faint);
}

.sub-panes .checkpoint::before {
  content: "✓ CHECKPOINT";
  background: var(--acid);
  color: var(--bg-0);
  text-shadow: none;
}

/* CHALLENGE — orange, stretch */
.sub-panes .challenge {
  border-left-color: var(--hue-1);
  background: rgba(255, 31, 61, 0.05);
  box-shadow: 0 0 0 1px var(--hue-1-faint);
}

.sub-panes .challenge::before {
  content: "⚡ CHALLENGE";
  background: var(--hue-1);
  color: var(--bg-0);
  text-shadow: none;
}

/* MINI PROJECT — magenta, chapter capstone */
.sub-panes .project {
  border: 1px solid var(--hue-1);
  border-left-width: 3px;
  background: linear-gradient(180deg, var(--hue-1-faint), rgba(0, 0, 0, 0.2));
  padding: 16px 18px 18px;
  box-shadow: 0 0 0 1px var(--hue-1-faint), 0 0 18px var(--hue-1-faint) inset;
  margin: 22px 0;
}

.sub-panes .project::before {
  content: "▣ MINI PROJECT";
  background: var(--hue-1);
  color: var(--bg-0);
  text-shadow: none;
  font-size: 11px;
  padding: 3px 10px;
}

.sub-panes .project h3 {
  margin-top: 0;
  font-size: 22px;
}

/* NOTE / DANGER keep existing semantics but refresh styling */
.sub-panes .note {
  border-left-color: var(--hue-2);
  background: rgba(232, 220, 214, 0.03);
}

.sub-panes .danger {
  border-left-color: var(--hue-1);
  border-top: 2px solid var(--hue-1);
  background: rgba(255, 31, 61, 0.06);
  box-shadow: 0 0 0 1px var(--hue-1-faint);
}

/* Step-numbered beats inside tryit/project */
.sub-panes .beats {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  counter-reset: beat;
}

.sub-panes .beats &gt;

li {
  position: relative;
  padding: 4px 0 6px 30px;
  counter-increment: beat;
  font-size: 16px;
}

.sub-panes .beats &gt;

li::before {
  content: counter(beat);
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-tiny);
  font-size: 10px;
  background: var(--hue-2);
  color: var(--bg-0);
  border-radius: 50%;
}

.sub-panes .project .beats &gt;

li::before {
  background: var(--hue-1);
}

/* Inline "you'll build this" pitch */
.sub-panes .pitch {
  font-family: var(--f-pixel);
  font-size: 18px;
  color: var(--hue-2);
  margin: 4px 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--hue-2-soft);
  background: rgba(232, 220, 214, 0.03);
  letter-spacing: 0.5px;
}

.sub-panes .pitch strong {
  color: var(--hue-1);
}

/* ===================== music ===================== */
.music-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 22px;
}

@media (max-width: 980px) {
  .music-hero {
    grid-template-columns: 1fr;
  }
}

.now-playing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--hue-1-faint);
  background: linear-gradient(180deg, var(--hue-1-faint), transparent);
}

.np-eyebrow {
  font-size: 13px;
  color: var(--hue-2);
  letter-spacing: 2px;
}

.np-title {
  font-size: 22px;
  color: var(--ink);
}

.np-meta {
  font-size: 15px;
  color: var(--ink-mute);
  letter-spacing: 1px;
}

.np-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hue-1-faint);
  margin-top: 6px;
  position: relative;
}

.np-bar i {
  display: block;
  height: 100%;
  background: var(--hue-1);
  box-shadow: 0 0 8px var(--hue-1-soft);
}

.np-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.ctl {
  font-family: var(--f-pixel);
  background: transparent;
  border: 2px solid var(--hue-1);
  color: var(--hue-1);
  padding: 3px 10px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.ctl.big {
  font-size: 20px;
  padding: 3px 16px;
  background: var(--hue-1-faint);
}

.ctl:hover {
  background: var(--hue-1-faint);
}

.ctl-meta {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 1px;
}

.practice-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pb-head,
.pb-foot {
  font-family: var(--f-pixel);
  font-size: 15px;
  color: var(--f-pixel);
  letter-spacing: 1px;
}

.pb-head {
  color: var(--hue-2);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 6px;
}

.practice-grid .day {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hue-1-faint);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--f-pixel);
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.1;
}

.practice-grid .day .min {
  color: var(--ink-faint);
  font-size: 12px;
}

.practice-grid .day.done {
  background: var(--hue-1-faint);
  border-color: var(--hue-1);
  color: var(--hue-1);
}

.practice-grid .day.done .min {
  color: var(--hue-1);
}

.practice-grid .day.today {
  outline: 1px solid var(--hue-2);
  outline-offset: -2px;
  color: var(--hue-2);
}

.practice-grid .day.today .min {
  color: var(--hue-2);
}

.rep-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rep-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 6px 0;
  font-family: var(--f-pixel);
  font-size: 17px;
  border-bottom: 1px dashed var(--hue-1-faint);
}

.rep-list li:last-child {
  border-bottom: 0;
}

.rep-k {
  color: var(--hue-1);
  letter-spacing: 1px;
}

.rep-v {
  color: var(--ink-dim);
}

.playlist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.playlist li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 7px 8px;
  font-family: var(--f-pixel);
  font-size: 17px;
  color: var(--ink-dim);
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.playlist li:hover {
  border-color: var(--hue-1-faint);
  background: rgba(255, 255, 255, 0.02);
}

.playlist .pl-n {
  color: var(--ink-mute);
}

.playlist .pl-t {
  color: var(--ink);
}

.playlist .pl-a {
  color: var(--ink-mute);
  font-size: 14px;
}

.playlist li.playing {
  background: var(--hue-1-faint);
  border-color: var(--hue-1);
}

.playlist li.playing .pl-n,
.playlist li.playing .pl-t {
  color: var(--hue-1);
  text-shadow: 0 0 6px var(--hue-1-soft);
}

/* ===================== blog ===================== */
.blog-post {
  display: grid;
  gap: 14px;
  max-width: 1000px;
  grid-template-columns: auto 1fr auto;
}

.blog-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px dashed var(--hue-1-faint);
  padding-bottom: 12px;
}

.blog-title {
  display: grid;
  font-family: var(--f-pixel);
  font-size: 30px;
  color: var(--ink);
  letter-spacing: 1px;
  margin: 0;
  grid-template-columns: auto 1fr auto;
}

.blog-date {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--hue-2);
  letter-spacing: 1px;
}

.blog-body {
  font-size: 17px;
  line-height: 2;
  color: var(--ink-dim);
  max-width: 1080px;
  align-self: center;
  grid-area: inherit;
  /* long prose reads better on a narrower measure */
}

.blog-body p {
  margin: 0 0 14px;
}

.blog-body .blog-lead {
  font-size: 17px;
  color: var(--ink);
  border-left: 3px solid var(--hue-1);
  padding-left: 14px;
  margin-bottom: 22px;
}

.blog-body h2 {
  font-family: var(--f-pixel);
  color: var(--hue-1);
  font-size: 20px;
  letter-spacing: 1px;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--hue-1);
}

.blog-body h3 {
  font-family: var(--f-pixel);
  color: var(--hue-2);
  font-size: 17px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 20px 0 8px;

}

.blog-body strong {
  color: var(--hue-1);
  font-weight: 700;
}

/* ---- album lists: name — year, // note underneath ---- */
.album-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.album-list li {
  border-left: 2px solid var(--hue-1-soft);
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  transition: border-color 0.15s, background 0.15s;
}



.album-name {
  font-family: var(--f-pixel);
  font-size: 17px;
  color: var(--hue-2);
}

.album-year {
  font-family: var(--f-mono);
  font-size: 15px;
  color: var(--hue-2);
  margin-left: 10px;
}

.album-year::before {
  content: "(";
}

.album-year::after {
  content: ")";
}

.album-note {
  display: block;
  font-family: var(--f-mono);
  font-size: 15px;
  color: var(--ink-mute);
  margin-top: 3px;
}

.album-note::before {
  content: " ";
  color: var(--hue-1);
}

.blog-body a {
  color: var(--hue-1);
}

.blog-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--hue-1-faint);
}

.blog-body code {
  font-family: "BlenderProBook", var(--f-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
}

/* ===================== work — timer ===================== */
.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0 10px;
}

.timer-disp {
  font-family: var(--f-mono);
  font-size: 96px;
  color: var(--hue-1);
  text-shadow: 3px 3px 0 var(--bg-0), 0 0 18px var(--hue-1-soft);
  letter-spacing: 2px;
  line-height: 0.95;
}

.timer-mode {
  font-family: var(--f-pixel);
  font-size: 18px;
  color: var(--hue-2);
  letter-spacing: 1.5px;
}

.timer-modes {
  display: flex;
  gap: 8px;
}

.tmode {
  background: transparent;
  border: 1px solid var(--hue-1-faint);
  color: var(--ink-mute);
  font-family: var(--f-pixel);
  font-size: 15px;
  padding: 4px 12px;
  cursor: pointer;
  letter-spacing: 1px;
}

.tmode:hover {
  color: var(--ink-dim);
  border-color: var(--hue-1-soft);
}

.tmode.active {
  color: var(--hue-1);
  border-color: var(--hue-1);
  background: var(--hue-1-faint);
}

.timer-ctls {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.tbtn {
  font-family: var(--f-pixel);
  font-size: 18px;
  letter-spacing: 2px;
  background: transparent;
  color: var(--hue-1);
  border: 2px solid var(--hue-1);
  padding: 6px 22px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.tbtn:hover {
  background: var(--hue-1-faint);
}

.tbtn.primary {
  background: var(--hue-1);
  color: var(--bg-0);
  text-shadow: none;
}

.tbtn.primary:hover {
  background: var(--hue-2);
  border-color: var(--hue-2);
  color: var(--bg-0);
}

/* ===================== live (JS) controls ===================== */
/* These elements are wired up by app.js. The cursor + states are the
   only visual hints that they're now clickable rather than decorative. */
.ctl,
.tmode,
.tbtn,
.playlist li[data-src] {
  cursor: pointer;
}

.ctl:focus-visible,
.tmode:focus-visible,
.tbtn:focus-visible,
.playlist li[data-src]:focus-visible {
  outline: 1px solid var(--hue-2);
  outline-offset: 2px;
}

.timer-block.running .timer-disp {
  animation: timer-pulse 2s ease-in-out infinite;
}

.timer-block.done .timer-disp {
  color: var(--acid);
  text-shadow: 3px 3px 0 var(--bg-0), 0 0 18px var(--acid-soft);
}

@keyframes timer-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.72;
  }
}

/* ===================== status bar ===================== */
.statusbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 24px;
  border-top: 2px solid var(--hue-1);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6));
  font-family: var(--f-pixel);
  font-size: 15px;
  color: var(--ink-mute);
  letter-spacing: 1px;
}

.sb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sb-v {
  color: var(--ink-dim);
}

.sb-spacer {
  flex: 1;
}

.sb-dot {
  width: 8px;
  height: 8px;
  background: var(--acid);
  box-shadow: 0 0 6px var(--acid-soft);
}

.sb-dot.ok {
  background: var(--hue-1);
  box-shadow: 0 0 6px var(--hue-1);
}

.sb-vol {
  color: var(--hue-1);
  letter-spacing: 0;
  text-shadow: 0 0 4px var(--hue-1-soft);
}

.sb-tz {
  color: var(--hue-2);
}

/* ===================== responsive ===================== */
@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 16px;
  }

  .topbar-right {
    justify-content: flex-end;
  }

  .main-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage {
    padding: 18px 16px 20px;
  }

  .big-greet {
    font-size: 30px;
  }

  .timer-disp {
    font-size: 64px;
  }

  .home-stats {
    padding: 10px;
  }

  .tile-row {
    grid-template-columns: 1fr;
  }
}

/* keyboard focus */
button:focus-visible,
.main-tab:focus-visible {
  outline: 1px solid var(--hue-2);
  outline-offset: 2px;
}

/* ===================== anchors-as-controls (PHP nav) =====================
   PHP build uses <a href="?tab=..."> in place of <button>. Strip default
   underline + colour so anchors match the original button styling.
*/
a.main-tab,
a.jump-tile,
a.module-card,
a.sub-tab,
a.back-btn,
.main-tabs a,
.jump-tile,
.module-card,
.sub-tab,
.back-btn {
  text-decoration: none;
}

a.module-card {
  display: block;
}

a.module-card.locked,
a.module-card.empty {
  pointer-events: none;
}

/* timer note (only shown in static PHP render) */
.timer-note {
  margin: 6px 0 0;
  font-family: var(--f-pixel);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
}

/* ===================== occult glitch + motion ===================== */
/* chrome-only effects — never applied inside .sub-panes reading text */

@keyframes rgb-jitter {

  0%,
  100% {
    text-shadow: -1px 0 var(--hue-1), 1px 0 var(--hue-2);
  }

  50% {
    text-shadow: -2px 0 var(--hue-1), 2px 0 var(--acid);
  }
}

@keyframes crt-flicker {

  0%,
  96%,
  100% {
    opacity: 1;
  }

  97% {
    opacity: 0.72;
  }

  98% {
    opacity: 1;
  }

  99% {
    opacity: 0.85;
  }
}

/* hero title — RGB-split corruption that rests for most of the cycle */
.big-greet {
  position: relative;
}

.big-greet::before,
.big-greet::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--ink);
  letter-spacing: 1px;
}

.big-greet::before {
  text-shadow: -2px 0 var(--hue-1);
  animation: glitch-a 4.2s steps(2, end) infinite;
}

.big-greet::after {
  text-shadow: 2px 0 var(--acid);
  animation: glitch-b 4.2s steps(2, end) infinite;
}

@keyframes glitch-a {

  0%,
  92%,
  100% {
    clip-path: inset(0 0 100% 0);
    transform: none;
  }

  93% {
    clip-path: inset(12% 0 60% 0);
    transform: translateX(-2px);
  }

  96% {
    clip-path: inset(48% 0 22% 0);
    transform: translateX(2px);
  }
}

@keyframes glitch-b {

  0%,
  92%,
  100% {
    clip-path: inset(100% 0 0 0);
    transform: none;
  }

  94% {
    clip-path: inset(68% 0 12% 0);
    transform: translateX(2px);
  }

  98% {
    clip-path: inset(22% 0 54% 0);
    transform: translateX(-2px);
  }
}

/* accessibility — one switch kills all motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

/* ===== text-treatment carve-out — long-form reading + code stay legible ===== */
/* Body text is IBM Plex Mono UPPERCASE + letter-spacing + glow; opt these out. */
.sub-panes p,
.sub-panes li,
.sub-panes a,
.sub-panes blockquote,
.sub-panes td,
.sub-panes th,
.sub-panes .pitch,
.sub-panes .tldr,
.sub-panes .tryit,
.sub-panes .checkpoint,
.sub-panes .challenge,
.sub-panes .project,
.sub-panes .note,
.sub-panes .danger,
code,
pre,
kbd {
  text-transform: none;
  letter-spacing: 0.01em;
  text-shadow: none;
}

.sub-panes p,
.sub-panes li {
  line-height: 1.65;
}

/* ===== hover animations removed — no transition easing, no motion/pop on hover ===== */
.main-tab,
.jump-tile,
.module-card,
.todo-list li,
.sub-tab,
.playlist li,
.tmode,
.tbtn,
.ctl,
.album-list li,
.back-btn,
.album-list,
.note-del button,
.note-form button {
  transition: none;
}

.main-tab:hover,
.jump-tile:hover,
.module-card:hover,
.module-card:hover:not(.locked):not(.empty),
.todo-list li:hover,
.sub-tab:hover,
.playlist li:hover,
.tmode:hover,
.tbtn:hover,
.tbtn.primary:hover,
.ctl:hover,
.back-btn:hover,
.sub-panes a:hover,
.note-del button:hover,
.note-form button:hover,
.album-list,
.album-list li:hover {
  transform: none;
}

/* ===================== scoreboard table ===================== */
.score-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--ink);
}

.score-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--f-tiny);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--hue-1-soft);
}

.score-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hue-1-faint);
  vertical-align: top;
}

.score-table tbody tr:hover td {
  background: var(--hue-1-faint);
}

/* rank: red accent, top-3 brighter */
.score-table .sc-rank {
  color: var(--hue-1);
  font-weight: 700;
  width: 48px;
}

.score-table tbody tr:nth-child(-n+3) .sc-rank {
  color: var(--acid);
}

.score-table .sc-id {
  color: var(--ink-faint);
  width: 56px;
}

.score-table .sc-title {
  color: var(--ink);
  font-weight: 700;
}

.score-table .sc-year {
  color: var(--ink-dim);
  width: 72px;
}

/* rating: acid-green, right-aligned numeric */
.score-table .sc-rating {
  color: var(--acid);
  font-weight: 700;
  width: 80px;
  text-align: right;
}

.score-table .sc-comment {
  color: var(--ink-mute);
  max-width: 360px;
}

/* ===================== work notepad ===================== */
.notepad-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notepad-area {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 220px;
  padding: 12px 14px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--hue-1-faint);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.centered-text {
  text-align: center;
}

.notepad-area::placeholder {
  color: var(--ink-faint);
}

.notepad-area:focus {
  border-color: var(--hue-1-soft);
  box-shadow: 0 0 0 1px var(--hue-1-faint);
}

.notepad-ctls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notepad-note {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.notepad-log {
  margin: 14px 0 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-mute);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-2);
  border: 1px solid var(--hue-1-faint);
  border-radius: var(--r-sm);
}

/* ===================== mobile — collapse all grids to one column ===================== */
@media (max-width: 720px) {
  /* layout + content grids → single column */
  .home-hero,
  .tile-row,
  .dual-col,
  .module-grid,
  .music-hero,
  .blog-post,
  .blog-title,
  .activity-log li,
  .activity-log li:has(.note-del),
  .bar-list li,
  .todo-list li,
  .rep-list li,
  .playlist li {
    grid-template-columns: 1fr;
  }

  /* hero children carry explicit column placements — reset so they stack */
  .home-hello,
  .home-portrait,
  .Profile,
  .big-greet {
    grid-column: auto;
    grid-row: auto;
  }

  /* nav: stack tabs vertically (flex container, wrap → column) */
  .main-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .main-tab {
    padding: 8px 16px;
    text-align: center;
  }

  /* drop the vertical pipe separator when stacked */
  .main-tab + .main-tab::before {
    display: none;
  }

  /* 14-wide practice heatmap → 7 cols (2 rows) so squares stay legible */
  .practice-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  /* keep any fixed-width media fluid */
  .home-portrait,
  .thumb-frame {
    max-width: 100%;
  }
}