/* dorcs presentation - PowerPoint-style slide deck */

.presentation {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
}

.presentation-deck {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

/* Slide - full bleed, symmetric centering */
.presentation-slide {
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5rem 4rem;
  box-sizing: border-box;
  position: relative;
  background: var(--bg);
}

/* Header bar - branded bar with accent */
.presentation-slide .slide-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 6%, transparent);
  z-index: 5;
  border-bottom: 3px solid var(--link);
}

/* Footer bar */
.presentation-slide .slide-footer {
  position: absolute;
  bottom: 3.5rem;
  left: 0;
  right: 0;
  padding: 0.65rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 6%, transparent);
  z-index: 5;
  border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

/* Content area - comfortable reading width, centered */
.presentation-slide .slide-content {
  width: 100%;
  max-width: 920px;
  text-align: center;
  line-height: 1.5;
}

.presentation-slide .slide-content :first-child {
  margin-top: 0;
}

.presentation-slide .slide-content :last-child {
  margin-bottom: 0;
}

.presentation-slide .slide-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
  border-bottom: 2px solid var(--link);
  padding-bottom: 0.4rem;
  display: inline-block;
}

.presentation-slide .slide-content h2 {
  font-size: 1.85rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.presentation-slide .slide-content h3 {
  font-size: 1.3rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}

.presentation-slide .slide-content ul,
.presentation-slide .slide-content ol {
  text-align: left;
  display: inline-block;
  margin: 1.5rem 0;
  padding-left: 1.75rem;
}

.presentation-slide .slide-content ul li::marker {
  color: var(--link);
}

.presentation-slide .slide-content li {
  margin: 0.5rem 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.presentation-slide .slide-content p {
  margin: 0.85rem 0;
  font-size: 1.15rem;
  line-height: 1.6;
}

.presentation-slide .slide-content code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--code-bg);
}

.presentation-slide .slide-content pre {
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
}

/* Layout: big - large centered text for stats, quotes, single statements (no heading required) */
.presentation-slide.big .slide-content,
.presentation-slide[data-layout="big"] .slide-content {
  max-width: 800px;
  text-align: center;
}
.presentation-slide.big .slide-content p,
.presentation-slide[data-layout="big"] .slide-content p {
  font-size: 1.85rem;
  line-height: 1.5;
  margin: 1rem 0;
}
.presentation-slide.big .slide-content p:first-of-type,
.presentation-slide[data-layout="big"] .slide-content p:first-of-type {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.presentation-slide.big .slide-content p:last-of-type:not(:first-of-type),
.presentation-slide[data-layout="big"] .slide-content p:last-of-type:not(:first-of-type) {
  font-size: 1.25rem;
  opacity: 0.9;
}
.presentation-slide.big .slide-content h1,
.presentation-slide[data-layout="big"] .slide-content h1 {
  font-size: 4rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1rem;
}
.presentation-slide.big .slide-content h2,
.presentation-slide[data-layout="big"] .slide-content h2 {
  font-size: 2.5rem;
}

/* Layout: quote - large centered quote with smaller attribution */
.presentation-slide.quote .slide-content,
.presentation-slide[data-layout="quote"] .slide-content {
  max-width: 780px;
  text-align: center;
}
.presentation-slide.quote .slide-content p,
.presentation-slide[data-layout="quote"] .slide-content p {
  font-size: 1.75rem;
  line-height: 1.5;
  font-style: italic;
}
.presentation-slide.quote .slide-content p:last-of-type:not(:first-of-type),
.presentation-slide[data-layout="quote"] .slide-content p:last-of-type:not(:first-of-type) {
  font-size: 1.1rem;
  font-style: normal;
  opacity: 0.9;
  margin-top: 1.5rem;
}

/* Layout: lead - title slide, PowerPoint-style */
.presentation-slide.lead .slide-content h1 {
  font-size: 3.25rem;
  margin-bottom: 0.75rem;
  border-bottom: none;
  padding-bottom: 0;
}

.presentation-slide.lead .slide-content p {
  font-size: 1.35rem;
  margin-top: 0.75rem;
  opacity: 0.95;
}

/* Layout: left - left-aligned content */
.presentation-slide.left {
  align-items: flex-start;
}

.presentation-slide.left .slide-content {
  text-align: left;
  max-width: 88%;
  margin-left: 0;
}

.presentation-slide.left .slide-content ul,
.presentation-slide.left .slide-content ol {
  display: block;
}

/* Layout: right - right-aligned content */
.presentation-slide.right {
  align-items: flex-end;
}

.presentation-slide.right .slide-content {
  text-align: right;
  max-width: 88%;
  margin-right: 0;
}

.presentation-slide.right .slide-content ul,
.presentation-slide.right .slide-content ol {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

/* Layout primitives: gap (spacing) */
.presentation-slide[data-gap="tight"] .slide-content {
  --slide-gap: 1rem;
}
.presentation-slide[data-gap="loose"] .slide-content {
  --slide-gap: 3.5rem;
}
.presentation-slide .slide-content {
  --slide-gap: 2rem;
}

/* Layout primitives: align (content alignment) */
.presentation-slide[data-align="start"] {
  align-items: flex-start;
}
.presentation-slide[data-align="start"] .slide-content {
  margin-left: 0;
  text-align: left;
}
.presentation-slide[data-align="end"] {
  align-items: flex-end;
}
.presentation-slide[data-align="end"] .slide-content {
  margin-right: 0;
  text-align: right;
}

/* Layout: columns-2, columns-3 - auto column splitting via CSS columns */
.presentation-slide.columns-2,
.presentation-slide[data-layout="columns-2"] {
  display: grid;
  place-content: center;
  padding: 5rem 4rem;
}
.presentation-slide.columns-2 .slide-content,
.presentation-slide[data-layout="columns-2"] .slide-content {
  columns: 2;
  column-gap: var(--slide-gap, 2rem);
  max-width: 1000px;
  width: 100%;
  text-align: left;
}
.presentation-slide.columns-3,
.presentation-slide[data-layout="columns-3"] {
  display: grid;
  place-content: center;
  padding: 5rem 4rem;
}
.presentation-slide.columns-3 .slide-content,
.presentation-slide[data-layout="columns-3"] .slide-content {
  columns: 3;
  column-gap: var(--slide-gap, 2rem);
  max-width: 1100px;
  width: 100%;
  text-align: left;
}

/* Layout: split - title/visual left (1fr), content right (2fr). Requires <div class="col"> for each panel. */
.presentation-slide.split,
.presentation-slide[data-layout="split"] {
  display: grid;
  place-content: center;
  padding: 5rem 4rem;
}
.presentation-slide.split .slide-content,
.presentation-slide[data-layout="split"] .slide-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--slide-gap, 2rem);
  max-width: 1000px;
  width: min(95%, 1000px);
  text-align: left;
  align-items: start;
}
.presentation-slide.split .slide-content > * {
  grid-column: 1 / -1;
}
.presentation-slide.split .slide-content > .col {
  grid-column: span 1;
  padding: 1rem 1.25rem;
  min-width: 0;
}
.presentation-slide.split .slide-content > .col:first-of-type {
  padding-right: 1.5rem;
}

/* Layout: timeline - horizontal axis (structure for ::: timeline block) */
.presentation-slide.timeline .slide-content,
.presentation-slide[data-layout="timeline"] .slide-content {
  max-width: 100%;
  width: 95%;
  text-align: left;
}

/* Timeline block - horizontal layout with date markers */
.slide-content .timeline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--slide-gap, 2rem);
  width: 100%;
  margin: 1.5rem 0;
  padding: 0 0.5rem;
}

.slide-content .timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.slide-content .timeline-marker {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--link);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-bottom: 1rem;
  border: 3px solid color-mix(in srgb, var(--link) 80%, transparent);
}

.slide-content .timeline-content {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.slide-content .timeline-content h1,
.slide-content .timeline-content h2,
.slide-content .timeline-content h3,
.slide-content .timeline-content h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.slide-content .timeline-content p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

/* Timeline connector line (visual axis) */
.slide-content .timeline {
  position: relative;
}

.slide-content .timeline::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: linear-gradient(to right, var(--link), color-mix(in srgb, var(--link) 50%, transparent));
  z-index: 0;
}

.slide-content .timeline-step {
  position: relative;
  z-index: 1;
}

/* Typography blocks - composable text styling */
.slide-content .text-block {
  text-align: center;
  margin: 0.75rem 0;
}
.slide-content .text-block-hero {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.slide-content .text-block-hero p {
  margin: 0;
}
.slide-content .text-block-caption {
  font-size: 1.1rem;
  opacity: 0.9;
}
.slide-content .text-block-caption p {
  margin: 0.25rem 0;
}
.slide-content .text-block-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.slide-content .text-block-label p {
  margin: 0;
}
.slide-content .text-block-stat {
  text-align: center;
  margin: 1rem 0;
}
.slide-content .text-block-stat-value {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.slide-content .text-block-stat-caption {
  font-size: 1.25rem;
  margin-top: 0.5rem;
  opacity: 0.95;
}
.slide-content .text-block-stat-caption p {
  margin: 0.25rem 0;
}

/* _columns directive - alternative to layout columns-N */
.presentation-slide[data-columns="2"]:not([data-layout="split"]):not(.split) .slide-content {
  column-count: 2;
  column-gap: var(--slide-gap, 2rem);
  text-align: left;
}
.presentation-slide[data-columns="3"]:not([data-layout="split"]):not(.split) .slide-content {
  column-count: 3;
  column-gap: var(--slide-gap, 2rem);
  text-align: left;
}
.presentation-slide[data-columns="4"]:not([data-layout="split"]):not(.split) .slide-content {
  column-count: 4;
  column-gap: var(--slide-gap, 2rem);
  text-align: left;
}

/* Layout: two-columns - side-by-side columns, properly centered */
.presentation-slide.two-columns {
  display: grid;
  place-content: center;
  padding: 5rem 4rem;
}

.presentation-slide.two-columns .slide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  width: min(95%, 1000px);
  text-align: left;
  align-items: center;
  justify-items: stretch;
}

.presentation-slide.two-columns .slide-content > * {
  grid-column: 1 / -1;
}

.presentation-slide.two-columns .slide-content > .col {
  grid-column: span 1;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--muted) 8%, transparent);
  border-radius: 8px;
  border-left: 4px solid var(--link);
}

.presentation-slide.two-columns .slide-content > .col:last-of-type {
  border-left-color: color-mix(in srgb, var(--link) 70%, transparent);
}

/* Layout: fit - compact, fits more content */
.presentation-slide.fit .slide-content h1 {
  font-size: 2rem;
}

.presentation-slide.fit .slide-content h2 {
  font-size: 1.5rem;
}

.presentation-slide.fit .slide-content p,
.presentation-slide.fit .slide-content li {
  font-size: 1rem;
}

/* Layout: invert - dark bg, light text (for contrast slides) */
.presentation-slide.invert {
  background: var(--fg) !important;
  color: var(--bg) !important;
}

.presentation-slide.invert .slide-header,
.presentation-slide.invert .slide-footer {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 15%, transparent);
  border-color: color-mix(in srgb, var(--bg) 35%, transparent);
}

.presentation-slide.invert .slide-header {
  border-bottom-color: color-mix(in srgb, var(--bg) 50%, transparent);
}

.presentation-slide.invert .slide-content code {
  background: color-mix(in srgb, var(--bg) 20%, transparent);
}

.presentation-slide.invert.two-columns .slide-content > .col {
  background: color-mix(in srgb, var(--bg) 18%, transparent);
  border-left-color: color-mix(in srgb, var(--bg) 45%, transparent);
}

.presentation-slide.invert .presentation-progress,
.presentation-slide.invert .presentation-nav-hint {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

/* Custom background: ensure text contrast when backgroundColor/image is set */
.presentation-slide.has-custom-bg .slide-header,
.presentation-slide.has-custom-bg .slide-footer {
  color: inherit;
  opacity: 0.9;
  border-color: color-mix(in srgb, currentColor 30%, transparent);
}

/* Background image: add subtle text shadow for readability */
.presentation-slide.has-bg-image .slide-content {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.presentation-slide.has-bg-image .slide-content h1,
.presentation-slide.has-bg-image .slide-content h2,
.presentation-slide.has-bg-image .slide-content h3 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.presentation-progress {
  position: fixed;
  bottom: 1rem;
  right: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.85;
  z-index: 10;
  pointer-events: none;
}

.presentation-nav-hint {
  position: fixed;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.65;
  z-index: 9;
  pointer-events: none;
}

/* Fullscreen mode - hide browser chrome for true presentation */
body.presentation-fullscreen .presentation-nav-hint {
  opacity: 0.4;
}

body.presentation-fullscreen .presentation-progress {
  opacity: 0.7;
}
