/* =========================
   0) Quarto-safe width controls
   ========================= */
:root{
  /* Typography */
  --body-font: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", "Source Han Sans SC",
               "Segoe UI", Arial, sans-serif;
  --mono-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Layout (safe: no grid override) */
  --quarto-body-width: 1600px;   /* try 1400–2000 */
  --quarto-margin-width: 0px;    /* shrink right margin column */
}

/* =========================
   1) Global look
   ========================= */
body{
  font-family: var(--body-font);
  line-height: 1.85;
  letter-spacing: 0.1px;

  /* Black outer margins */
  background-color: #000;
}

/* Paragraph rhythm */
p{ margin: 0.85rem 0; }

/* Better wrapping for mixed CN/EN/math */
main, article{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Code blocks */
code, pre{
  font-family: var(--mono-font);
  font-size: 0.95em;
}

/* Chapter title spacing */
h1{
  margin-top: 0.3rem;
  margin-bottom: 1.2rem;
}

/* =========================
   2) Main content width + white paper
   ========================= */
/* Remove theme clamps that keep it narrow */
main.content, .content{
  max-width: var(--quarto-body-width) !important;
}

/* White “paper” */
main.content{
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem;
}

/* =========================
   3) Left book sidebar (TOC): black bg, white text
   ========================= */
#quarto-sidebar{
  background-color: #000 !important;
  color: #fff !important;
  border-right: 1px solid #222;
}

#quarto-sidebar *{
  color: #fff !important;
}

#quarto-sidebar a:hover{
  color: #bbb !important;
}

#quarto-sidebar .active{
  background-color: #111 !important;
}

/* Hide the index (home) item in sidebar */
#quarto-sidebar .sidebar-item:has(a[href$="index.html"]),
#quarto-sidebar .sidebar-item:has(a[href$="/index.html"]),
#quarto-sidebar .sidebar-item:has(a[href="./index.html"]){
  display: none !important;
}

/* =========================
   4) Home hero: image as-is (no cropping) + text overlay
   ========================= */
.hero{
  width: 100%;
  min-height: 75vh;
  position: relative;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 3rem;

  /* No crop */

  border-radius: 18px;
  overflow: hidden;
}

.hero-text{
  max-width: 900px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.hero-text h1{
  margin: 0 0 0.75rem 0;
  font-size: 3rem;
  line-height: 1.15;
}

/* Hide Quarto's title block on the cover page only */
body.coverpage .quarto-title-block,
body.coverpage header#title-block-header{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Optional: remove extra top spacing on cover page */
body.coverpage main.content{
  padding-top: 0 !important;
}

/* Hide the default tools block in the sidebar header */
#quarto-sidebar .quarto-navigation-tool{
  display: none !important;
}

