:root {
  --slide-bg: #ffffff;
  --slide-text: #1a1a1a;
  --accent-color: #2c5aa0;
  --secondary-color: #5c8cd6;
  --gray-font: #575757;
  --slide-height: 700px;
  --slide-width: 1200px;
}

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

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  border-width: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Skip link for keyboard navigation */
.skip-link {
  background: var(--accent-color);
  border-radius: 0 0 4px 0;
  color: white;
  font-weight: bold;
  left: 0;
  padding: 8px 16px;
  position: absolute;
  text-decoration: none;
  top: -40px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

body {
  background: #f0f0f0;
  color: var(--slide-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* ===== SLIDE VIEW ===== */
.slide-view {
  height: 100vh;
  overflow: hidden;
}

.slide-view #slide-container {
  align-items: center;
  display: flex;
  height: calc(100vh - 60px);
  justify-content: center;
  position: relative;
}

.slide-view .slide {
  background: var(--slide-bg);
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: calc(100vh - 100px);
  min-height: min(85vh, var(--slide-height));
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
  width: min(90vw, var(--slide-width));
}

.slide-view .slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.slide-view .slide-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  padding: 60px;
}

.slide-view .slide-footer {
  align-items: center;
  border-top: 1px solid #e0e0e0;
  color: #666;
  display: flex;
  font-size: 0.9rem;
  justify-content: space-between;
  padding: 20px 60px;
}

.slide-view .print-link {
  align-items: center;
  border-radius: 4px;
  color: #666;
  display: flex;
  font-size: 0.85rem;
  gap: 6px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.slide-view .print-link:hover {
  background: #f5f5f5;
  color: var(--accent-color);
}

.slide-view .print-link:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.slide-view .print-icon {
  display: inline-block;
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.slide-nav {
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 30px;
  bottom: 20px;
  color: white;
  display: flex;
  font-size: 1rem;
  gap: 15px;
  left: 50%;
  padding: 12px 24px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 100;
}

.slide-nav button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px 12px;
  transition: background 0.2s;
}

.slide-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.slide-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.slide-nav button:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ===== PRINT VIEW ===== */
.print-view #print-container {
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
}

.print-view-nav {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.slide-view-link {
  align-items: center;
  border: 1px solid var(--accent-color);
  border-radius: 6px;
  color: var(--accent-color);
  display: inline-flex;
  font-size: 1rem;
  gap: 8px;
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.slide-view-link:hover {
  background: var(--accent-color);
  color: white;
}

.slide-view-link:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.slides-icon {
  display: inline-block;
  flex-shrink: 0;
  height: 18px;
  width: 18px;
}

/* ===== TWO COLUMN LAYOUT ===== */
.row {
  display: flex;
  gap: 3rem;
  margin-top: 1rem;
}

.col {
  flex: 1;
}

/* ===== PRINT VIEW ===== */
.print-view .slide-page {
  background: var(--slide-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  min-height: var(--slide-height);
  page-break-after: always;
  page-break-inside: avoid;
}

.print-view .slide-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 550px;
  padding: 60px;
}

.print-view .slide-footer {
  border-top: 1px solid #e0e0e0;
  color: #666;
  font-size: 0.9rem;
  padding: 20px 60px;
}

/* ===== PRINT MEDIA ===== */
@media print {
  .print-view {
    background: white;
  }

  /* Hide navigation when printing */
  .print-view-nav {
    display: none !important;
  }

  .print-view #print-container {
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .print-view .slide-page {
    box-shadow: none;
    height: 100vh;
    margin: 0;
    min-height: 100vh;
  }

  /* underline serves no purpose when printed */
  abbr {
    text-decoration: none !important;
  }

  /* Force timeline icons to print */
  .timeline-item::before {
    background-image: url('../img/calendar-icon.svg') !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ===== SLIDE CONTENT STYLES ===== */
h1 {
  color: var(--accent-color);
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

h2 {
  color: var(--secondary-color);
  font-size: 2.4rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h3 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

p {
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
}

ul,
ol {
  margin-bottom: 1.2rem;
  margin-left: 2rem;
}

li {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

abbr {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

strong {
  color: var(--accent-color);
  font-weight: 600;
}

em {
  font-style: italic;
}

img {
  max-height: var(--slide-height);
  max-width: 100%;
}

blockquote {
  border-left: 4px solid var(--accent-color);
  color: var(--gray-font);
  font-style: italic;
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

figcaption {
  color: var(--gray-font);
}

.center {
  text-align: center;
}

.large-text,
.large-text li {
  font-size: 1.5rem;
}

.subtitle {
  color: var(--gray-font);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  margin-top: -0.8rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.social-links a {
  align-items: center;
  border-radius: 6px;
  color: var(--accent-color);
  display: flex;
  font-size: 1.1rem;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.social-links a:hover {
  background: var(--accent-color);
  color: white;
}

.social-links a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.social-icon {
  flex-shrink: 0;
  height: 24px;
  width: 24px;
}

/* indent for references */
.csl-entry {
  margin-bottom: 0.5rem;
  margin-left: 5rem;
  text-indent: -5rem;
}

/* Footnotes - smaller, fainter text at bottom of slide */
.footnote {
  color: var(--gray-font);
  font-size: 0.85rem;
  /* lighter grays have insufficient contrast w/ white bg */
  line-height: 1.4;
  margin-bottom: 0;
  margin-top: auto;
  padding-top: 2rem;
}

/* ===== TIMELINE STYLES ===== */
.timeline {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-left: 3rem;
  position: relative;
}

/* Calendar icon via CSS */
.timeline-item::before {
  background-image: url('../img/calendar-icon.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color-adjust: exact;
  content: '';
  flex-shrink: 0;
  height: 32px;
  left: 0;
  position: absolute;
  print-color-adjust: exact;
  top: 0.2rem;
  width: 32px;
}

.timeline-item p {
  margin-bottom: 0.5rem;
}

.timeline-date {
  color: var(--accent-color);
  font-weight: 600;
}

/* ===== CODE BLOCK STYLES ===== */
/* Preserve syntax highlighting colors when printing to PDF */
code,
pre,
.token {
  color-adjust: exact;
  print-color-adjust: exact;
}
