/* ================================================================
   Custom theme for thesis pre-defense slides (reveal.js 5.x white base)
   ================================================================ */

:root {
  --accent:       #0284c7;
  --accent-light: #eff6ff;
  --accent-dark:  #1d4ed8;
  --green:        #10b981;
  --amber:        #f59e0b;
  --red:          #ef4444;
  --text:         #334155;
  --text-dark:    #0f172a;
  --text-muted:   #64748b;
  --bg:           #ffffff;
  --bg-light:     #f8fafc;
  --bg-mid:       #f1f5f9;
  --border:       #e2e8f0;
}

/* ---- Base ---- */
.reveal {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  color: var(--text);
  background: var(--bg);
}

.reveal .slides section {
  text-align: left;
  /* Extra top padding reserves space for the gradient bar */
  padding: 64px 48px 44px;
  box-sizing: border-box;
  /* Use background-image for the top bar — no position tricks needed */
  background-image: linear-gradient(to bottom, #0ea5e9 0px, #3b82f6 8px, transparent 8px);
  background-repeat: no-repeat;
  background-size: 100% 8px;
}

/* ---- Typography ---- */
.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 0 0 0.35em;
  line-height: 1.25;
}

.reveal h1 { font-size: 2em;   font-weight: 700; color: var(--text-dark); }
.reveal h2 { font-size: 1.55em; font-weight: 600; color: var(--text-dark); }
.reveal h3 { font-size: 1.05em; font-weight: 600; color: var(--text-dark); }
.reveal p  { font-size: 0.86em; line-height: 1.65; color: var(--text); margin: 0 0 0.45em; }
.reveal li { font-size: 0.84em; line-height: 1.6;  color: var(--text); }
.reveal strong { color: var(--text-dark); }

/* ---- Slide title with left blue border ---- */
.slide-title {
  border-left: 6px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 0.65em;
  font-size: 1.45em;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

/* ---- Centre-focus layout (title, Q&A, divider slides) ---- */
.reveal .slides section.center-slide {
  text-align: center;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---- Section-divider slides ---- */
.section-divider {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-image: linear-gradient(to bottom, #0ea5e9 0px, #3b82f6 8px, #dbeafe 8px, #ffffff 40%),
                    linear-gradient(150deg, var(--accent-light) 0%, #ffffff 60%);
  background-repeat: no-repeat;
  background-size: 100% 8px, 100% 100%;
}

.section-divider-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  margin: 0;
  padding: 0 48px;
  font-size: 0.5em;
  line-height: 1.55;
  color: var(--text-muted);
  opacity: 0.9;
}

.section-divider-meta em {
  font-style: normal;
  color: var(--text-dark);
  opacity: 0.85;
}

.section-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-tag.green { background: var(--green); }
.section-tag.amber { background: var(--amber); }

/* ---- Layout helpers ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.two-col-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.content-body { margin-top: 4px; }

/* ---- Cards / Tiles ---- */
.tile {
  background: var(--bg-light);
  padding: 22px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tile h3 { margin-bottom: 8px; font-size: 0.95em; }
.tile p  { font-size: 0.82em; margin-bottom: 0.35em; }

/* ---- Highlight boxes ---- */
.highlight-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}

.highlight-box h3 { color: var(--accent-dark); margin-bottom: 5px; font-size: 0.95em; }
.highlight-box p  { font-size: 0.82em; }

.alert-box {
  background: #fef2f2;
  border-left: 4px solid var(--red);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}

.alert-box h3 { color: #b91c1c; margin-bottom: 5px; font-size: 0.95em; }
.alert-box p  { font-size: 0.82em; }

.thesis-box {
  background: #fffbeb;
  border: 2px solid var(--amber);
  padding: 20px 26px;
  border-radius: 8px;
  text-align: center;
}

.thesis-box p { font-size: 0.9em; font-style: italic; line-height: 1.7; color: var(--text-dark); }

/* ---- Code blocks ---- */
.reveal pre {
  box-shadow: none;
  border-radius: 6px;
  background: #1e1e2e;
  margin: 0.5em 0;
  width: 100%;
}

.reveal pre code.hljs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68em;
  line-height: 1.55;
  padding: 14px 18px;
  border-radius: 6px;
}

/* Light code variant (for inline display) */
.code-light {
  background: var(--bg-mid);
  padding: 14px 18px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72em;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 6px 0;
}

/* Inline code */
.reveal code:not(pre code) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78em;
  background: var(--bg-mid);
  padding: 2px 5px;
  border-radius: 3px;
  color: #0369a1;
}

/* ---- Styled bullet lists ---- */
.styled-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.styled-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: 0.84em;
  line-height: 1.6;
}

.styled-list li::before {
  content: '';
}

/* ---- Tables ---- */
.reveal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8em;
}

.reveal table thead tr {
  border-bottom: 2px solid var(--accent);
  color: var(--text-dark);
  font-weight: 600;
}

.reveal table tbody tr { border-bottom: 1px solid var(--border); }
.reveal table tbody tr:last-child { border-bottom: none; }

.reveal table td,
.reveal table th { padding: 9px 14px; text-align: left; }

/* ---- Colour tags ---- */
.tag-green { color: var(--green); font-weight: 600; }
.tag-amber { color: var(--amber); font-weight: 600; }
.tag-blue  { color: var(--accent); font-weight: 600; }
.tag-red   { color: var(--red); font-weight: 600; }

/* ---- Separator ---- */
.rule { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* ---- Utility ---- */
.small { font-size: 0.72em; color: var(--text-muted); }
.mono  { font-family: 'JetBrains Mono', monospace; }
.bold  { font-weight: 600; color: var(--text-dark); }
.mt8   { margin-top: 8px; }
.mt14  { margin-top: 14px; }
.mt20  { margin-top: 20px; }

/* ---- KaTeX sizing within slides ---- */
.katex { font-size: 0.94em; }

/* ---- Reveal.js overrides ---- */
.reveal .progress { color: var(--accent); }
.reveal .slide-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.72em;
  color: var(--text-muted);
  left: 18px !important;
  right: auto !important;
  bottom: 14px !important;
  padding: 5px 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* Prevent reveal.js from uppercasing h2 */
.reveal h2 { text-transform: none !important; }

/* Navigation arrows */
.reveal .controls {
  color: var(--accent);
  right: 18px;
  bottom: 14px;
  opacity: 0.9;
  transform: scale(0.92);
  transform-origin: bottom right;
}

/* ---- Workflow / pipeline diagram helpers ---- */
.pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 12px 0;
}

.pipeline-box {
  background: var(--accent-light);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 12px 18px;
  text-align: center;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--accent-dark);
  flex: 1;
}

.pipeline-arrow {
  font-size: 1.2em;
  color: var(--text-muted);
  padding: 0 6px;
  flex-shrink: 0;
}

.pipeline-box.green-box {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
