/* cubeandtree: one black look by choice.
   Bar with the tree-to-neuron cube as animated background, empty field, copyright footer. */
:root {
  --bg: #000000;
  --fg: #ededed;
  --muted: #6f6f6f;
  --line: #1c1c1c;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Bar: the tree-to-neuron cube runs as its animated background */
.bar {
  flex-shrink: 0;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.bar canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.bar .wrap {
  position: relative; z-index: 1;
  height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand, .nav a { text-shadow: 0 0 6px var(--bg), 0 0 12px var(--bg); }
.brand {
  color: var(--fg); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
}
.nav { display: flex; gap: 22px; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
a:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* Invisible button over the bar background: opens the viewer */
.bar-open {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  background: none; border: 0; padding: 0; margin: 0;
  cursor: zoom-in;
}
.bar-open:focus-visible { outline: 1px solid var(--fg); outline-offset: -4px; }
.bar .wrap { pointer-events: none; z-index: 2; }
.bar .wrap a { pointer-events: auto; }

/* Viewer */
.viewer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
}
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.viewer.dragging canvas { cursor: grabbing; }
.viewer button {
  font: inherit; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  padding: 8px 14px; cursor: pointer;
}
.viewer button:hover { color: var(--fg); border-color: var(--muted); }
.viewer button:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.viewer-close {
  position: absolute; z-index: 1;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
}
.viewer-ui {
  position: absolute; z-index: 1; left: 0; right: 0;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.viewer-toggle { display: flex; pointer-events: auto; }
.viewer-toggle button + button { border-left: 0; }
.viewer-toggle button[aria-pressed="true"] { color: var(--fg); border-color: var(--muted); }
.viewer-hint { margin: 0; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.viewer-open, .viewer-open body { overflow: hidden; }

main { flex: 1; }

/* About */
.about { padding-block: 72px; }
.about h1 { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }
.about p { max-width: 58ch; font-size: 15px; line-height: 1.75; margin: 0 0 16px; }
.about .disclaimer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 58ch; }
.about .disclaimer h2 { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); margin: 0 0 12px; }
.about .disclaimer p { font-size: 12px; line-height: 1.75; color: var(--muted); margin: 0 0 12px; }

footer { flex-shrink: 0; border-top: 1px solid var(--line); }
footer .wrap { padding-block: 18px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

