/* HumanBotty - night atelier field guide
   Type: Clash Display + Satoshi (Fontshare)
   Color: cyan sensor + copper fastener on warm-black bench */

:root {
  --bg: oklch(0.145 0.018 250);
  --bg-elev: oklch(0.18 0.02 250);
  --bg-card: oklch(0.2 0.022 250);
  --bg-glass: oklch(0.2 0.022 250 / 0.72);
  --text: oklch(0.94 0.015 80);
  --muted: oklch(0.74 0.025 240);
  --faint: oklch(0.58 0.02 240);
  --cyan: oklch(0.84 0.12 210);
  --cyan-rgb: 61 224 255;
  --copper: oklch(0.74 0.09 55);
  --amber: oklch(0.82 0.12 75);
  --green: oklch(0.78 0.12 155);
  --red: oklch(0.72 0.16 20);
  --border: oklch(0.92 0.02 80 / 0.12);
  --border-hi: oklch(0.92 0.02 80 / 0.22);
  --focus: var(--cyan);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-w: 15.5rem;
  --header-h: 3.75rem;
  --page: min(72rem, calc(100vw - 2rem));
  --measure: 62ch;
  --shadow: 0 1px 0 oklch(1 0 0 / 0.06) inset, 0 18px 48px oklch(0.08 0.03 250 / 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  background-image:
    radial-gradient(ellipse 80% 50% at 8% -10%, oklch(0.7 0.12 210 / 0.1), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 0%, oklch(0.65 0.08 55 / 0.08), transparent 45%);
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-sm);
}
.skip:focus { top: 0.75rem; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: oklch(0.9 0.08 210); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Header / brand island */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0 0.85rem 0 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.2);
}

.brand-island {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  padding: 0.35rem 0.85rem 0.35rem 0.2rem;
  border-right: 1px solid var(--border-hi);
  overflow: hidden;
}

.x-follow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  max-height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, rgb(var(--cyan-rgb)) 40%, transparent);
  text-decoration: none;
  overflow: hidden;
  color: var(--text);
}
.x-follow:hover { background: oklch(0.84 0.12 210 / 0.1); text-decoration: none; }
.x-follow-mark {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.x-follow-mark svg {
  width: 11px;
  height: 11px;
  max-width: 11px;
  max-height: 11px;
  fill: currentColor;
}
.x-follow-handle {
  display: none;
  font-size: 0.62rem;
  white-space: nowrap;
  padding-right: 0.5rem;
  color: var(--muted);
}
@media (min-width: 1536px) {
  .x-follow-handle { display: inline; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; color: inherit; }
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.header-nav {
  display: none;
  flex: 1;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--text); background: var(--bg-elev); }
.header-nav a[aria-current="page"] {
  color: var(--cyan);
  background: oklch(0.84 0.12 210 / 0.1);
}

.header-live {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid oklch(0.78 0.12 155 / 0.35);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.nav-toggle {
  display: inline-flex;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

@media (min-width: 980px) {
  .header-nav { display: flex; }
  .nav-toggle { display: none; }
  .header-live { margin-left: 0.5rem; }
}

/* Shell + sidebar */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-h));
}

.side-nav {
  display: none;
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.85rem 2.5rem;
  background: oklch(0.145 0.018 250 / 0.55);
}

.nav-section {
  margin: 1.15rem 0 0.35rem;
  padding: 0 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.nav-section:first-child { margin-top: 0; }

.side-nav a.nav-link {
  display: block;
  padding: 0.42rem 0.65rem;
  margin: 0.08rem 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.side-nav a.nav-link:hover {
  background: var(--bg-elev);
  color: var(--text);
}
.side-nav a.nav-link[aria-current="page"] {
  background: oklch(0.84 0.12 210 / 0.1);
  color: var(--cyan);
  font-weight: 600;
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 35;
  background: oklch(0.12 0.02 250 / 0.96);
  padding: 1rem 1.1rem 2rem;
  overflow: auto;
}
body.nav-open .nav-drawer { display: block; }
body.nav-open { overflow: hidden; }

@media (min-width: 980px) {
  .shell { grid-template-columns: var(--nav-w) 1fr; }
  .side-nav {
    display: block;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-drawer { display: none !important; }
}

.main {
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.25rem) 4rem;
  max-width: 58rem;
}

.page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.kicker,
.page-header .kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}
.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: var(--text-h1);
}
.page-header .lede {
  margin: 0;
  color: var(--muted);
  max-width: var(--measure);
  font-size: 1.05rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.95rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  background: var(--bg-card);
  color: var(--muted);
}
.chip.live { border-color: oklch(0.78 0.12 155 / 0.4); color: var(--green); }
.chip.active { border-color: oklch(0.84 0.12 210 / 0.4); color: var(--cyan); }
.chip.warn { border-color: oklch(0.82 0.12 75 / 0.4); color: var(--amber); }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.card p { margin: 0.35rem 0; color: var(--muted); font-size: 0.95rem; }
.card .stat {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.03em;
}
.card.accent {
  border-color: oklch(0.84 0.12 210 / 0.28);
  background: linear-gradient(145deg, oklch(0.84 0.12 210 / 0.08), var(--bg-card) 55%);
}

.hero {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2rem;
  }
}
.hero h1 {
  font-size: var(--text-display);
  margin: 0 0 0.7rem;
}
.hero .lede { font-size: 1.08rem; max-width: 40rem; color: var(--muted); }
.hero-frame {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid oklch(0.84 0.12 210 / 0.4);
  background: oklch(0.84 0.12 210 / 0.14);
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}
.btn:hover { background: oklch(0.84 0.12 210 / 0.24); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-hi);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-elev); }

.prose h2 {
  margin: 2.1rem 0 0.75rem;
  font-size: var(--text-h2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}
.prose h3 { margin: 1.4rem 0 0.45rem; font-size: 1.05rem; color: var(--cyan); }
.prose p { color: var(--muted); max-width: var(--measure); }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.2rem; max-width: var(--measure); }
.prose li { margin: 0.38rem 0; }
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 1rem 0;
  padding: 0.85rem 1.05rem;
  border-left: 3px solid var(--copper);
  background: oklch(0.74 0.09 55 / 0.07);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
td { color: var(--muted); }
td:first-child, th:first-child { color: var(--text); }

.status {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status.active { background: oklch(0.84 0.12 210 / 0.15); color: var(--cyan); }
.status.done { background: oklch(0.78 0.12 155 / 0.15); color: var(--green); }
.status.planned { background: oklch(0.74 0.025 240 / 0.12); color: var(--muted); }
.status.parked { background: oklch(0.82 0.12 75 / 0.12); color: var(--amber); }
.status.ordered { background: oklch(0.7 0.1 300 / 0.15); color: oklch(0.82 0.1 300); }
.status.optional { background: oklch(0.74 0.09 55 / 0.12); color: var(--copper); }

.timeline { position: relative; padding-left: 1.25rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--copper), transparent);
}
.entry {
  position: relative;
  margin-bottom: 1.15rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.entry::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem + 0.15rem);
  top: 1.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgb(var(--cyan-rgb) / 0.55);
}
.entry .date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: oklch(0.65 0.08 210);
}
.entry h3 { margin: 0.25rem 0 0.5rem; font-size: 1.05rem; }
.entry .tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }

.bom-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.bom-item:last-child { border-bottom: none; }
.bom-item .cat {
  font-size: 0.7rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bom-item .price {
  font-family: var(--font-mono);
  color: var(--copper);
  white-space: nowrap;
}
.check {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--border-hi);
  border-radius: 4px;
  background: transparent;
}
.check.on {
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--bg);
}

.callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid oklch(0.84 0.12 210 / 0.25);
  background: oklch(0.84 0.12 210 / 0.06);
}
.callout.warn {
  border-color: oklch(0.82 0.12 75 / 0.35);
  background: oklch(0.82 0.12 75 / 0.06);
}
.callout.danger {
  border-color: oklch(0.72 0.16 20 / 0.35);
  background: oklch(0.72 0.16 20 / 0.06);
}
.callout strong { color: var(--text); }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.faq details p { margin: 0.5rem 0 0; color: var(--muted); max-width: var(--measure); }

pre.diagram {
  background: oklch(0.12 0.02 250);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.35;
  color: oklch(0.72 0.08 210);
}

.legal {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: var(--faint);
  max-width: var(--measure);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 0 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--faint);
}
.site-footer a { color: var(--muted); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:active { transform: none; }
}
