/* ───────────────────────────────────────────────
   Reset & Base
   ─────────────────────────────────────────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px;
  line-height: 1.5;
  color: #1e293b;
  background: #0f172a;
}

/* ───────────────────────────────────────────────
   Presentation container
   ─────────────────────────────────────────────── */

#presentation {
  position: relative;
  width: 100%;
  height: 100%;
}

#slides-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ───────────────────────────────────────────────
   Slide
   ─────────────────────────────────────────────── */

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 50px 70px;
  background: #eef2f7;
  overflow-y: auto;
}

.slide.active {
  display: flex;
}

/* ───────────────────────────────────────────────
   Slide counter
   ─────────────────────────────────────────────── */

#slide-counter {
  position: fixed;
  bottom: 16px;
  right: 24px;
  font-size: 20px;
  color: #fff;
  font-weight: 600;
  z-index: 100;
  pointer-events: none;
  background: rgba(30, 64, 175, 0.7);
  padding: 4px 12px;
  border-radius: 12px;
}

/* ───────────────────────────────────────────────
   Live clock
   ─────────────────────────────────────────────── */

#live-clock {
  position: fixed;
  top: 14px;
  right: 24px;
  z-index: 100;
  pointer-events: none;
  font-family: "Courier New", "Consolas", "SF Mono", monospace;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  transition: opacity 0.3s ease;
}

#live-clock.hidden {
  opacity: 0;
}

/* ───────────────────────────────────────────────
   Typography
   ─────────────────────────────────────────────── */

.slide-title {
  position: sticky;
  top: -50px;
  z-index: 10;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: -50px -70px 0;
  padding: 50px 70px 14px;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
}

/* Orbiting logo — fixed on page */
#header-orbit {
  position: fixed;
  bottom: 16px;
  left: 24px;
  width: 50px;
  height: 50px;
  z-index: 50;
  transition: opacity 0.3s ease;
}

#header-orbit.hidden {
  opacity: 0;
  pointer-events: none;
}

.header-orbit-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #1e40af;
}

.header-orbit-ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(30, 64, 175, 0.25);
  border-radius: 50%;
}

.header-orbit-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: orbitSpin 4s linear infinite;
}

.header-orbit-dot::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #1e40af;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(30, 64, 175, 0.5), 0 0 16px rgba(30, 64, 175, 0.25);
}

@keyframes orbitSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.slide-content {
  background: #ffffff;
  border-radius: 8px;
  padding: 28px 32px;
  margin-top: 24px;
  flex: 1;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e3a5f;
  margin-top: 18px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 10px;
}

.intro {
  font-size: 1.05rem;
  color: #334155;
  margin-bottom: 16px;
}

/* ───────────────────────────────────────────────
   Lists
   ─────────────────────────────────────────────── */

ul, ol {
  margin-left: 24px;
  margin-bottom: 14px;
}

li {
  margin-bottom: 6px;
}

/* ───────────────────────────────────────────────
   Tables
   ─────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

thead {
  background: #1e40af;
  color: #fff;
}

th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 9px 14px;
  border-bottom: 1px solid #e2e8f0;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #eff6ff;
}

/* ───────────────────────────────────────────────
   Code
   ─────────────────────────────────────────────── */

.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "Fira Code", "Consolas", "Monaco", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 16px 0;
}

code {
  font-family: inherit;
}

/* inline code inside text */
p code, li code, td code {
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ───────────────────────────────────────────────
   Images
   ─────────────────────────────────────────────── */

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
  margin: 12px 0;
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.caption {
  text-align: center;
  font-size: 0.95rem;
  color: #475569;
  margin-top: 8px;
}

/* ───────────────────────────────────────────────
   Formulas
   ─────────────────────────────────────────────── */

.formula {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 14px 20px;
  margin: 14px 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.1rem;
  color: #1e3a5f;
  border-radius: 0 6px 6px 0;
}

.formula-big {
  font-size: 1.25rem;
  text-align: center;
  padding: 20px 28px;
}

.formula-block {
  margin-bottom: 18px;
}

/* ───────────────────────────────────────────────
   Blockquotes
   ─────────────────────────────────────────────── */

blockquote {
  background: #fefce8;
  border-left: 4px solid #eab308;
  padding: 14px 20px;
  margin: 14px 0;
  font-style: italic;
  color: #713f12;
  border-radius: 0 6px 6px 0;
}

/* ───────────────────────────────────────────────
   Notes
   ─────────────────────────────────────────────── */

.note {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 10px;
}

/* ───────────────────────────────────────────────
   Decision rule
   ─────────────────────────────────────────────── */

.decision-rule {
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 12px 18px;
  border-radius: 6px;
  margin-top: 14px;
}

/* ───────────────────────────────────────────────
   Two columns
   ─────────────────────────────────────────────── */

.two-columns {
  display: flex;
  gap: 40px;
}

.column {
  flex: 1;
}

/* ───────────────────────────────────────────────
   Image and table side by side
   ─────────────────────────────────────────────── */

.image-and-table {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
}

.image-and-table .image-container {
  flex: 1;
}

.image-and-table .table-side {
  flex: 1;
}

/* ───────────────────────────────────────────────
   Table of contents
   ─────────────────────────────────────────────── */

.toc-list {
  columns: 2;
  column-gap: 40px;
  margin-left: 28px;
}

.toc-list li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  break-inside: avoid;
}

/* ───────────────────────────────────────────────
   Bibliography
   ─────────────────────────────────────────────── */

.bibliography {
  list-style: none;
  margin-left: 0;
}

.bibliography li {
  padding: 10px 16px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ───────────────────────────────────────────────
   Cover layout
   ─────────────────────────────────────────────── */

.slide[data-layout="cover"] {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #1e40af 100%);
  color: #fff;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 50px 80px;
}

/* Top banner */
.cover-top {
  width: 100%;
}

.cover-university {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #93c5fd;
}

.cover-level {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 6px;
}

/* Divider */
.cover-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #60a5fa, transparent);
  border-radius: 2px;
}

/* Hero title */
.cover-hero {
  width: 100%;
  max-width: 850px;
}

.cover-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #ffffff, #bfdbfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cover-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: #93c5fd;
  letter-spacing: 0.5px;
}

/* Bottom info */
.cover-bottom {
  width: 100%;
}

.cover-fields {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 20px;
}

.cover-field {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-field-label {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 4px;
}

.cover-field-value {
  font-size: 0.8rem;
  font-weight: 500;
  color: #e2e8f0;
}

.cover-year {
  font-size: 0.65rem;
  letter-spacing: 1px;
  opacity: 0.4;
}

/* ───────────────────────────────────────────────
   Closing layout
   ─────────────────────────────────────────────── */

.slide[data-layout="closing"] {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #1e40af 100%);
  color: #fff;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 50px 80px;
}

/* Divider */
.closing-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #60a5fa, transparent);
  border-radius: 2px;
}

/* Icon circle */
.closing-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #60a5fa;
  margin: 0 auto 20px;
}

/* Hero */
.closing-hero {
  max-width: 750px;
}

.closing-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #ffffff, #bfdbfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.closing-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: #93c5fd;
  letter-spacing: 0.5px;
}

/* Info card */
.closing-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px 50px;
}

.closing-student {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.closing-info {
  font-size: 0.7rem;
  opacity: 0.5;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
