/* Project Notes — matches the G&M launcher dashboard system (Blackout-style). */

:root {
  /* Backgrounds */
  --bg-base: #0d0d0d;
  --bg-surface: #1a1a1a;
  --bg-elevated: #222222;
  --bg-border: #333333;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --text-disabled: #4d4d4d;

  /* Status / accents */
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --link: #b3b3b3;
  --link-hover: #ffffff;

  /* Interactive */
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-bg-hover: rgba(255, 255, 255, 0.1);
  --btn-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  /* Radius */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Layout */
  --sidebar-width: 260px;
  --content-max: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Sidebar ─── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--bg-border);
  padding: 20px 0 80px;
  overflow-y: auto;
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}
#sidebar.open { transform: translateX(0); }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brand i { font-size: 13px; }

.sidebar-footer {
  position: sticky;
  bottom: 0;
  margin-top: 32px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
}
.sidebar-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.sidebar-back-link:hover { color: var(--text-primary); }
.sidebar-back-link i { font-size: 10px; }

.section-header {
  margin-bottom: 16px;
}

.nav-list { list-style: none; padding: 0 8px; margin: 0; }
.nav-list .nav-list { padding: 0 0 0 12px; }

.nav-folder > details > summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-disabled);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 8px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.nav-folder > details > summary:hover { color: var(--text-secondary); }
.nav-folder > details > summary::-webkit-details-marker { display: none; }
.nav-folder > details > summary::before {
  content: "▸";
  display: inline-block;
  font-size: 9px;
  color: var(--text-disabled);
  transition: transform 0.15s ease;
}
.nav-folder > details[open] > summary::before { transform: rotate(90deg); }

.nav-folder > details > summary .folder-link {
  color: inherit;
  text-decoration: none;
  flex: 1;
}
.nav-folder > details > summary .folder-link:hover { color: var(--text-primary); }

.nav-file a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  word-break: break-word;
}
.nav-file a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.nav-file a.current {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-left-color: var(--text-primary);
}

/* ─── Toggle (mobile) ─── */
#nav-toggle {
  position: fixed;
  top: 14px; left: 14px;
  width: 40px; height: 40px;
  font-size: 18px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  z-index: 60;
  font-family: var(--font-body);
}

/* ─── Main content ─── */
main {
  padding: 64px 24px 80px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.breadcrumb {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-disabled);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Article typography ─── */
article {
  color: var(--text-secondary);
}
article h1, article h2, article h3, article h4, article h5, article h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 600;
}
article h1 { font-size: 32px; margin: 0 0 20px; }
article h2 {
  font-size: 22px;
  margin: 40px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-border);
}
article h3 { font-size: 17px; margin: 28px 0 10px; }
article h4 { font-size: 14px; margin: 20px 0 6px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
article h5, article h6 { font-size: 13px; margin: 16px 0 6px; color: var(--text-muted); }

article p { margin: 12px 0; }

article a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--bg-border);
  transition: border-color 0.15s ease;
}
article a:hover { border-bottom-color: var(--text-primary); }

article ul, article ol { padding-left: 22px; margin: 12px 0; }
article li { margin: 4px 0; }
article li > ul, article li > ol { margin: 4px 0; }

article hr {
  border: none;
  border-top: 1px solid var(--bg-border);
  margin: 32px 0;
}

article blockquote {
  margin: 16px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--text-disabled);
  background: var(--bg-surface);
  color: var(--text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

article strong { color: var(--text-primary); font-weight: 600; }
article em { color: var(--text-secondary); }

/* Inline + block code */
article code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-border);
}
article pre {
  background: var(--bg-surface);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  overflow-x: auto;
  margin: 16px 0;
}
article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--text-primary);
}

/* Tables */
article table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
article th, article td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bg-border);
}
article th {
  font-family: var(--font-display);
  color: var(--text-disabled);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
}
article tr:last-child td { border-bottom: none; }

/* Task list checkboxes */
article input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--text-primary);
}

/* Images */
article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
}

/* ─── Desktop ─── */
@media (min-width: 900px) {
  #nav-toggle { display: none; }
  #sidebar { transform: translateX(0); }
  main {
    padding: 48px 48px 80px calc(var(--sidebar-width) + 48px);
    max-width: calc(var(--content-max) + var(--sidebar-width) + 96px);
  }
}

/* Long URLs / strings shouldn't break the layout on phones */
article * { word-wrap: break-word; overflow-wrap: break-word; }
