/* SpaceDragon site styles. One file, no framework. */
:root {
  /* Mapped onto the Galaxy Theme tokens (galaxy-theme.css). Brand purple = hue 268. */
  --bg: var(--gx-bg);
  --bg-alt: hsl(var(--gx-hue) var(--gx-tint) 9% / .55);
  --surface: var(--gx-surface);
  --surface-solid: var(--gx-bg-2);
  --border: var(--gx-border);
  --text: var(--gx-text);
  --muted: var(--gx-muted);
  --accent: var(--gx-accent-strong);
  --accent-2: var(--gx-accent);
  --warn: var(--gx-accent);
  --ok: hsl(150 45% 68%);
  --radius: 0px;
  --max: 1160px;
  --font: var(--gx-font);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  /* neutral light spot behind black parts (they vanish on a flat dark fill) */
  --media-bg: radial-gradient(circle at 50% 45%, hsl(var(--gx-hue) 4% 26%) 0%, hsl(var(--gx-hue) 4% 15%) 55%, hsl(var(--gx-hue) 4% 10% / .9) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .6em; font-weight: 300; }
h1 { font-size: clamp(32px, 5vw, 60px); font-weight: 200; letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 1.25rem; font-weight: 400; }
strong, b { font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font); font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .18em; color: var(--muted); margin-bottom: .8em; display: block;
}
.eyebrow::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 2px 0; transform: rotate(45deg);
  background: var(--gx-accent); box-shadow: 0 0 10px var(--gx-accent); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: #000; padding: 8px 12px; z-index: 100; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--gx-hue) var(--gx-tint) 6% / .62);
  -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 0; filter: drop-shadow(0 0 10px var(--gx-accent-glow)); }
.nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.nav ul a {
  position: relative; display: block; padding: 9px 14px; border: 1px solid transparent;
  color: var(--muted); font-weight: 400; font-size: 15px;
  transition: color .25s, background .25s, border-color .25s, box-shadow .35s var(--gx-ease);
}
.nav ul a:hover, .nav ul a:focus-visible {
  outline: none; color: var(--text); text-decoration: none; background: var(--gx-surface-hover);
  border-color: hsl(0 0% 100% / .5); box-shadow: var(--gx-underglow);
}
.nav ul a[aria-current="page"] { color: #fff; background: linear-gradient(0deg, hsl(var(--gx-hue) var(--gx-sat) 60% / .22), transparent); }
.nav ul a[aria-current="page"]::after { /* accent bar, Galaxy active-nav style (horizontal) */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px;
  background: var(--gx-accent); box-shadow: 0 0 12px var(--gx-accent);
}
.nav-toggle { display: none; background: var(--gx-surface); border: 1px solid var(--border); color: var(--text); border-radius: 0; padding: 8px 14px; font: 500 14px var(--font); letter-spacing: .04em; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav ul {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: hsl(var(--gx-hue) var(--gx-tint) 7% / .96); border-bottom: 1px solid var(--border);
  }
  .nav ul.open { display: flex; }
  .nav ul a { display: block; padding: 14px 20px; }
  .nav ul a[aria-current="page"]::after { left: -1px; right: auto; top: 22%; bottom: 22%; width: 3px; height: auto; }
}

/* Buttons */
/* .btn mirrors .gx-btn from galaxy-theme.css (PS-style focus frame, cursor shadow, under-glow) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px; min-height: 48px;
  font: 500 15px/1 var(--font); letter-spacing: .02em;
  color: var(--text); background: var(--gx-surface);
  border: 1px solid var(--border); border-radius: 0; cursor: pointer;
  box-shadow: var(--gx-sx, 0px) calc(var(--gx-sy, 0px) + 6px) 22px -6px hsl(0 0% 0% / var(--gx-shadow));
  transition: transform .35s var(--gx-ease), border-color .25s, box-shadow .35s var(--gx-ease), background .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover, .btn:focus-visible {
  outline: none; text-decoration: none;
  transform: scale(1.045);
  border-color: var(--gx-border-focus);
  background-color: var(--gx-surface-hover);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / .35),
    0 0 24px var(--gx-accent-glow),
    var(--gx-underglow),
    var(--gx-sx, 0px) calc(var(--gx-sy, 0px) + 10px) 30px -6px hsl(0 0% 0% / var(--gx-shadow));
}
.btn:active { transform: scale(.98); }
.btn-primary {
  color: #fff;
  border-color: hsl(var(--gx-hue) 80% 82% / .35);
  background:
    linear-gradient(110deg, transparent 35%, hsl(0 0% 100% / .28) 48%, transparent 60%) no-repeat,
    linear-gradient(180deg, hsl(var(--gx-hue) var(--gx-sat) 62%), hsl(var(--gx-hue) var(--gx-sat) 42%));
  background-size: 260% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  transition: transform .35s var(--gx-ease), border-color .25s, box-shadow .35s var(--gx-ease), background-position .9s var(--gx-ease);
}
.btn-primary:hover, .btn-primary:focus-visible { background-position: -60% 0, 0 0; }
.btn-ghost { color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Hero */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-img {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6));
  background: radial-gradient(circle at 50% 50%, hsl(268 4% 65% / .35) 0%, transparent 65%);
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero { padding: 64px 0; } }

/* Sections */
section { padding: 80px 0; }
section.alt { background: linear-gradient(180deg, hsl(0 0% 100% / .02), transparent 30%), var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 40px; }

/* Cards */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0;
  overflow: hidden; display: flex; flex-direction: column; color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
a.card:hover { text-decoration: none; }
/* Soft light spot behind products: most parts are black and vanish on a flat dark fill */
.card-media, .product-img {
  background: radial-gradient(circle at 50% 45%, hsl(268 4% 26%) 0%, hsl(268 4% 15%) 55%, hsl(268 4% 10%) 100%);
}
.card-media { aspect-ratio: 4 / 3; padding: 18px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: .95rem; }
.card-meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 10px; }
.card-cta { color: var(--accent-2); font-weight: 600; font-size: .95rem; margin-top: 12px; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; padding: 3px 9px; border-radius: 0; border: 1px solid var(--border);
  color: var(--muted); margin-bottom: 10px; width: fit-content;
}
.badge.ok { color: var(--ok); border-color: hsl(150 45% 68% / .4); }
.badge.soon { color: var(--warn); border-color: hsl(268 72% 70% / .4); }

/* Features */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature { padding: 22px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Product page */
.product-hero { padding: 64px 0; border-bottom: 1px solid var(--border); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product-img { border: 1px solid var(--border); border-radius: 0; padding: 28px; }
.price { font-size: 1.8rem; font-weight: 700; margin: .2em 0 .1em; }
.price-note { font-size: .85rem; color: var(--muted); }
@media (max-width: 860px) { .product-grid { grid-template-columns: minmax(0, 1fr); } }

.specs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.specs th, .specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 42%; }
.specs td { font-family: var(--mono); font-size: .9rem; }
.specs-wrap { border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: var(--surface); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery a { display: block; border-radius: 0; overflow: hidden; border: 1px solid var(--border); background: hsl(268 4% 12%); aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.04); }

ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 28px; position: relative; margin-bottom: .6em; color: var(--muted); }
ul.checks li::before { content: "▸"; position: absolute; left: 6px; color: var(--accent); }
ul.checks li strong { color: var(--text); }

.note {
  border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px;
  border-radius: 0; color: var(--muted); font-size: .95rem;
}

/* Community band */
.community { text-align: center; }
.community .btn-row { justify-content: center; }

/* Form */
form.contact { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
input, textarea { /* .gx-input */
  width: 100%; background: hsl(0 0% 100% / .04); border: 1px solid var(--border); color: var(--text);
  border-radius: 0; padding: 12px 14px; font: 400 15px var(--font);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gx-accent); box-shadow: 0 0 0 3px hsl(var(--gx-hue) var(--gx-sat) 60% / .2); }
textarea { min-height: 150px; resize: vertical; }
.form-status { font-size: .95rem; min-height: 1.4em; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--text); font-size: .95rem; margin: 0 0 .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .85rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* Let grid children shrink below their image's intrinsic width on phones */
.hero-grid > *, .product-grid > *, .two-col > * { min-width: 0; }

/* ===================================================================== */
/* Projects / lab layout                                                 */
/* ===================================================================== */

/* Scroll reveal. JS adds .is-visible; without JS everything stays visible. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .1s; }
.js .reveal[data-delay="2"] { transition-delay: .2s; }
.js .reveal[data-delay="3"] { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* Hero backdrop: the Galaxy starfield shows through; only a faint purple glow is added */
.blueprint {
  position: relative; overflow: hidden;
  background: radial-gradient(900px 520px at 80% 0%, hsl(var(--gx-hue) var(--gx-sat) 40% / .10), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.glow-img { filter: drop-shadow(0 40px 70px rgba(0, 0, 0, .65)); }
.glow-img-wrap { position: relative; }
.glow-img-wrap::before {
  content: ""; position: absolute; inset: 8% 10%; border-radius: 0;
  background: radial-gradient(circle, hsl(268 4% 72% / .5), transparent 70%); filter: blur(10px);
}
.glow-img-wrap img { position: relative; }

/* Status chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 0; border: 1px solid var(--border); color: var(--muted); background: hsl(0 0% 100% / .04);
}
.chip.free { color: var(--ok); border-color: hsl(150 45% 68% / .45); }
.chip.dev { color: var(--warn); border-color: hsl(268 72% 70% / .45); }
.chip.flag { color: #fff; background: hsl(var(--gx-hue) var(--gx-sat) 60% / .28); border-color: var(--gx-accent); box-shadow: 0 0 14px var(--gx-accent-glow); }

/* Stat strip with animated counters */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 0; overflow: hidden; margin-top: 28px; }
.stat { background: var(--surface); padding: 18px 20px; }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: var(--text); font-weight: 300; }
.stat span { font-size: .82rem; color: var(--muted); }

/* Featured (flagship) project card */
.featured {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; border: 1px solid var(--border);
  border-radius: 0; overflow: hidden; background: var(--surface); position: relative; color: var(--text);
}
.featured:hover { text-decoration: none; }
.featured-media { position: relative; min-height: 420px; display: grid; place-items: center; padding: 30px;
  background: var(--media-bg); }
.featured-media img { max-height: 460px; width: auto; object-fit: contain; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.featured:hover .featured-media img { transform: scale(1.04) rotate(-1deg); }
.featured-body { padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
@media (max-width: 900px) { .featured { grid-template-columns: minmax(0, 1fr); } .featured-media { min-height: 300px; } .featured-body { padding: 28px 24px 30px; } }

/* Alternating project rows */
.project-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 72px 0; border-top: 1px solid var(--border); position: relative;
}
.project-row:nth-child(even) .project-media { order: 2; }
.project-num {
  display: block; font-family: var(--mono); font-size: clamp(3rem, 6vw, 4.8rem); line-height: 1; font-weight: 500; margin-bottom: 14px;
  font-family: var(--font); font-weight: 200;
  color: transparent; -webkit-text-stroke: 1px hsl(268 72% 75% / .45);
}
.project-media {
  position: relative; border-radius: 0; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 50%, hsl(268 4% 26%) 0%, hsl(268 4% 15%) 55%, hsl(268 4% 10%) 100%);
  display: grid; place-items: center; transform-style: preserve-3d; transition: transform .25s ease, border-color .25s ease;
}
.project-media:hover { border-color: hsl(0 0% 100% / .5); box-shadow: var(--gx-underglow); }
.project-media img { width: 100%; height: 100%; object-fit: contain; padding: 24px; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.project-media.photo img { object-fit: cover; padding: 0; }
.project-media:hover img { transform: scale(1.05); }
.project-media .pair { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.project-media .pair img { padding: 18px; }
.project-media .pair img:last-child { transform: translateY(14%); }
.project-media:hover .pair img:first-child { transform: translateY(-6%) scale(1.04); }
.project-media:hover .pair img:last-child { transform: translateY(8%) scale(1.04); }
.project-body h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.project-body .meta-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 6px; font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.project-body .meta-list span::before { content: "◆ "; color: var(--accent); font-size: .6rem; vertical-align: 2px; }
@media (max-width: 900px) {
  .project-row { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 56px 0; }
  .project-row:nth-child(even) .project-media { order: 0; }
}

/* Project page hero */
.p-hero { padding: 72px 0 64px; }
.p-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.p-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.p-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.p-hero-media { border-radius: 0; overflow: hidden; }
.p-hero-media.photo { border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
@media (max-width: 900px) { .p-hero-grid { grid-template-columns: minmax(0, 1fr); } .p-hero { padding: 48px 0; } }

.crumbs { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* Section with sticky side label */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
.split figure { margin: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 28px; } .split.rev > :first-child { order: 0; } }

figure.panel { margin: 0; border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: #f4f5f7; }
figure.panel.dark { background: radial-gradient(circle at 50% 50%, hsl(268 4% 26%) 0%, hsl(268 4% 15%) 60%, hsl(268 4% 10%) 100%); }
figure.panel img { width: 100%; }
figure.panel figcaption { background: var(--gx-bg-2); color: var(--muted); font-size: .85rem; padding: 10px 14px; border-top: 1px solid var(--border); }

/* Variant tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); margin-bottom: 22px; }
.tabs button {
  font: inherit; font-weight: 500; font-size: 14px; color: var(--muted); background: none; border: 1px solid transparent;
  padding: 8px 18px; border-radius: 0; cursor: pointer; transition: background .2s ease, color .2s ease;
}
.tabs button:hover { color: var(--text); border-color: hsl(0 0% 100% / .4); }
.tabs button[aria-selected="true"] { color: #fff; border-color: var(--gx-accent); background: hsl(var(--gx-hue) var(--gx-sat) 60% / .18); box-shadow: var(--gx-underglow); }
.tab-panel[hidden] { display: none; }
.tab-panel { animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.compare thead th { font-family: var(--mono); font-size: .8rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.compare tbody th { color: var(--muted); font-weight: 500; }
.compare td { font-family: var(--mono); font-size: .9rem; }
.table-wrap { border: 1px solid var(--border); border-radius: 0; overflow-x: auto; background: var(--surface); }

/* Numbered steps */
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--muted); }
ol.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 16px; top: 13px;
  font-family: var(--mono); font-weight: 500; color: var(--accent);
}
ol.steps li strong { color: var(--text); }

/* Callouts */
.callout { border: 1px solid hsl(268 72% 70% / .35); border-left-width: 3px; background: hsl(268 72% 70% / .06); border-radius: 0; padding: 16px 18px; color: var(--muted); font-size: .95rem; }
.callout strong { color: var(--warn); }
.callout.danger { border-color: rgba(255, 90, 90, .4); background: rgba(255, 90, 90, .06); }
.callout.danger strong { color: #ff8a8a; }

/* Code block */
pre.code {
  background: hsl(268 4% 4% / .8); border: 1px solid var(--border); border-radius: 0; padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: .85rem; line-height: 1.6; color: hsl(268 8% 85%); margin: 0;
}
pre.code .c { color: var(--gx-dim); }

/* Download / file cards */
.files { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.file {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: 0; background: var(--surface); color: var(--text); transition: border-color .2s ease, transform .2s ease;
}
.file:hover { text-decoration: none; }
.file .ico { font-family: var(--mono); font-size: .72rem; padding: 6px 8px; border-radius: 0; background: hsl(268 72% 58% / .12); color: var(--accent); }
.file small { display: block; color: var(--muted); font-size: .8rem; }

/* Gallery lightbox */
.gallery a { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: hsl(268 4% 3% / .92); display: none;
  align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; animation: fadeUp .25s ease; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 0; background: #fff; }

/* Photo slots: hidden on the live site, shown with ?slots so the owner can see where photos go */
.slot { display: none; }
.show-slots .slot {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px;
  min-height: 220px; border: 2px dashed hsl(268 72% 70% / .5); border-radius: 0; padding: 20px;
  background: repeating-linear-gradient(45deg, hsl(268 72% 70% / .04) 0 12px, transparent 12px 24px); color: var(--muted);
}
.show-slots .slot b { font-family: var(--mono); color: var(--accent-2); font-size: .8rem; }
.slot-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.slot-grid:not(:has(img)) { display: none; }
.show-slots .slot-grid { display: grid; }
figure.slot-img { margin: 0; border-radius: 0; overflow: hidden; border: 1px solid var(--border); }
figure.slot-img img { width: 100%; height: 100%; object-fit: cover; }

/* Section nav on project pages */
.subnav { position: sticky; top: 68px; z-index: 40; background: hsl(268 4% 6% / .62); -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%); border-bottom: 1px solid var(--border); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; white-space: nowrap; padding: 12px 14px; font-size: .88rem; color: var(--muted); border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a.active { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }
[id] { scroll-margin-top: 130px; }

/* Cursor glow on cards: handled by the Galaxy spotlight (see bottom of file) */
.glow-card { position: relative; }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.roadmap li { position: relative; padding: 0 0 22px 26px; color: var(--muted); }
.roadmap li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 0; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--border); }
.roadmap li.done::before { background: var(--accent); border-color: var(--accent); }
.roadmap li.now::before { background: #fff; border-color: var(--gx-accent); box-shadow: 0 0 0 5px hsl(268 72% 70% / .2), 0 0 14px var(--gx-accent); }
.roadmap li strong { color: var(--text); display: block; }

/* Gallery of background-removed photos */
.gallery.cutouts { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery.cutouts a { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 45%, hsl(268 5% 27%) 0%, hsl(268 4% 14%) 62%, hsl(268 4% 9%) 100%); }
.gallery.cutouts img { object-fit: contain; padding: 18px; }
.gallery.cutouts a:hover img { transform: scale(1.06); }

/* ---------- Sneak peeks (planned projects) ---------- */
.tag-soon { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); border: 1px solid hsl(268 72% 70% / .45); border-radius: 0; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.peek-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.peek { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: var(--surface); transition: border-color .3s ease, transform .3s ease; }

.peek-art { position: relative; display: grid; place-items: center; padding: 22px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, hsl(268 72% 58% / .22), transparent 65%),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 20px 20px, hsl(268 4% 8% / .7);
  border-right: 1px solid var(--border); }
.peek-no { position: absolute; top: 10px; left: 14px; font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.peek-scan { position: absolute; left: 0; right: 0; height: 40%; top: -40%; pointer-events: none;
  background: linear-gradient(180deg, transparent, hsl(268 72% 75% / .14), transparent); animation: scan 4.5s linear infinite; }
@keyframes scan { to { top: 100%; } }
.peek-body { padding: 24px 24px 22px; }
.peek-body h3 { font-size: 1.55rem; margin: .1em 0 .3em; letter-spacing: -.01em; }
.peek-body p { margin: 0 0 16px; font-size: .95rem; }
.peek-specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.peek-specs li { border: 1px solid var(--border); border-radius: 0; padding: 7px 11px; background: rgba(255, 255, 255, .02); min-width: 0; }
.peek-specs b { display: block; font-size: 1.02rem; color: var(--text); }
.peek-specs span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 1000px) { .peek-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .peek { grid-template-columns: minmax(0, 1fr); } .peek-art { border-right: 0; border-bottom: 1px solid var(--border); height: 170px; } }

/* Line-art glyphs: stroke draws in when the card is revealed */
.glyph { width: 100%; max-width: 200px; height: auto; overflow: visible; }
.glyph g { fill: none; stroke: var(--accent-2); stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter; }
.glyph .dot { fill: var(--accent); stroke: none; }
.glyph .rotor { stroke: var(--accent); stroke-dasharray: 10 8; transform-box: fill-box; }
.glyph .rotor circle { transform-box: fill-box; transform-origin: center; animation: spin 2.6s linear infinite; }
.glyph .dash { stroke-dasharray: 6 5; }
@keyframes spin { to { transform: rotate(360deg); } }
.glyph .draw path, .glyph .draw rect { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.8s ease .2s; }
.is-visible .glyph .draw path, .is-visible .glyph .draw rect, :not(.js) .glyph .draw * { stroke-dashoffset: 0; }
.glyph .draw rect.dash { stroke-dasharray: 6 5; stroke-dashoffset: 0; }
.glyph .leg { transform-box: fill-box; transform-origin: 50% 0; animation: step 1.6s ease-in-out infinite; }
.glyph .l2, .glyph .l3 { animation-delay: -.8s; }
@keyframes step { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

/* Homepage mini teaser */
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mini { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); transition: border-color .3s, transform .3s; }
.mini:hover { text-decoration: none; }
.mini .glyph { max-width: 140px; margin: 0 auto 8px; }
.mini .chip { align-self: flex-start; }
.mini strong { font-size: 1.15rem; }
.mini small { color: var(--muted); }
@media (max-width: 900px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .mini-grid { grid-template-columns: minmax(0, 1fr); } }

/* AetherForge */
.aether-banner { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 24px; align-items: center;
  padding: 28px 32px; border: 1px solid var(--border); border-radius: 0; color: var(--text);
  background: radial-gradient(500px 260px at 85% 50%, hsl(268 72% 58% / .18), transparent 70%), var(--surface); transition: border-color .3s; }
.aether-banner:hover { text-decoration: none; }
.aether-banner h3 { font-size: 1.7rem; margin: .1em 0 .2em; }
.aether-banner p { margin: 0 0 10px; }
.link-arrow { color: var(--accent-2); font-weight: 600; }
@media (max-width: 700px) { .aether-banner { grid-template-columns: minmax(0, 1fr); padding: 24px; } .aether-banner .aether-svg { max-width: 220px; } }
.aether-stage { display: grid; place-items: center; }
.aether-svg { width: 100%; max-width: 420px; height: auto; }
.aether-svg g { fill: none; stroke-linecap: square; stroke-linejoin: miter; }
.aether-svg .grid-plane { stroke: hsl(268 72% 75% / .28); stroke-width: 1.2; }
.aether-svg .sketch { stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 8 6; animation: march 1.2s linear infinite; }
.aether-svg .layers path { stroke: var(--accent-2); stroke-width: 2; opacity: 0; animation: layer 6s ease-in-out infinite; }
.aether-svg .layers path:nth-child(2) { animation-delay: .5s; } .aether-svg .layers path:nth-child(3) { animation-delay: 1s; }
.aether-svg .layers path:nth-child(4) { animation-delay: 1.5s; } .aether-svg .layers path:nth-child(5) { animation-delay: 2s; }
.aether-svg .solid { stroke: #fff; stroke-width: 2.2; opacity: 0; animation: solid 6s ease-in-out infinite; }
.aether-svg .nozzle { stroke: var(--accent-2); stroke-width: 2; animation: nozzle 6s ease-in-out infinite; }
.aether-svg .nozzle .dash { stroke-dasharray: 3 4; }
@keyframes march { to { stroke-dashoffset: -28; } }
@keyframes layer { 0%, 8% { opacity: 0; } 15%, 75% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes solid { 0%, 45% { opacity: 0; } 60%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes nozzle { 0% { transform: translateY(80px); } 45% { transform: translateY(20px); } 60%, 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .aether-svg .layers path, .aether-svg .solid { opacity: 1; } .glyph .draw * { stroke-dashoffset: 0 !important; } }

/* Dragon-Arm One launch page */
.launch { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 14px 18px; border: 1px solid hsl(268 72% 58% / .45);
  border-radius: 0; background: linear-gradient(90deg, hsl(268 72% 58% / .16), hsl(268 72% 58% / 0) 70%); }
.launch b { display: block; font-family: var(--mono); color: var(--accent-2); font-size: 1rem; letter-spacing: .02em; }
.launch small { color: var(--muted); font-size: .9rem; }
.launch-dot { flex: none; width: 10px; height: 10px; margin: 0 2px; border-radius: 0; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 0 0 hsl(268 72% 58% / .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 hsl(268 72% 58% / .55); } 70% { box-shadow: 0 0 0 12px hsl(268 72% 58% / 0); } 100% { box-shadow: 0 0 0 0 hsl(268 72% 58% / 0); } }
@media (prefers-reduced-motion: reduce) { .launch-dot { animation: none; } }
figure.render { margin: 0; border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: hsl(268 4% 9%); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
figure.render img { width: 100%; display: block; }
figure.render figcaption { background: var(--surface); color: var(--muted); font-size: .85rem; padding: 10px 14px; border-top: 1px solid var(--border); }
figure.hero-render { max-width: 560px; margin-left: auto; }
.wide-render { padding: 0 0 8px; }
.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.pillar { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); }
.pillar:hover { text-decoration: none; }
.pillar-k { font-family: var(--font); font-size: 1.5rem; font-weight: 300; color: var(--accent-2); }
.pillar h3 { margin: 0; font-size: 1.1rem; }
.pillar p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.pillar .card-cta { font-size: .85rem; }
@media (max-width: 600px) { .tabs { display: flex; flex-wrap: wrap; border-radius: 0; } }

/* ===================================================================== */
/* Galaxy Theme bridge                                                   */
/* Applies the .gx-surface / .gx-card look from galaxy-theme.css to the  */
/* site's own components, so build.py markup stays unchanged.            */
/* JS (site.js) registers the same selectors as GalaxyTheme "spot"       */
/* targets, which writes --gx-lx/--gx-ly (cursor) and --gx-sx/--gx-sy    */
/* (shadow direction) onto each element.                                 */
/* ===================================================================== */

/* Glass panels */
.card, .feature, .file, .pillar, .peek, .mini, .featured, .aether-banner,
.specs-wrap, .table-wrap, .stats, .tabs, .note, .launch, ol.steps li, .project-media, figure.render {
  background: linear-gradient(180deg, hsl(0 0% 100% / .035), transparent 40%), var(--gx-surface);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow:
    var(--gx-sx, 0px) calc(var(--gx-sy, 0px) + 12px) 44px -10px hsl(0 0% 0% / var(--gx-shadow)),
    inset 0 1px 0 hsl(0 0% 100% / .05);
}
.launch { border-color: hsl(268 72% 58% / .45); background: linear-gradient(90deg, hsl(268 72% 58% / .16), transparent 70%), var(--gx-surface); }
.stat { background: hsl(var(--gx-hue) var(--gx-tint) 8% / .55); }
.note, .callout { border-left: 3px solid var(--gx-accent); }
.project-media, .featured-media, .card-media { background: var(--media-bg); }
figure.render { background: hsl(268 4% 9%); }

/* Cursor edge glow (::before ring) + inner light (::after), as in galaxy-theme.css */
:where(.card, .feature, .file, .pillar, .peek, .mini, .featured, .aether-banner, .specs-wrap, .table-wrap, .btn) {
  position: relative; isolation: isolate;
}
:where(.card, .feature, .file, .pillar, .peek, .mini, .featured, .aether-banner, .specs-wrap, .table-wrap, .btn)::before {
  content: ""; position: absolute; inset: 0; padding: 1px; pointer-events: none; z-index: 3;
  background: radial-gradient(200px circle at var(--gx-lx, -999px) var(--gx-ly, -999px),
    hsl(var(--gx-hue) 90% 85% / .95), hsl(var(--gx-hue) var(--gx-sat) 65% / .35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--gx-edge);
}
:where(.card, .feature, .file, .pillar, .peek, .mini, .featured, .aether-banner, .specs-wrap, .table-wrap, .btn)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(320px circle at var(--gx-lx, -999px) var(--gx-ly, -999px), hsl(0 0% 100% / .07), transparent 65%);
}

/* Hover: lift + purple light from underneath (.gx-card:hover) */
a.card, .file, .pillar, .peek, .mini, .featured, .aether-banner, .feature {
  transition: transform .35s var(--gx-ease), background-color .35s, border-color .35s, box-shadow .35s var(--gx-ease);
}
a.card:hover, a.file:hover, a.pillar:hover, .peek:hover, a.mini:hover, a.featured:hover, a.aether-banner:hover, .feature:hover {
  transform: translateY(-2px);
  background-color: var(--gx-surface-hover);
  border-color: hsl(0 0% 100% / .14);
  border-bottom-color: hsl(var(--gx-hue) 80% 80% / calc(.5 * var(--gx-under)));
  box-shadow: var(--gx-underglow), var(--gx-sx, 0px) calc(var(--gx-sy, 0px) + 12px) 44px -10px hsl(0 0% 0% / var(--gx-shadow));
}
a.card:focus-visible, a.file:focus-visible, a.pillar:focus-visible, a.mini:focus-visible, a.featured:focus-visible, a.aether-banner:focus-visible {
  outline: 1px solid var(--gx-border-focus); outline-offset: 2px;
}

/* Reveal sets transform:none with higher specificity; restore the hover lift once revealed */
.js .reveal.is-visible:is(a.card, a.file, a.pillar, .peek, a.mini, a.featured, a.aether-banner, .feature) {
  transition: opacity .7s ease, transform .35s var(--gx-ease), background-color .35s, border-color .35s, box-shadow .35s var(--gx-ease);
}
.js .reveal.is-visible:is(a.card, a.file, a.pillar, .peek, a.mini, a.featured, a.aether-banner, .feature):hover { transform: translateY(-2px); }

/* Status chips: green stays for "free"; "in development" uses the accent instead of amber */
.chip.dev, .tag-soon { color: var(--gx-accent); border-color: hsl(var(--gx-hue) var(--gx-sat) 70% / .45); }

/* Accent text helpers */
.accent-text, .gx-accent-text {
  background: linear-gradient(100deg, #fff 10%, var(--gx-accent) 60%, var(--gx-accent-strong));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Footer sits on the starfield */
.site-footer { background: linear-gradient(180deg, transparent, hsl(var(--gx-hue) var(--gx-tint) 4% / .6)); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal.is-visible:is(a.card, a.file, a.pillar, .peek, a.mini, a.featured, a.aether-banner, .feature):hover,
  a.card:hover, a.file:hover, a.pillar:hover, .peek:hover, a.mini:hover, a.featured:hover, a.aether-banner:hover, .feature:hover { transform: none; }
}
