/* ray's workbench. Colors and fonts are set in :root. */

:root {
  /* board */
  --bg: #050f0a;
  --panel: rgba(3, 12, 8, 0.78);
  --panel-solid: #07150e;
  --edge: rgba(126, 231, 135, 0.20);
  --edge-strong: rgba(126, 231, 135, 0.45);

  /* ink */
  --silk: #e9efe6;          /* silkscreen white: main text */
  --silk-dim: #a3b6a8;      /* secondary text */
  --silk-faint: #6f8676;

  /* accents */
  --led: #7ee787;           /* LED green: primary accent */
  --led-glow: rgba(126, 231, 135, 0.55);
  --copper: #e39a5b;
  --gold: #e8c46a;          /* ENIG pads */
  --amber: #ffb547;         /* in-progress LED */
  --pink: #ff8fb1;

  --radius: 18px;
  --font-pixel: "Silkscreen", "VT323", monospace;
  --font-term: "VT323", ui-monospace, monospace;
  --font-body: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

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

html {
  color-scheme: dark;
  scrollbar-color: rgba(126, 231, 135, 0.35) transparent;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--silk);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--led);
  color: #041008;
}

a {
  color: var(--led);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--gold);
}

:focus-visible {
  outline: 2px dashed var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 0.8em;
}

code {
  font-family: var(--font-body);
  font-size: 0.92em;
  color: var(--gold);
}

img {
  max-width: 100%;
  display: block;
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--led);
  color: #041008;
  border-radius: 8px;
  font-family: var(--font-pixel);
}
.skip:focus {
  top: 12px;
}

/* ---------- background layers ---------- */

.pcb-bg {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: -1;
  pointer-events: none;
}

.sparks {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  pointer-events: none;
}

/* ---------- header / nav ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 20px 32px;
  padding: 44px 16px 8px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-size: clamp(1.9rem, 5vw, 3rem);
  text-align: center;
}
.logo a {
  color: var(--led);
  text-decoration: none;
  text-shadow: 0 0 12px var(--led-glow), 2px 2px 0 #000;
  display: inline-block;
  transition: transform 0.25s;
}
.logo a:hover {
  transform: scale(1.06) rotate(-1deg);
  color: var(--led);
}
.logo-sym {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(232, 196, 106, 0.5);
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border: 2px solid var(--led);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(3, 12, 8, 0.55);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 18px rgba(126, 231, 135, 0.18), 2px 3px 8px rgba(0, 0, 0, 0.6);
}
.navbar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--led);
  text-decoration: none;
  text-shadow: 1px 1px 2px #000;
  transition: transform 0.2s, background 0.2s;
}
.navbar a:hover {
  background: rgba(126, 231, 135, 0.14);
  transform: scale(1.12);
  color: var(--led);
}
/* solder pad per link; lit on the current page */
.navbar .pad {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 1.5px solid var(--gold);
  opacity: 0.7;
}
.navbar a.active .pad {
  background: var(--led);
  border-color: var(--led);
  box-shadow: 0 0 8px var(--led-glow);
  opacity: 1;
}
.navbar a.active {
  background: rgba(126, 231, 135, 0.10);
}

/* ---------- page shell ---------- */

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 16px 24px;
}

.page-intro {
  max-width: 720px;
  margin: 8px auto 28px;
  text-align: center;
}
.page-intro h2 {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  color: var(--silk);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 10px;
}
.page-intro p {
  color: var(--silk-dim);
}

/* ---------- boards (panels) ---------- */
/* corner mounting holes are radial gradients */

.board {
  --hole: #020604;
  --ring: rgba(232, 196, 106, 0.55);
  position: relative;
  padding: 26px 24px 22px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 13px 13px, var(--hole) 0 2.5px, var(--ring) 3px 5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 13px) 13px, var(--hole) 0 2.5px, var(--ring) 3px 5px, transparent 5.5px),
    radial-gradient(circle at 13px calc(100% - 13px), var(--hole) 0 2.5px, var(--ring) 3px 5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 13px) calc(100% - 13px), var(--hole) 0 2.5px, var(--ring) 3px 5px, transparent 5.5px),
    var(--panel);
  backdrop-filter: blur(3px);
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s, border-color 0.15s;
}
.board:hover {
  transform: scale(1.008);
  border-color: var(--edge-strong);
}

.board-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(233, 239, 230, 0.16);
}
.board-head h2 {
  font-size: 1.15rem;
  color: var(--led);
  text-shadow: 1px 1px 0 #000;
}
.board-head .sub {
  color: var(--silk-faint);
  font-size: 0.82rem;
}
.board-head .more {
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
}

/* silkscreen reference designator (U1, J2, TP3…) */
.ref {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  color: var(--silk-faint);
  letter-spacing: 0.04em;
}

/* the dashed "placeholder" tag */
.ph {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--amber);
  border: 1px dashed var(--amber);
  border-radius: 5px;
  vertical-align: middle;
  white-space: nowrap;
}

.ph-counter {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: #1a1204;
  background: var(--amber);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* ---------- home: the bench layout ---------- */

.bench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.hello-top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.hello-top h2 {
  font-size: 1.35rem;
  color: var(--silk);
  margin-bottom: 4px;
}
.hello-top .tagline {
  color: var(--silk-dim);
  font-size: 0.85rem;
  margin: 0;
}

.explore {
  font-size: 0.9rem;
  color: var(--silk-dim);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
}

/* chip avatar: a little QFP with your initials */
.chip-avatar {
  --pin: linear-gradient(var(--gold), var(--gold));
  flex: none;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  position: relative;
  padding: 7px;
}
.chip-avatar::before {
  /* pins on all four sides */
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 8px) 14px 0 / calc(100% - 26px) 7px no-repeat,
    repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 8px) 14px 100% / calc(100% - 26px) 7px no-repeat,
    repeating-linear-gradient(0deg, var(--gold) 0 3px, transparent 3px 8px) 0 14px / 7px calc(100% - 26px) no-repeat,
    repeating-linear-gradient(0deg, var(--gold) 0 3px, transparent 3px 8px) 100% 14px / 7px calc(100% - 26px) no-repeat;
  opacity: 0.85;
}
.chip-avatar span {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #111;
  border-radius: 4px;
  border: 1px solid #2c2c2c;
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--silk);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.chip-avatar span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #333;
}
.avatar-photo {
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: #fff;
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), 0 0 14px rgba(232, 196, 106, 0.25);
  flex: none;
}
.datasheet-head .avatar-photo {
  width: 96px;
  height: 96px;
}
.error-art {
  width: min(260px, 70%);
  margin: 0 auto 18px;
  border-radius: 18px;
  border: 2px solid var(--amber);
  box-shadow: 0 0 22px rgba(255, 181, 71, 0.3);
}

/* binary clock */
.clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(233, 239, 230, 0.08);
  border-radius: 10px;
}
.clock-leds {
  display: grid;
  gap: 4px;
}
.clock-row {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.clock-row span {
  font-family: var(--font-term);
  font-size: 0.95rem;
  color: var(--silk-faint);
  width: 12px;
}
.clock-row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #173020;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.clock-row i.on {
  background: var(--led);
  box-shadow: 0 0 6px var(--led-glow);
}
.clock-readout {
  font-family: var(--font-term);
  font-size: 1.15rem;
  color: var(--led);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 2px 4px;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.clock-readout:hover {
  color: var(--gold);
}

/* terminal */
.terminal {
  min-height: 190px;
  font-family: var(--font-term);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--silk);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}
.terminal .ps1 {
  color: var(--led);
}
.terminal .out {
  color: var(--silk-dim);
  margin-bottom: 4px;
}
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  vertical-align: -0.12em;
  background: var(--led);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* changelog */
.updates {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}
.updates li + li {
  margin-top: 6px;
}
.updates time {
  font-family: var(--font-term);
  font-size: 1.05rem;
  color: var(--gold);
  margin-right: 6px;
}

/* ---------- project cards ---------- */

.stack {
  display: grid;
  gap: 14px;
}

.card {
  padding: 14px 16px 14px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(233, 239, 230, 0.09);
  border-left: 3px solid var(--led);
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.card.in-progress {
  border-left-color: var(--amber);
}
.card:hover {
  border-color: rgba(233, 239, 230, 0.22);
  transform: translateX(2px);
}
.card[hidden] {
  display: none;
}
.card h3 {
  font-size: 1rem;
  color: var(--silk);
  margin: 6px 0 6px;
}
.card p {
  font-size: 0.88rem;
  color: var(--silk-dim);
  margin-bottom: 8px;
}
.card.compact p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.78rem;
}
.card-top .status-text {
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  color: var(--silk-dim);
}
.card-top .date {
  margin-left: auto;
  font-family: var(--font-term);
  font-size: 1rem;
  color: var(--silk-faint);
}
.card-img {
  margin: 10px 0 4px;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 7px var(--led-glow);
  flex: none;
}
.led.in-progress {
  background: var(--amber);
  box-shadow: 0 0 7px rgba(255, 181, 71, 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}
.led.next {
  background: var(--gold);
  box-shadow: 0 0 7px rgba(232, 196, 106, 0.5);
}
.card.next {
  border-left: 3px dashed var(--gold);
}
@keyframes pulse {
  50% { opacity: 0.35; }
}

.meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meter {
  flex: 1;
  height: 8px;
  background: #13241a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.meter span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--amber) 0 6px, #d68f2a 6px 8px);
  border-radius: 4px;
}
.meter-pct {
  font-family: var(--font-term);
  font-size: 1rem;
  color: var(--amber);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.tags li {
  font-family: var(--font-term);
  font-size: 1rem;
  line-height: 1;
  padding: 3px 8px;
  color: var(--gold);
  border: 1px solid rgba(232, 196, 106, 0.35);
  border-radius: 4px;
}
.card-links {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
}

/* projects page */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.filters button {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--silk-dim);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.filters button span {
  color: var(--silk-faint);
}
.filters button[aria-pressed="true"] {
  color: #041008;
  background: var(--led);
  border-color: var(--led);
}
.filters button[aria-pressed="true"] span {
  color: #0a2a14;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-grid .card {
  padding: 18px 20px;
  background: var(--panel);
  backdrop-filter: blur(3px);
}

/* ---------- music ---------- */

.np {
  display: flex;
  align-items: center;
  gap: 16px;
}
.vinyl {
  flex: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255, 255, 255, 0.05) 31%, transparent 32%, transparent 40%, rgba(255, 255, 255, 0.05) 41%, transparent 42%, transparent 55%, rgba(255, 255, 255, 0.04) 56%, transparent 57%),
    conic-gradient(from 20deg, #111, #2a2a2a 10%, #111 25%, #1b1b1b 50%, #2a2a2a 60%, #111 75%, #111);
  box-shadow: 0 0 0 2px #000, 2px 3px 10px rgba(0, 0, 0, 0.6);
}
.vinyl.spin {
  animation: spin 3.2s linear infinite;
}
.vinyl-label {
  width: 36%;
  height: 36%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--pink);
  position: relative;
}
.vinyl-label::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: #000;
}
.vinyl-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.np-meta {
  min-width: 0;
}
.np-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--pink);
  margin-bottom: 4px;
}
.np-title {
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  color: var(--silk);
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}
.np-title a {
  color: var(--silk);
}
.np-artist {
  font-size: 0.88rem;
  margin: 0;
}
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.eq i {
  width: 3px;
  height: 100%;
  background: var(--pink);
  transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
.eq i:nth-child(4) { animation-delay: -0.15s; }
.tuning {
  font-family: var(--font-term);
  font-size: 1.1rem;
  animation: pulse 1.2s ease-in-out infinite;
}
.np.paused .eq i {
  animation: none;
  transform: scaleY(0.3);
}
.np.paused .np-kicker {
  color: var(--silk-faint);
}
.np.paused .eq i {
  background: var(--silk-faint);
}
.np-source {
  margin: 6px 0 0;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
}
.tracklist .plays {
  margin-left: auto;
  font-family: var(--font-term);
  font-size: 1rem;
  color: var(--silk-faint);
}
@keyframes eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

.tracklist,
.fretlist {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  font-size: 0.88rem;
}
.tracklist li,
.fretlist li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 7px 0;
  border-top: 1px dashed rgba(233, 239, 230, 0.1);
}
.tracklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 10px;
}
.tracklist .tk {
  min-width: 0;
  overflow-wrap: anywhere;
}
.tracklist .tk .a {
  display: block;
  font-size: 0.82rem;
}
.tracklist .tk .a::before {
  content: none;
}
.tracklist .t a {
  color: var(--silk);
  text-decoration-color: rgba(233, 239, 230, 0.3);
}
.tracklist .t a:hover {
  color: var(--led);
}
.vinyl.has-art .vinyl-label {
  width: 58%;
  height: 58%;
}
.vinyl.has-art .vinyl-label::after {
  inset: 45%;
}
.tracklist .side {
  font-family: var(--font-term);
  font-size: 1.05rem;
  color: var(--pink);
  width: 22px;
}
.tracklist .t,
.fretlist .t {
  color: var(--silk);
}
.tracklist .a,
.fretlist .a {
  color: var(--silk-faint);
}
.tracklist .a::before,
.fretlist .a::before {
  content: "· ";
}
.fretlist .pill {
  margin-left: auto;
}

.pill {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  line-height: 1.8;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--silk-dim);
}
.pill.learning { color: var(--amber); }
.pill.can-play { color: var(--pink); }
.pill.nailed-it { color: var(--led); }

.spotify iframe {
  border: 0;
  border-radius: 12px;
  display: block;
}

.music-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.music-grid .wide {
  grid-column: 1 / -1;
}
.music-grid .np {
  gap: 24px;
}
.music-grid .vinyl {
  width: 150px;
  height: 150px;
}
.music-grid .np-title {
  font-size: 1.4rem;
}

/* ---------- goals / roadmap ---------- */

.goals {
  list-style: none;
  margin: 0;
  padding: 0;
}
.goal {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 7px 0;
  font-size: 0.9rem;
}
.goal + .goal {
  border-top: 1px dashed rgba(233, 239, 230, 0.1);
}
.goal-pad {
  flex: none;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--gold);
  border-radius: 2px;
  transform: translateY(1px);
}
.goal.done .goal-pad {
  background: var(--led);
  border-color: var(--led);
  box-shadow: 0 0 6px var(--led-glow);
}
.goal.done .goal-text {
  color: var(--silk-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(126, 231, 135, 0.6);
}
.goal-text {
  flex: 1;
  min-width: 0;
}
.goal-text .ph {
  margin-left: 2px;
}

/* oscilloscope on the music page */
.np-wide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.scope {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(126, 231, 135, 0.18);
  background:
    linear-gradient(rgba(126, 231, 135, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(126, 231, 135, 0.08) 1px, transparent 1px) 0 0 / 10% 100%,
    #020805;
}
.scope svg {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  animation: scope 3.5s linear infinite;
}
.scope path {
  fill: none;
  stroke: var(--led);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px var(--led-glow));
}
.scope-label {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-family: var(--font-term);
  font-size: 0.95rem;
  color: var(--silk-faint);
}
@keyframes scope {
  to { transform: translateX(-50%); }
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  position: relative;
}
.lane .board-head h2 { color: var(--silk); }
.lane-done .board-head h2 { color: var(--led); }
.lane-now .board-head h2 { color: var(--amber); }
.lane-next .board-head h2 { color: var(--gold); }
.lane-someday .board-head h2 { color: var(--pink); }

/* ---------- about / datasheet ---------- */

.datasheet-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 20px;
  align-items: center;
  margin-bottom: 24px;
}
.datasheet-head .part {
  font-family: var(--font-pixel);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--silk);
  text-shadow: 2px 2px 0 #000;
}
.datasheet-head .desc {
  color: var(--silk-dim);
  font-size: 0.9rem;
}
.datasheet-head .rev {
  font-family: var(--font-term);
  font-size: 1.1rem;
  color: var(--gold);
  text-align: right;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.features {
  margin: 0;
  padding-left: 1.2em;
}
.features li {
  margin-bottom: 4px;
}
.features li::marker {
  content: "▸ ";
  color: var(--led);
}

.edu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.edu li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
}
.edu li + li {
  border-top: 1px dashed rgba(233, 239, 230, 0.1);
}
.edu li > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}
.edu strong {
  font-weight: 500;
  width: 100%;
}
.edu .led {
  transform: translateY(-1px);
}

.bom {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.bom th {
  text-align: left;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--silk-faint);
  padding: 0 8px 8px 0;
  border-bottom: 1px solid rgba(233, 239, 230, 0.16);
}
.bom td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px dashed rgba(233, 239, 230, 0.08);
  vertical-align: middle;
}
.bom td.ref {
  width: 1%;
  white-space: nowrap;
  padding-right: 14px;
}
.level {
  display: inline-flex;
  gap: 2px;
  vertical-align: -1px;
}
.level i {
  width: 5px;
  height: 11px;
  background: #1c3325;
  border-radius: 1px;
}
.level.learning i:nth-child(-n + 1),
.level.familiar i:nth-child(-n + 2),
.level.proficient i:nth-child(-n + 3) {
  background: var(--led);
  box-shadow: 0 0 4px var(--led-glow);
}

.hobby + .hobby {
  margin-top: 14px;
}
.hobby h3 {
  font-size: 0.95rem;
  color: var(--pink);
  margin-bottom: 4px;
}
.hobby p {
  color: var(--silk-dim);
  font-size: 0.88rem;
  margin: 0;
}

/* DIP-8 pinout */
.dip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  max-width: 360px;
  margin: 4px auto 6px;
}
.pins {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-family: var(--font-term);
  font-size: 1.05rem;
}
.pins li {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pins.left li {
  justify-content: flex-end;
}
.pin-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 14px;
  font-size: 0.85rem;
  color: #2a1d06;
  background: linear-gradient(#f3d98f, var(--gold) 60%, #b8923f);
}
.pins.left .pin-num { border-radius: 3px 0 0 3px; }
.pins.right .pin-num { border-radius: 0 3px 3px 0; }
.pin-name {
  color: var(--silk);
}
.dip-body {
  position: relative;
  width: 104px;
  min-height: 170px;
  background: linear-gradient(90deg, #121212, #1d1d1d 50%, #121212);
  border-radius: 6px;
  display: grid;
  place-items: center;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #2b2b2b;
}
.dip-body .notch {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 22px;
  height: 11px;
  transform: translateX(-50%);
  background: #060606;
  border-radius: 0 0 11px 11px;
}
.dip-body .dot {
  position: absolute;
  top: 16px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
}
.dip-label {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: #bdbdbd;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1.3;
}
.dip-label small {
  font-size: 0.62rem;
  color: #8c8c8c;
}

/* ---------- footer ---------- */

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 36px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--silk-faint);
  text-shadow: 1px 1px 2px #000;
}
.site-footer p {
  margin: 0 0 4px;
}
.site-footer .hint {
  font-family: var(--font-term);
  font-size: 0.95rem;
  opacity: 0.55;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
/* classic 88×31 web buttons, drawn in CSS */
.badge88 {
  width: 88px;
  height: 31px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35), inset -1px -1px 0 rgba(0, 0, 0, 0.5);
  font-family: var(--font-term);
  line-height: 0.95;
  text-shadow: none;
}
.badge88 b,
.badge88 i {
  font-weight: 400;
  font-style: normal;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
}
.badge88 b { font-size: 14px; padding: 0 5px; min-width: 22px; }
.badge88 i { font-size: 13px; padding: 0 3px; }
.b-self { background: #041008; } .b-self b { background: var(--led); color: #041008; } .b-self i { color: var(--led); }
.b-copper { background: #2a1405; } .b-copper b { background: var(--copper); color: #2a1405; } .b-copper i { color: var(--copper); }
.b-blue { background: #0a1630; } .b-blue b { background: #6ea8ff; color: #0a1630; } .b-blue i { color: #9cc3ff; }
.b-green { background: #08240f; } .b-green b { background: #c8f7a0; color: #08240f; } .b-green i { color: #c8f7a0; }
.b-pink { background: #2a0a18; } .b-pink b { background: var(--pink); color: #2a0a18; } .b-pink i { color: var(--pink); }
.b-warn {
  padding: 3px;
  background: repeating-linear-gradient(-45deg, #ffcc00 0 5px, #111 5px 10px);
}
.b-warn i { background: #111; color: #ffcc00; font-size: 12px; }
.b-warn b { background: #ffcc00; color: #111; }

/* ---------- toast + easter eggs ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 10px 18px;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: #041008;
  background: var(--led);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.smoke {
  position: absolute;
  z-index: 40;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 200, 200, 0.55), rgba(160, 160, 160, 0) 70%);
  pointer-events: none;
  animation: smoke 1.8s ease-out forwards;
}
@keyframes smoke {
  from { transform: translate(0, 0) scale(calc(var(--s) * 0.4)); opacity: 0.9; }
  to { transform: translate(var(--dx), -140px) scale(calc(var(--s) * 2.2)); opacity: 0; }
}

/* RGB mode (konami code) */
html.rgb .site-header,
html.rgb main,
html.rgb .site-footer,
html.rgb .pcb-bg {
  animation: rgb 3s linear infinite;
}
@keyframes rgb {
  to { filter: hue-rotate(360deg); }
}

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

.error-board {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
}
.error-board .code {
  font-family: var(--font-pixel);
  font-size: clamp(3rem, 12vw, 5.5rem);
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 181, 71, 0.45), 3px 3px 0 #000;
  line-height: 1;
  margin-bottom: 8px;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .bench {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .bench .col-mid {
    grid-column: 1 / -1;
    order: -1;
  }
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 28px;
  }
  .navbar {
    width: 100%;
  }
  .navbar a {
    padding: 12px 12px;
    font-size: 0.82rem;
  }
  .bench,
  .about-grid,
  .music-grid,
  .roadmap {
    grid-template-columns: minmax(0, 1fr);
  }
  .bench .col-mid {
    order: 0;
  }
  .board {
    padding: 24px 18px 20px;
  }
  .datasheet-head {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .datasheet-head .rev {
    text-align: center;
  }
  .datasheet-head .chip-avatar,
  .datasheet-head .avatar-photo {
    margin: 0 auto;
  }
  .music-grid .vinyl {
    width: 110px;
    height: 110px;
  }
  .np-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .scope {
    height: 110px;
  }
  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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