/**
 * LiU (Linköping University) Theme for Reveal.js
 * Based on official LiU visual identity
 */

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

:root {
  /* LiU Primary Colors */
  --liu-blue: #00b3e7;
  --liu-blue-80: #33c2ec;
  --liu-blue-60: #66d1f1;
  --liu-blue-40: #99e1f5;
  --liu-blue-20: #ccf0fa;

  /* LiU Secondary Colors */
  --liu-turquoise: #0cc7d3;
  --liu-green: #00cfb6;
  --liu-orange: #ff6442;
  --liu-purple: #8781d3;

  /* Neutral Colors */
  --liu-black: #1a1a1a;
  --liu-grey-dark: #4a5568;
  --liu-grey: #687f91;
  --liu-grey-light: #e2e8f0;
  --liu-white: #ffffff;

  /* Slide Colors */
  --slide-bg: #ffffff;
  --slide-bg-alt: #f7fafc;
  --slide-bg-dark: #1a1a2e;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #f7fafc;

  /* Spacing */
  --slide-padding: 60px;
  --content-max-width: 1400px;
}

/*********************************************
 * GLOBAL STYLES
 *********************************************/

.reveal-viewport {
  background: var(--slide-bg);
}

.reveal {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 42px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.5;
}

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

.reveal .slides section {
  padding: var(--slide-padding);
  box-sizing: border-box;
}

/*********************************************
 * HEADERS
 *********************************************/

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  margin: 0 0 0.5em 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: none;
  word-wrap: break-word;
}

.reveal h1 {
  font-size: 2.8em;
  color: var(--liu-blue);
}

.reveal h2 {
  font-size: 2.2em;
  color: var(--liu-blue);
}

.reveal h3 {
  font-size: 1.6em;
  color: var(--liu-turquoise);
}

.reveal h4 {
  font-size: 1.1em;
  color: var(--liu-grey-dark);
}

/*********************************************
 * SLIDE TYPES
 *********************************************/

/* Title Slide */
.reveal .slides section.title-slide {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.reveal .slides section.title-slide h1 {
  font-size: 3.2em;
  margin-bottom: 0.3em;
}

.reveal .slides section.title-slide .subtitle {
  font-size: 1.5em;
  color: var(--liu-turquoise);
  margin-bottom: 1.5em;
}

.reveal .slides section.title-slide .author {
  font-size: 1.4em;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.3em;
}

.reveal .slides section.title-slide .affiliation {
  font-size: 1.1em;
  color: var(--text-secondary);
}

.reveal .slides section.title-slide .meta {
  font-size: 1.0em;
  color: var(--liu-grey);
  margin-top: 2em;
}

/* Section Divider Slide */
.reveal .slides section.section-slide {
  background: linear-gradient(135deg, var(--liu-blue) 0%, var(--liu-turquoise) 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.reveal .slides section.section-slide h2 {
  color: var(--liu-white);
  font-size: 3.0em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.reveal .slides section.section-slide .section-number {
  font-size: 4em;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  position: absolute;
  top: 40px;
  right: 60px;
}

/* Dark Background Slide */
.reveal .slides section.dark-slide {
  background: var(--slide-bg-dark);
  color: var(--text-light);
}

.reveal .slides section.dark-slide h2,
.reveal .slides section.dark-slide h3 {
  color: var(--liu-blue-60);
}

/*********************************************
 * LiU HEADER BAR
 *********************************************/

.liu-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--liu-blue) 0%, var(--liu-turquoise) 50%, var(--liu-green) 100%);
  z-index: 100;
}

.liu-logo {
  position: absolute;
  bottom: 30px;
  right: 40px;
  height: 40px;
  opacity: 0.7;
}

/*********************************************
 * PARAGRAPHS & TEXT
 *********************************************/

.reveal p {
  margin: 0 0 1em 0;
  line-height: 1.6;
}

.reveal .lead {
  font-size: 1.2em;
  color: var(--text-secondary);
  font-weight: 300;
}

.reveal strong {
  font-weight: 600;
  color: var(--liu-blue);
}

.reveal em {
  font-style: italic;
}

.reveal .highlight {
  color: var(--liu-turquoise);
  font-weight: 500;
}

.reveal .small {
  font-size: 0.85em;
  color: var(--text-secondary);
}

/*********************************************
 * LISTS
 *********************************************/

.reveal ul,
.reveal ol {
  margin: 0 0 1em 1.5em;
  padding: 0;
}

.reveal ul {
  list-style-type: none;
}

.reveal ul li {
  position: relative;
  margin-bottom: 0.6em;
  padding-left: 0.6em;
  line-height: 1.4;
}

.reveal ul li::before {
  content: "";
  position: absolute;
  left: -1.2em;
  top: 0.5em;
  width: 12px;
  height: 12px;
  background: var(--liu-turquoise);
  border-radius: 50%;
}

.reveal ol li {
  margin-bottom: 0.5em;
}

.reveal ul ul,
.reveal ol ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.reveal ul ul li::before {
  background: var(--liu-blue-60);
  width: 6px;
  height: 6px;
}

/*********************************************
 * LINKS
 *********************************************/

.reveal a {
  color: var(--liu-blue);
  text-decoration: none;
  border-bottom: 1px solid var(--liu-blue-40);
  transition: all 0.2s ease;
}

.reveal a:hover {
  color: var(--liu-turquoise);
  border-bottom-color: var(--liu-turquoise);
}

/*********************************************
 * IMAGES & FIGURES
 *********************************************/

.reveal img,
.reveal video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.reveal figure {
  margin: 1em 0;
}

.reveal figcaption {
  font-size: 0.8em;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5em;
}

.reveal .image-grid {
  display: grid;
  gap: 1em;
}

.reveal .image-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.reveal .image-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.reveal .image-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/*********************************************
 * TABLES
 *********************************************/

.reveal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.85em;
}

.reveal table th {
  background: var(--liu-blue);
  color: var(--liu-white);
  font-weight: 600;
  padding: 0.8em 1em;
  text-align: left;
}

.reveal table td {
  padding: 0.7em 1em;
  border-bottom: 1px solid var(--liu-grey-light);
}

.reveal table tr:nth-child(even) {
  background: var(--slide-bg-alt);
}

.reveal table tr:hover {
  background: var(--liu-blue-20);
}

/*********************************************
 * CODE
 *********************************************/

.reveal code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--slide-bg-alt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--liu-orange);
}

.reveal pre {
  width: 100%;
  font-size: 0.7em;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.reveal pre code {
  display: block;
  padding: 1em;
  overflow-x: auto;
  max-height: 500px;
  background: #282c34;
  color: #abb2bf;
}

/*********************************************
 * BLOCKQUOTES
 *********************************************/

.reveal blockquote {
  margin: 1em 0;
  padding: 1em 1.5em;
  background: var(--liu-blue-20);
  border-left: 4px solid var(--liu-blue);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.reveal blockquote p:last-child {
  margin-bottom: 0;
}

/*********************************************
 * FRAGMENTS
 *********************************************/

.reveal .fragment {
  transition: all 0.3s ease;
}

.reveal .fragment.visible {
  opacity: 1;
}

.reveal .fragment.fade-up {
  transform: translateY(20px);
}

.reveal .fragment.fade-up.visible {
  transform: translateY(0);
}

/*********************************************
 * PROGRESS BAR
 *********************************************/

.reveal .progress {
  height: 4px;
  background: var(--liu-grey-light);
}

.reveal .progress span {
  background: linear-gradient(90deg, var(--liu-blue) 0%, var(--liu-turquoise) 100%);
  transition: width 0.4s ease;
}

/*********************************************
 * SLIDE NUMBER
 *********************************************/

.reveal .slide-number {
  background: transparent;
  color: var(--liu-grey);
  font-size: 14px;
  font-weight: 500;
  bottom: 20px;
  right: 20px;
}

/*********************************************
 * CONTROLS
 *********************************************/

.reveal .controls {
  color: var(--liu-blue);
}

.reveal .controls button {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.reveal .controls button:hover {
  opacity: 1;
}

/*********************************************
 * SPEAKER NOTES
 *********************************************/

.reveal .speaker-notes {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.reveal .speaker-notes h1,
.reveal .speaker-notes h2 {
  color: var(--liu-blue);
}

/*********************************************
 * UTILITY CLASSES
 *********************************************/

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 2em; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 2em; }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 0.5em; }
.gap-2 { gap: 1em; }
.gap-3 { gap: 2em; }

.w-full { width: 100%; }
.w-half { width: 50%; }
.w-third { width: 33.333%; }

/*********************************************
 * ANIMATIONS
 *********************************************/

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease infinite;
}

/*********************************************
 * RESPONSIVE
 *********************************************/

@media screen and (max-width: 1024px) {
  .reveal {
    font-size: 28px;
  }

  .reveal h1 {
    font-size: 2em;
  }

  .reveal h2 {
    font-size: 1.5em;
  }
}
