/* ==========================================================
   RETRO STORE THEME
   Shared by index.html and cad-designs.html.
   Dark store-page layout, chunky pixel borders, hard shadows.
   ========================================================== */

/* Self-hosted so the page does not depend on a font CDN (see fonts/README.txt). */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/press-start-2p-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/press-start-2p-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/vt323-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/vt323-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #10161d;
  --bg-2: #1b2838;
  --panel: #16202d;
  --panel-2: #1c2b3b;
  --panel-hi: #2a475e;
  --edge: #05080b;
  --text: #c7d5e0;
  --muted: #8f98a0;
  --white: #f3f7fa;
  --blue: #66c0f4;
  --blue-btn: #1a9fff;
  --blue-btn-dk: #0a6db3;
  --green: #a4d007;
  --green-dk: #4d6b0d;
  --orange: #ff6b35;
  --orange-dk: #c2481a;
  --yellow: #ffd23f;
  --pink: #ff5d8f;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
  --font-px: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'VT323', ui-monospace, 'Courier New', monospace;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  padding-top: 56px;
  font-family: var(--font-body);
  font-size: 23px;
  line-height: 1.3;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(27, 40, 56, 0.95) 0, rgba(16, 22, 29, 0) 520px),
    linear-gradient(rgba(102, 192, 244, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 192, 244, 0.045) 1px, transparent 1px);
  background-size: auto, 16px 16px, 16px 16px;
  background-repeat: no-repeat, repeat, repeat;
  font-variant-ligatures: none;
  font-synthesis: none; /* VT323 has one weight, so never fake a bold */
}

/* CRT scanlines. Sits above everything but never blocks clicks. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
}

body.no-scan::after { display: none; }

img, video, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--white); }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px dashed var(--yellow);
  outline-offset: 3px;
}

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 3000;
  padding: 10px 14px;
  font-family: var(--font-px);
  font-size: 10px;
  color: #000;
  background: var(--yellow);
  border: 3px solid var(--edge);
}
.skip-link:focus { top: 8px; }
main:focus { outline: none; }

.px { font-family: var(--font-px); }
.sprite { display: inline-block; image-rendering: pixelated; line-height: 0; }
.sprite svg { shape-rendering: crispEdges; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 56px;
  background: #171a21;
  border-bottom: 4px solid var(--edge);
  box-shadow: 0 4px 0 rgba(102, 192, 244, 0.25);
}

.topbar .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-px);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 3px solid var(--edge);
  box-shadow: inset -3px -3px 0 var(--orange-dk), 3px 3px 0 #000;
  color: #000;
  font-size: 14px;
}

.main-nav { display: flex; align-items: center; gap: 12px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0; padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  white-space: nowrap;
  padding: 8px 12px;
  color: #b8b6b4;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 20px;
  letter-spacing: 0.05em;
  border-bottom: 4px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--white);
  background: var(--panel-hi);
  border-bottom-color: var(--orange);
}

.nav-new {
  margin-left: 6px;
  padding: 1px 5px;
  font-family: var(--font-px);
  font-size: 8px;
  color: #000;
  background: var(--yellow);
  border: 2px solid var(--edge);
  vertical-align: middle;
}

.nav-toggle {
  display: none;
  width: 40px; height: 36px;
  background: var(--panel-hi);
  border: 3px solid var(--edge);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--font-px);
  font-size: 12px;
  color: var(--white);
}

/* ---------- Panels, title bars ---------- */

.panel {
  background: var(--panel);
  border: 4px solid var(--edge);
  box-shadow: inset 0 0 0 2px var(--panel-hi), var(--shadow);
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #1f4e79;
  border-bottom: 4px solid var(--edge);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--font-px);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--white);
}

.titlebar .dots { display: flex; gap: 4px; flex: none; }
.titlebar .dots i {
  width: 12px; height: 12px;
  background: var(--text);
  border: 2px solid var(--edge);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}

.panel-body { padding: 20px; }

/* ---------- Section headers ---------- */

.section { padding-top: 56px; padding-bottom: 8px; }

.sec-head { margin-bottom: 28px; }

.sec-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
  color: var(--white);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.sec-head p { margin: 0 0 14px; color: var(--muted); max-width: 62ch; }

.divider {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 12px, transparent 12px 20px);
  opacity: 0.85;
}

/* ---------- Buttons, tags, chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-px);
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.04em;
  color: #fff;
  border: 4px solid var(--edge);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), inset 4px 4px 0 rgba(255, 255, 255, 0.25), 4px 4px 0 #000;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}

.btn:hover {
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), inset 4px 4px 0 rgba(255, 255, 255, 0.3), 6px 6px 0 #000;
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), inset 4px 4px 0 rgba(255, 255, 255, 0.2), 1px 1px 0 #000;
}

.btn-green { background: var(--green-dk); color: #eaffb0; }
.btn-green:hover { color: #fff; background: #547510; }
.btn-blue { background: var(--blue-btn-dk); }
.btn-blue:hover { background: #0d80d0; }
.btn-orange { background: var(--orange-dk); }
.btn-orange:hover { background: #dc5522; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--blue);
  background: rgba(103, 193, 245, 0.18);
  border: 2px solid var(--edge);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 8px 14px;
  font-family: var(--font-px);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  background: var(--panel-2);
  border: 3px solid var(--edge);
  box-shadow: 3px 3px 0 #000;
}

.chip:hover { background: var(--panel-hi); }
.chip[aria-pressed='true'] {
  color: #000;
  background: var(--yellow);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.chips { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero / showcase ---------- */

.hero { padding-top: 22px; }

.crumbs {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs b { color: var(--blue); font-weight: 400; margin: 0 6px; }

.app-title {
  margin: 14px 0 22px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: clamp(20px, 3.6vw, 34px);
  line-height: 1.35;
  color: var(--white);
  text-shadow: 4px 4px 0 #000;
}

.app-title small {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--orange);
  text-shadow: 2px 2px 0 #000;
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.shots { padding: 10px; }

.shot-main {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
  border: 4px solid var(--edge);
}

.shot-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* dither overlay, gives photos a slightly crunchy look */
.shot-main::before,
.capsule-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-conic-gradient(rgba(0, 0, 0, 0.14) 0 25%, transparent 0 50%);
  background-size: 4px 4px;
  transition: opacity 0.2s steps(3);
}

.capsule:hover .capsule-img::before { opacity: 0; }

.shot-cap {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  padding: 6px 12px;
  font-family: var(--font-px);
  font-size: 9px;
  color: var(--white);
  background: rgba(5, 8, 11, 0.85);
  border-top: 3px solid var(--orange);
  border-right: 3px solid var(--edge);
}

.shot-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.shot-thumb {
  padding: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
  border: 3px solid var(--edge);
  opacity: 0.6;
}

.shot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-thumb:hover { opacity: 1; }
.shot-thumb[aria-current='true'] { opacity: 1; border-color: var(--orange); }

.glance { display: flex; flex-direction: column; }
.glance > .panel-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.capsule-art {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(#0b2a45 0 55%, #123f64 55% 75%, #1c5a8a 75%);
  border: 4px solid var(--edge);
}

.capsule-art::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 24px, var(--orange-dk) 24px 48px);
  border-top: 4px solid var(--edge);
}

.capsule-art .sprite { position: relative; z-index: 1; margin-bottom: 14px; animation: bob 1.2s steps(2) infinite; }

@keyframes bob { 50% { transform: translateY(-6px); } }

.glance-desc { margin: 0; font-size: 23px; }

.glance-rows { margin: 0; display: grid; gap: 0; font-size: 20px; }
.glance-rows > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 5px 0;
  border-top: 2px dotted rgba(143, 152, 160, 0.35);
}
.glance-rows dt { color: var(--muted); text-transform: uppercase; font-size: 18px; letter-spacing: 0.04em; }
.glance-rows dd { margin: 0; color: var(--white); }

.glance-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Achievements ---------- */

.ach-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.ach-count { font-family: var(--font-px); font-size: 10px; color: var(--muted); }

.progress {
  flex: 1 1 180px;
  height: 18px;
  background: #000;
  border: 3px solid var(--edge);
  padding: 2px;
}
.progress i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--green) 0 10px, var(--green-dk) 10px 12px);
}

.ach-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0; padding: 0;
  list-style: none;
}

.ach {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--panel-2);
  border: 3px solid var(--edge);
  box-shadow: 4px 4px 0 #000;
}

.ach-icon {
  flex: none;
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  font-family: var(--font-px);
  font-size: 14px;
  color: #000;
  background: var(--yellow);
  border: 3px solid var(--edge);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.25), inset 4px 4px 0 rgba(255, 255, 255, 0.35);
}

.ach h3 {
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 26px;
  color: var(--white);
}
.ach p { margin: 0; font-size: 20px; color: var(--muted); }

.ach.locked { filter: grayscale(1); }
.ach.locked h3 { color: #b4bdc5; }
.ach.locked p { color: #a3adb5; }
.ach.locked .ach-icon { background: #4a525a; color: #e1e6ea; }

/* ---------- Promo strip ---------- */

.promo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.promo-art {
  width: 150px; height: 150px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(102, 192, 244, 0.25) 2px, transparent 2px),
    linear-gradient(90deg, rgba(102, 192, 244, 0.25) 2px, transparent 2px),
    #0b2a45;
  background-size: 15px 15px;
  border: 4px solid var(--edge);
  font-family: var(--font-px);
  font-size: 26px;
  color: var(--blue);
  text-shadow: 3px 3px 0 #000;
}

.promo h3 {
  margin: 0 0 10px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--white);
  text-transform: uppercase;
}
.promo p { margin: 0 0 16px; max-width: 60ch; }

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  font-family: var(--font-px);
  font-size: 8px;
  color: #000;
  background: var(--yellow);
  border: 2px solid var(--edge);
}

/* ---------- Project capsules ---------- */

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

.capsule {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 4px solid var(--edge);
  box-shadow: inset 0 0 0 2px var(--panel-hi), var(--shadow);
  cursor: pointer;
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2);
}

.capsule:hover,
.capsule:focus-visible {
  transform: translate(-4px, -4px);
  box-shadow: inset 0 0 0 2px var(--orange), 10px 10px 0 rgba(0, 0, 0, 0.6);
}

.capsule-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 4px solid var(--edge);
}
.capsule-img img { width: 100%; height: 100%; object-fit: cover; }

.badge-star {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-family: var(--font-px);
  font-size: 8px;
  color: var(--yellow);
  background: var(--edge);
  border: 3px solid var(--yellow);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
}

.capsule-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }

.capsule h3 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  color: var(--white);
}

.capsule .sub { margin: 0; font-size: 20px; color: var(--muted); }

.capsule-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.date {
  font-family: var(--font-px);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.cta {
  padding: 5px 10px;
  font-family: var(--font-px);
  font-size: 9px;
  color: #eaffb0;
  background: var(--green-dk);
  border: 3px solid var(--edge);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.3), 3px 3px 0 #000;
}
.capsule:hover .cta { background: #547510; color: #fff; }

.empty { padding: 32px; text-align: center; color: var(--muted); }

/* ---------- Build log rows ---------- */

.news { display: grid; gap: 18px; }

.news-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  background: var(--panel);
  border: 4px solid var(--edge);
  box-shadow: inset 0 0 0 2px var(--panel-hi), var(--shadow);
  cursor: pointer;
  transition: transform 0.1s steps(2);
}
.news-row:hover, .news-row:focus-visible { transform: translateX(6px); box-shadow: inset 0 0 0 2px var(--orange), var(--shadow); }

.news-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  font-family: var(--font-px);
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
  text-transform: uppercase;
  background: var(--panel-2);
  border-right: 4px solid var(--edge);
}
.news-date b { font-size: 22px; font-weight: 400; color: var(--orange); }

.news-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.news-body h3 { margin: 0; font-size: 31px; line-height: 1.2; color: var(--white); }
.news-body p { margin: 0; color: var(--muted); }

/* ---------- About, contact, footer ---------- */

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

.about p { margin: 0 0 16px; }

.socials { display: flex; gap: 14px; margin-top: 22px; }
.social {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  border: 4px solid var(--edge);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), 4px 4px 0 #000;
}
.social:hover { color: #fff; transform: translate(-2px, -2px); }
.social.yt { background: #c4302b; }
.social.x { background: #222; }
.social.ig { background: var(--pink); color: #000; }
.social.ig:hover { color: #000; }

.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-grid div {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid var(--edge);
  box-shadow: 4px 4px 0 #000;
  background: #000;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-cap {
  position: absolute;
  left: 0; bottom: 0;
  padding: 4px 10px;
  font-family: var(--font-px);
  font-size: 8px;
  color: var(--white);
  background: rgba(5, 8, 11, 0.85);
  border-top: 3px solid var(--orange);
  border-right: 3px solid var(--edge);
}

.contact { text-align: center; }
.contact p { margin: 0 auto 22px; max-width: 52ch; }

.footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  text-align: center;
  font-size: 19px;
  color: var(--muted);
  background: #0a0e13;
  border-top: 4px solid var(--edge);
  box-shadow: 0 -4px 0 rgba(102, 192, 244, 0.2);
}
.footer p { margin: 4px 0; }
.scan-toggle {
  margin-top: 10px;
  padding: 6px 12px;
  font-family: var(--font-px);
  font-size: 9px;
  color: var(--text);
  background: var(--panel-2);
  border: 3px solid var(--edge);
  box-shadow: 3px 3px 0 #000;
}
.scan-toggle:hover { background: var(--panel-hi); }

/* ---------- Project page (modal) ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  overflow-y: auto;
  padding: 36px 16px;
  background: rgba(5, 8, 11, 0.88);
}
.modal.open { display: block; }

.store { max-width: 980px; margin: 0 auto; position: relative; }

.modal-x {
  width: 40px; height: 32px;
  padding: 0;
  font-family: var(--font-px);
  font-size: 12px;
  line-height: 1;
  color: #000;
  background: var(--orange);
  border: 3px solid var(--edge);
  box-shadow: inset -2px -2px 0 var(--orange-dk);
}
.modal-x:hover { background: var(--yellow); }

.store-head { padding: 22px 24px 4px; }
.store-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: clamp(16px, 2.6vw, 24px);
  line-height: 1.45;
  color: var(--white);
  text-shadow: 3px 3px 0 #000;
}
.store-head .sub { margin: 0 0 14px; color: var(--muted); }

.store-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 22px;
  padding: 12px 24px 8px;
}

.store-hero {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000 center / cover no-repeat;
  border: 4px solid var(--edge);
}
.store-hero img { width: 100%; height: 100%; object-fit: cover; }

.store-side { display: flex; flex-direction: column; gap: 14px; }
.store-side .glance-rows { font-size: 20px; }
.store-side .glance-rows > div { grid-template-columns: 84px 1fr; }

.store-body { padding: 8px 24px 28px; }

.block { margin-top: 26px; }
.block > h3 {
  margin: 0 0 14px;
  padding: 8px 12px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(90deg, #1f4e79 0 70%, transparent 70%);
  border-left: 6px solid var(--orange);
}
.block p { margin: 0 0 12px; }

/* how it works: flow diagram */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.flow li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-node {
  padding: 10px 12px;
  font-size: 20px;
  line-height: 1.25;
  text-align: center;
  color: var(--white);
  background: var(--panel-hi);
  border: 3px solid var(--edge);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.3), 3px 3px 0 #000;
}
.flow li:first-child .flow-node { background: #2c5b3a; }
.flow li:last-child .flow-node { background: #7a3a1c; }

.flow-arrow {
  font-family: var(--font-px);
  font-size: 12px;
  color: var(--orange);
}
.flow li:last-child .flow-arrow { display: none; }

/* numbered steps */
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  height: 40px;
  font-family: var(--font-px);
  font-size: 10px;
  color: #000;
  background: var(--yellow);
  border: 3px solid var(--edge);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), 3px 3px 0 #000;
}
.steps li > span { padding-top: 6px; }
.steps li > span b { color: var(--white); font-weight: 700; }

/* spec sheet */
.specs {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr;
  border: 3px solid var(--edge);
  background: var(--panel-2);
  font-size: 20px;
}
.specs dt, .specs dd { margin: 0; padding: 8px 12px; border-top: 2px solid var(--edge); }
.specs dt:first-of-type, .specs dd:first-of-type { border-top: 0; }
.specs dt {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.2);
  border-right: 2px solid var(--edge);
}

/* markdown prose */
.prose { font-size: 23px; line-height: 1.7; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose strong, .prose b { color: var(--white); }
.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  text-transform: uppercase;
}
.prose h1 { font-size: 15px; margin: 28px 0 14px; }
.prose h2 { font-size: 13px; margin: 28px 0 12px; }
.prose h3 { font-size: 11px; margin: 24px 0 12px; color: var(--blue); }
.prose ul, .prose ol { margin: 0 0 16px 1.4rem; padding: 0; }
.prose li { margin-bottom: 6px; }
.prose ul { list-style: square; }
.prose a { color: var(--blue); }
.prose hr { border: 0; height: 4px; margin: 24px 0; background: repeating-linear-gradient(90deg, var(--panel-hi) 0 8px, transparent 8px 16px); }
.prose blockquote {
  margin: 0 0 20px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(164, 208, 7, 0.09);
  border: 3px solid var(--edge);
  border-left: 8px solid var(--green);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--yellow);
  background: #0a0e13;
  border: 2px solid var(--edge);
}
.prose pre {
  margin: 0 0 16px;
  padding: 12px 14px;
  overflow-x: auto;
  background: #0a0e13;
  border: 3px solid var(--edge);
}
.prose pre code { padding: 0; border: 0; background: none; color: var(--text); }
.prose img, .prose video {
  width: auto;
  max-height: 70vh;
  margin: 18px auto;
  border: 4px solid var(--edge);
  box-shadow: 4px 4px 0 #000;
  background: #000;
}
.prose table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 20px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; text-align: left; vertical-align: top; border: 3px solid var(--edge); }
.prose th { color: var(--blue); background: var(--panel-2); text-transform: uppercase; font-size: 18px; }
.prose td { background: rgba(0, 0, 0, 0.18); }

/* ---------- CAD page ---------- */

.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.tool {
  padding: 18px;
  text-align: center;
  background: var(--panel-2);
  border: 4px solid var(--edge);
  box-shadow: 5px 5px 0 #000;
}
.tool-tile {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-px);
  font-size: 13px;
  color: #000;
  border: 3px solid var(--edge);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.25), inset 4px 4px 0 rgba(255, 255, 255, 0.3);
}
.tool h3 { margin: 0 0 4px; font-size: 28px; color: var(--white); }
.tool p { margin: 0; font-size: 20px; color: var(--muted); }

.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.process-card { padding: 20px; }
.process-card h3 { margin: 12px 0 8px; font-size: 28px; color: var(--white); }
.process-card p { margin: 0; }
.process-num {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--font-px);
  font-size: 14px;
  color: #000;
  background: var(--yellow);
  border: 3px solid var(--edge);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), 3px 3px 0 #000;
}

.cad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }

.cad-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 4px solid var(--edge);
  box-shadow: inset 0 0 0 2px var(--panel-hi), var(--shadow);
}
.cad-card.featured { grid-column: 1 / -1; flex-direction: row; box-shadow: inset 0 0 0 2px var(--orange), var(--shadow); }
.cad-img {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 12px;
  background:
    linear-gradient(rgba(102, 192, 244, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 192, 244, 0.12) 1px, transparent 1px),
    #0b1a28;
  background-size: 16px 16px;
  border-bottom: 4px solid var(--edge);
}
.cad-img img { max-height: 300px; object-fit: contain; }
.cad-card.featured .cad-img { flex: 1 1 50%; border-bottom: 0; border-right: 4px solid var(--edge); }
.cad-card.featured .cad-img img { max-height: 340px; }
.cad-body { flex: 1 1 50%; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.cad-body h3 { margin: 0; font-size: 29px; line-height: 1.2; color: var(--white); }
.cad-body p { margin: 0; font-size: 22px; }
.cad-body .btn { align-self: flex-start; margin-top: auto; }

.awards { display: flex; flex-wrap: wrap; gap: 8px; }
.award {
  padding: 4px 10px;
  font-family: var(--font-px);
  font-size: 8px;
  line-height: 1.5;
  color: #000;
  border: 3px solid var(--edge);
  box-shadow: 3px 3px 0 #000;
}
.award.gold { background: var(--yellow); }
.award.silver { background: #cfd8de; }
.award.pink { background: var(--pink); }

.cad-how h4 {
  margin: 4px 0 8px;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.cad-how ul { margin: 0; padding-left: 1.3rem; list-style: square; font-size: 21px; }
.cad-how li { margin-bottom: 6px; }

/* ---------- Additions ---------- */

.shot-toggle {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  width: 40px; height: 32px;
  padding: 0;
  font-family: var(--font-px);
  font-size: 10px;
  color: var(--white);
  background: rgba(5, 8, 11, 0.85);
  border: 3px solid var(--edge);
}
.shot-toggle:hover { background: var(--panel-hi); }

.grid { grid-auto-flow: dense; }
.capsule--big { grid-column: span 2; flex-direction: row; }
.capsule--big .capsule-img {
  flex: 0 0 56%;
  aspect-ratio: auto;
  min-height: 260px;
  border-bottom: 0;
  border-right: 4px solid var(--edge);
}
.capsule--big h3 { font-size: 34px; }
/* the photo fills the box instead of deciding how tall the card is */
.capsule--big .capsule-img img { position: absolute; inset: 0; }

/* cards are real links, so keep the page text colors instead of link blue */
a.capsule, a.news-row { color: var(--text); text-decoration: none; }
a.capsule:hover, a.news-row:hover { color: var(--text); }

@media (max-width: 700px) {
  .capsule--big { grid-column: auto; flex-direction: column; }
  .capsule--big .capsule-img {
    flex-basis: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: 0;
    border-bottom: 4px solid var(--edge);
  }
  .capsule--big h3 { font-size: 28px; }
}

/* ---------- Project details: diagram, tables, problems and fixes ---------- */

.diagram {
  overflow-x: auto;
  padding: 12px;
  background:
    linear-gradient(rgba(102, 192, 244, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 192, 244, 0.1) 1px, transparent 1px),
    #0b1a28;
  background-size: 16px 16px;
  border: 4px solid var(--edge);
  box-shadow: 4px 4px 0 #000;
}
.diagram svg { display: block; width: 100%; height: auto; }

.dg-link { stroke: var(--blue); stroke-width: 3; fill: none; }
.dg-arrow { fill: var(--blue); }
.dg-shadow { fill: rgba(0, 0, 0, 0.55); }
.dg-box { stroke: var(--edge); stroke-width: 3; }
.dg-name { font-family: var(--font-body); font-size: 21px; }
.dg-sub { font-family: var(--font-body); font-size: 16px; opacity: 0.85; }
.dg-lab { font-family: var(--font-body); font-size: 17px; fill: var(--white); }
.dg-lab-bg { fill: #10161d; stroke: var(--panel-hi); stroke-width: 2; }

.dg-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 18px; color: var(--muted); }
.dg-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dg-legend i { width: 14px; height: 14px; border: 2px solid var(--edge); }

.dg-hint { display: none; margin: 6px 0 0; font-size: 18px; color: var(--muted); }
@media (max-width: 760px) { .dg-hint { display: block; } }

.tbl-wrap { overflow-x: auto; border: 3px solid var(--edge); background: var(--panel-2); }
.tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 20px; }
.tbl th, .tbl td { padding: 8px 12px; text-align: left; vertical-align: top; border-top: 2px solid var(--edge); }
.tbl thead th {
  border-top: 0;
  font-family: var(--font-px);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0, 0, 0, 0.25);
}
.tbl td:first-child { color: var(--white); white-space: nowrap; }
.tbl td:nth-child(2) { color: var(--blue); }

.issues { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.issue { background: var(--panel-2); border: 3px solid var(--edge); box-shadow: 4px 4px 0 #000; }
.issue > div { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: start; padding: 10px 14px; }
.issue-f { border-top: 3px solid var(--edge); background: rgba(164, 208, 7, 0.07); }
.issue-tag {
  padding: 5px 4px;
  font-family: var(--font-px);
  font-size: 8px;
  text-align: center;
  color: #000;
  border: 2px solid var(--edge);
}
.issue-p .issue-tag { background: var(--pink); }
.issue-f .issue-tag { background: var(--green); }

/* review mode (add ?review to the address): outlines sections that are still draft text */
.review .is-draft { position: relative; outline: 3px dashed var(--orange); outline-offset: 8px; }
.review .is-draft::after {
  content: 'DRAFT';
  position: absolute;
  top: -22px; right: 0;
  padding: 2px 6px;
  font-family: var(--font-px);
  font-size: 8px;
  color: #000;
  background: var(--orange);
}

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

@media (max-width: 900px) {
  .showcase, .about, .store-top { grid-template-columns: minmax(0, 1fr); }
  .ach-list { grid-template-columns: minmax(0, 1fr); }
  .cad-card.featured { flex-direction: column; }
  .cad-card.featured .cad-img { border-right: 0; border-bottom: 4px solid var(--edge); }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    display: none;
    background: #171a21;
    border-bottom: 4px solid var(--edge);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-bottom: 2px solid var(--edge); border-left: 6px solid transparent; }
  .nav-links a:hover, .nav-links a[aria-current] { border-bottom-color: var(--edge); border-left-color: var(--orange); }
}

@media (max-width: 760px) {
  body { font-size: 22px; }
  .brand span:last-child { display: none; }
  .news-row { grid-template-columns: minmax(0, 1fr); }
  .news-date { flex-direction: row; align-items: baseline; gap: 12px; border-right: 0; border-bottom: 4px solid var(--edge); }
  .promo { grid-template-columns: minmax(0, 1fr); }
  .promo-art { width: 100%; height: 100px; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs dt { border-right: 0; }
  .issue > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .issue-tag { justify-self: start; padding: 5px 10px; }
  .store-head, .store-top, .store-body { padding-left: 16px; padding-right: 16px; }
  .modal { padding: 12px 8px; }
  .shot-strip { gap: 6px; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow li { flex-direction: column; align-items: stretch; gap: 6px; }
  .flow-arrow { text-align: center; transform: rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
