/* Projector + Director — jonathanellis.work design system */
/* Black with green tinge · #00E640 accent · Inter display + JetBrains Mono eyebrows */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0d0a;
  --bg-soft: #0e120e;
  --bg-card: #0c100c;
  --ink: #e8f0e8;
  --ink-90: rgba(232, 240, 232, 0.9);
  --ink-50: rgba(232, 240, 232, 0.5);
  --ink-40: rgba(232, 240, 232, 0.4);
  --ink-25: rgba(232, 240, 232, 0.25);
  --ink-15: rgba(232, 240, 232, 0.15);
  --ink-08: rgba(232, 240, 232, 0.08);
  --line: #1a241a;
  --line-strong: #243524;
  --green: #00e640;
  --green-dim: #00b333;
  --green-tint: rgba(0, 230, 64, 0.04);
  --green-tint-2: rgba(0, 230, 64, 0.1);
  --ink-on-green: #050705;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SF Mono, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button {
  font: inherit;
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
button:hover { border-color: var(--line-strong); background: var(--ink-08); }
button:disabled { opacity: 0.3; cursor: not-allowed; }

button.primary {
  background: var(--green);
  color: var(--ink-on-green);
  border-color: var(--green);
  font-weight: 700;
}
button.primary:hover { background: var(--green-dim); border-color: var(--green-dim); }

.kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--ink-08);
  border: 1px solid var(--line);
  color: var(--ink-50);
  letter-spacing: 0;
}

/* ============================================================
   AUDIENCE / PROJECTOR (root URL)
   ============================================================ */
.stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 8vh 8vw;
}

.slide {
  width: 100%;
  max-width: 1280px;
  animation: fadeIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-25);
  margin-bottom: 36px;
}

.slide h1 {
  font-family: var(--sans);
  font-size: clamp(48px, 7vw, 112px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 36px;
}

.slide .body {
  font-size: clamp(20px, 2vw, 28px);
  color: var(--ink-50);
  line-height: 1.45;
  font-weight: 400;
  max-width: 980px;
  margin: 0 0 28px;
}
.slide .body strong { color: var(--ink); font-weight: 600; }
.slide .body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--ink-08);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 4px;
  color: var(--ink);
}

.slide .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.slide .links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--green-tint);
  border: 1px solid var(--line-strong);
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.15s, border-color 0.15s;
}
.slide .links a:hover {
  background: var(--green-tint-2);
  border-color: var(--green);
  text-decoration: none;
}
.slide .links a::after { content: '↗'; opacity: 0.7; font-size: 12px; }

/* Cover slide — even bigger display type, centered */
.slide.cover {
  text-align: center;
}
.slide.cover .eyebrow {
  font-size: 12px;
  margin-bottom: 48px;
}
.slide.cover h1 {
  font-size: clamp(72px, 11vw, 192px);
  letter-spacing: -0.045em;
}
.slide.cover .body {
  font-size: clamp(20px, 2.2vw, 30px);
  margin: 0 auto 28px;
}
.slide.cover .links { justify-content: center; }

/* Idle / connecting */
.idle {
  text-align: center;
  color: var(--ink-50);
  font-size: 18px;
  font-weight: 400;
}
.idle .logo {
  font-family: var(--sans);
  font-size: 88px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
}
.idle .logo b { color: var(--green); font-weight: 800; }
.idle .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-25);
  margin-top: 20px;
}

/* Audience overlays */
.statusbar {
  position: fixed;
  bottom: 20px;
  right: 24px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-25);
  display: flex;
  align-items: center;
  gap: 10px;
}
.statusbar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-15);
  transition: background 0.2s, box-shadow 0.2s;
}
.statusbar .dot.live {
  background: var(--green);
  box-shadow: 0 0 12px rgba(0, 230, 64, 0.5);
}

.unit-tag {
  position: fixed;
  top: 20px;
  left: 24px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-25);
}
.unit-tag b { color: var(--ink-50); font-weight: 500; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   DIRECTOR
   ============================================================ */
.director {
  display: grid;
  height: 100vh;
  overflow: hidden;
  grid-template-columns: 320px 1fr 400px;
  grid-template-rows: 56px 1fr 72px;
  grid-template-areas:
    "topbar topbar topbar"
    "units  preview notes"
    "units  controls notes";
  background: var(--bg);
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.topbar .brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.topbar .brand b { color: var(--green); font-weight: 800; }
.topbar .brand .tag {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-25);
}
.topbar .status {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-25);
}
.topbar .status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-15);
}
.topbar .status .dot.live {
  background: var(--green);
  box-shadow: 0 0 10px rgba(0, 230, 64, 0.5);
}

/* Units sidebar */
.units {
  grid-area: units;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
}
.units::-webkit-scrollbar { width: 8px; }
.units::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.units .u {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: baseline;
  transition: background 0.12s;
  position: relative;
}
.units .u:hover { background: var(--ink-08); }
.units .u.active {
  background: var(--green-tint);
}
.units .u.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
}
.units .u .num {
  font-family: var(--mono);
  color: var(--ink-25);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  min-width: 22px;
}
.units .u.active .num { color: var(--green); }
.units .u .title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.units .u .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-25);
  letter-spacing: 0.1em;
}

/* Preview panel */
.preview {
  grid-area: preview;
  padding: 32px;
  overflow-y: auto;
  background: var(--bg);
}
.preview .mini-stage {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 40px 36px;
  min-height: 380px;
  background: var(--bg-card);
  display: grid;
  place-items: center;
}
.preview .eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-25);
  margin-bottom: 18px;
}
.preview h1 {
  font-family: var(--sans);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 18px;
  color: var(--ink);
}
.preview .body {
  font-size: 17px;
  color: var(--ink-50);
  line-height: 1.5;
  max-width: 760px;
  margin: 0 auto 16px;
}
.preview .body strong { color: var(--ink); font-weight: 600; }
.preview .body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--ink-08);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 3px;
  color: var(--ink);
}
.preview .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.preview .links a {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 3px;
  background: var(--green-tint);
  border: 1px solid var(--line-strong);
  color: var(--green);
  font-weight: 500;
}

/* Controls strip */
.controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.controls .spacer { flex: 1; }
.controls .slide-counter {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-40);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.controls .slide-counter b {
  color: var(--green);
  font-weight: 500;
  font-size: 13px;
  margin-right: 2px;
}

/* Notes panel */
.notes {
  grid-area: notes;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notes h3 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-25);
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.notes .body {
  padding: 18px 22px;
  flex: 1;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-90);
  font-weight: 400;
}
.notes .body::-webkit-scrollbar { width: 8px; }
.notes .body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.notes .body p { margin-bottom: 12px; }
.notes .body em {
  color: var(--green);
  font-style: normal;
  font-weight: 500;
}
.notes .body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--ink-08);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

.notes .link-list {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}
.notes .link-list h4 {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-25);
  margin-bottom: 4px;
}
.notes .link-list button.cp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 9px 11px;
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.notes .link-list button.cp:hover {
  background: var(--ink-08);
  border-color: var(--line-strong);
}
.notes .link-list button.cp .lbl {
  color: var(--ink);
  font-weight: 500;
  font-size: 12px;
}
.notes .link-list button.cp .url {
  color: var(--ink-25);
  font-family: var(--mono);
  font-size: 10px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}
.notes .link-list button.cp.copied {
  background: var(--green-tint-2);
  border-color: var(--green);
}
.notes .link-list button.cp.copied .lbl { color: var(--green); }

.help {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-25);
  padding: 10px 22px 16px;
  border-top: 1px solid var(--line);
}
.help .kbd { margin: 0 1px; text-transform: none; letter-spacing: 0; }
