/* ==========================================================================
   INTS1301 Week 7 — MQ / DRCF theme for reveal.js
   Palette + fonts extracted from ppt/theme/theme1.xml of
   DRCF Presentation 1.pptx (a:clrScheme "MQ", a:fontScheme "MU PPT 2024").
   Visual proportions cross-checked against the rendered reference PDF.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  /* MQ brand palette (per MQ brand guide; matches a:clrScheme "MQ" in
     ppt/theme/theme1.xml where applicable). Brand-guide names used so
     these can be cross-referenced with marketing collateral.          */
  --mq-black: #000000;
  --mq-white: #ffffff;
  --mq-red: #a6192e;          /* Red           — Pantone 187 CP */
  --mq-deep-red: #76232f;     /* Deep Red      — Pantone 188 CP */
  --mq-bright-red: #d6001c;   /* Bright Red    — Pantone 2035 CP */
  --mq-magenta: #c6007e;      /* Magenta       — Pantone 233 CP */
  --mq-purple: #80225f;       /* Purple        — Pantone 242 CP */
  --mq-charcoal: #373a36;     /* Charcoal      — Pantone 447 CP */
  --mq-sand: #d6d2c4;         /* Sand          — Pantone 7527 CP */
  --mq-grey: #7f7f7f;

  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* -- Base slide canvas ----------------------------------------------------- */

.reveal {
  font-family: var(--font-body);
  color: var(--mq-charcoal);
  font-weight: 400;
  /* Do NOT set font-size here — reveal.js computes it from width/height
     configuration and scales the whole deck off that base. */
}

.reveal .slides {
  text-align: left;
}

.reveal .slides > section,
.reveal .slides > section > section {
  background-color: var(--mq-sand);
  color: var(--mq-charcoal);
  /* Narrow top/bottom padding, slightly more on the left so body text
     clears the flag. No !important so sub-slides can override. */
  padding: 0.6em 0.9em 0.7em 2.2em;
  box-sizing: border-box;
  height: 100%;
}

html.reveal-viewport,
.reveal-viewport,
.reveal {
  background-color: var(--mq-sand);
}

/* -- Typography — sized to match DRCF reference proportions --------------- */

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  font-family: var(--font-heading);
  color: var(--mq-black);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 0.25em 0;
  text-shadow: none;
}

/* Slide title (## in the qmd) — big bold black.
   margin-right reserves the top-right logo footprint so long titles wrap
   cleanly rather than colliding with the MQ shield. */
.reveal h2 {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--mq-black);
  margin: 0 0 0.1em 0;
  padding: 0;
  line-height: 1.05;
}

/* Subtitle (### in the qmd — ALL-CAPS red bar under title).
   The qmd wraps its text in **bold**, so the <strong> inside h3 must
   INHERIT the red rather than pick up the generic strong colour. */
.reveal h3 {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--mq-red);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.4em 0;
  padding: 0 0 0.35em 0;
  border-bottom: 2px solid var(--mq-charcoal);
}

/* Deeper headings (h4+) used occasionally inside slides */
.reveal h4 {
  font-size: 1em;
  font-weight: 600;
  color: var(--mq-charcoal);
  margin: 0.5em 0 0.2em 0;
}

/* Title-slide (Quarto wraps in .quarto-title-block) */
.reveal section.quarto-title-block,
.reveal section.title-slide {
  padding: 1.6em 2em !important;
  text-align: left;
}

.reveal .quarto-title-block h1,
.reveal .quarto-title-block h1.title,
.reveal section.title-slide h1.title {
  font-size: 2.6em;
  font-weight: 700;
  color: var(--mq-black);
  line-height: 1.1;
  margin-bottom: 0.2em;
  text-align: left;
}

.reveal .quarto-title-block .subtitle,
.reveal section.title-slide p.subtitle {
  color: var(--mq-red);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  font-size: 1.1em;
  border-bottom: 2px solid var(--mq-charcoal);
  padding-bottom: 0.35em;
  margin: 0 0 0.6em 0;
  text-align: left;
}

/* Quarto wraps author/affiliation in a centered flex container with 20px
   padding-left; override so author, affiliation, and date share the same
   left edge as the title, subtitle, and date. */
.reveal .quarto-title-block .quarto-title-authors,
.reveal .quarto-title-block .quarto-title-author {
  display: block;
  text-align: left;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.reveal .quarto-title-block .quarto-title-author-name,
.reveal .quarto-title-block .quarto-title-affiliation,
.reveal .quarto-title-block p.date,
.reveal section.title-slide p.author,
.reveal section.title-slide p.date {
  color: var(--mq-charcoal);
  font-size: 0.75em;
  font-weight: 500;
  text-align: left;
  margin: 0.15em 0;
}

.reveal .quarto-title-block .quarto-title-author-name {
  font-size: 0.85em;
  font-weight: 600;
}

/* Body copy — closer to reveal default; DRCF bullets are dense and readable */
.reveal p,
.reveal li {
  font-size: 1em;
  line-height: 1.35;
  color: var(--mq-charcoal);
  margin-bottom: 0.35em;
}

/* -- Lists (DRCF convention: solid disc + open-circle sub-bullets) --------- */

.reveal ul,
.reveal ol {
  margin: 0.2em 0 0.2em 1.1em;
  display: block;
}

.reveal ul { list-style-type: disc; }
.reveal ul ul { list-style-type: circle; font-size: 0.85em; margin-top: 0.1em; }
.reveal ul ul ul { list-style-type: square; }

.reveal li { margin-bottom: 0.25em; }
.reveal li li { margin-bottom: 0.15em; color: var(--mq-charcoal); }

/* Bold inherits colour from its container so h3/h2 stay their brand colour. */
.reveal strong,
.reveal b {
  color: var(--mq-black);
  font-weight: 700;
}
.reveal h1 strong,
.reveal h2 strong,
.reveal h3 strong,
.reveal h4 strong,
.reveal .subtitle strong {
  color: inherit;
  font-weight: inherit;
}

.reveal em,
.reveal i { font-style: italic; }

/* -- Quotes (opening provocations) ---------------------------------------- */

.reveal blockquote {
  background: transparent;
  border-left: 4px solid var(--mq-red);
  margin: 0.45em 0;
  padding: 0.25em 0.9em;
  font-style: italic;
  color: var(--mq-charcoal);
  box-shadow: none;
  font-size: 0.9em;
  line-height: 1.35;
}
.reveal blockquote p { font-size: 1em; margin-bottom: 0.3em; }

/* -- Links ----------------------------------------------------------------- */

.reveal a {
  color: var(--mq-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.reveal a:hover {
  color: var(--mq-magenta);
  text-decoration-color: var(--mq-magenta);
}

/* -- Discussion question (last <p> of a slide that starts with <strong>).
      Uses :has() so we don't need to modify the qmd — paragraphs like
      `**Discussion:** ...` get the red-italic closer treatment.          -- */

.reveal section.slide > p:last-of-type:has(> strong:first-child) {
  margin-top: 0.9em;
  padding-top: 0.45em;
  border-top: 1px solid rgba(55, 58, 54, 0.45);
  font-style: italic;
  color: var(--mq-deep-red);
  font-size: 1em;
}

.reveal .discussion-question {
  margin-top: 0.9em;
  padding: 0.45em 0 0 0;
  border-top: 1px solid rgba(55, 58, 54, 0.45);
  font-style: italic;
  color: var(--mq-deep-red);
  font-size: 1em;
}

/* -- Code / monospace ----------------------------------------------------- */

.reveal code,
.reveal pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: rgba(55, 58, 54, 0.06);
  color: var(--mq-charcoal);
  border-radius: 3px;
}
.reveal code { padding: 0.1em 0.35em; }
.reveal pre {
  padding: 0.5em 0.8em;
  border-left: 3px solid var(--mq-red);
}
.reveal pre code { background: transparent; padding: 0; }

/* -- MQ logo (top-right of content slides) --------------------------------
   Sized in em so it scales with reveal's internal base. ~9em wide is
   roughly 360px at reveal's 40-px base — 2x the previous size. */

.reveal .slides > section::after {
  content: "";
  position: absolute;
  top: -2em;
  right: -2em;
  width: 9em;
  height: 3.4em;
  background-image: url("assets/mq-logo.png");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: contain;
  pointer-events: none;
  z-index: 10;
}

/* Title slide & opt-out hook */
.reveal .slides > section.quarto-title-block::after,
.reveal .slides > section.title-slide::after,
.reveal .slides > section.no-logo::after,
.reveal .slides > section > section.no-logo::after {
  display: none;
}

/* -- Red flag accent (top-left, bleeds off the top edge) ------------------
   Cropped verbatim from the rendered DRCF master (Parallelogram 5 shape in
   ppt/slideMasters/slideMaster1.xml, solid fill #d6001c / accent4).       -- */

.reveal .slides > section::before {
  content: "";
  position: absolute;
  top: -2em;
  left: -2em;         /* bleed from the very left edge of the slide */
  width: 2.8em;
  height: 8.6em;
  background-image: url("assets/flag.png");
  background-repeat: no-repeat;
  background-position: top left;
  background-size: contain;
  z-index: 10;
  pointer-events: none;
}

.reveal .slides > section.quarto-title-block::before,
.reveal .slides > section.title-slide::before,
.reveal .slides > section.no-flag::before,
.reveal .slides > section > section.no-flag::before {
  display: none;
}

/* -- Slide number (bottom-right) ----------------------------------------- */

.reveal .slide-number {
  font-size: 0.7em;
  font-family: var(--font-body);
  color: var(--mq-charcoal);
  background: transparent;
  right: 30px;
  bottom: 18px;
}

/* -- Footer hook ---------------------------------------------------------- */

.reveal .footer {
  color: var(--mq-grey);
  font-size: 0.5em;
  font-family: var(--font-body);
  padding: 0 30px;
}

/* -- Fragments ------------------------------------------------------------ */

/* Keep reveal's default fade-in. */
.reveal .fragment.highlight-current-blue.current-fragment,
.reveal .fragment.highlight-red.current-fragment {
  color: var(--mq-red);
}

/* -- Images --------------------------------------------------------------- */

.reveal img {
  max-width: 90%;
  max-height: 70vh;
  border: none;
  box-shadow: none;
  background: transparent;
}

.reveal figure { margin: 0.4em 0; }
.reveal figcaption {
  font-size: 0.6em;
  color: var(--mq-grey);
  font-style: italic;
  text-align: center;
  margin-top: 0.3em;
}

/* -- Tables --------------------------------------------------------------- */

.reveal table {
  font-size: 0.8em;
  border-collapse: collapse;
  margin: 0.4em 0;
}
.reveal table th {
  background: var(--mq-charcoal);
  color: var(--mq-white);
  padding: 0.4em 0.8em;
  text-align: left;
  font-weight: 600;
}
.reveal table td {
  padding: 0.35em 0.8em;
  border-bottom: 1px solid rgba(55, 58, 54, 0.2);
}
.reveal table tr:nth-child(even) td {
  background: rgba(166, 25, 46, 0.04);
}

/* -- Callouts ------------------------------------------------------------ */

.reveal .callout,
.reveal .highlight-box {
  background: rgba(166, 25, 46, 0.08);
  border-left: 4px solid var(--mq-red);
  padding: 0.6em 0.9em;
  margin: 0.4em 0;
  font-size: 0.9em;
}

/* -- Print / PDF-export stylesheet --------------------------------------- */

@media print {
  .reveal .slides > section {
    background-color: var(--mq-sand) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
