/* =========================================== */
/* CONTENT PROGRESSION SYSTEM 2026 */
/* Award-winning visual flow indicators */
/* =========================================== */

:root {
  --section-indicator-size: 3rem;
  --section-connector-width: 2px;
  --section-connector-color: rgba(99, 102, 241, 0.3);
  --section-indicator-active: #6366f1;
  --section-indicator-inactive: rgba(99, 102, 241, 0.2);
  --reading-progress-height: 4px;
}

/* =========================================== */
/* SECTION INDICATORS */
/* =========================================== */

.main-content-section {
  position: relative;
  counter-reset: section-counter;
}

.main-content-section .section {
  position: relative;
  counter-increment: section-counter;
  padding-left: calc(var(--section-indicator-size) + 2rem);
}

.main-content-section .section::before {
  content: counter(section-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--section-indicator-size);
  font-weight: 700;
  line-height: 1;
  color: var(--section-indicator-inactive);
  transition: color 0.3s ease, transform 0.3s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.05em;
  z-index: 1;
}

.main-content-section .section.scroll-reveal.revealed::before,
.main-content-section .section.scroll-fade.revealed::before {
  color: var(--section-indicator-active);
  transform: scale(1.05);
}

/* Section connector lines */
.main-content-section .section::after {
  content: '';
  position: absolute;
  left: calc(var(--section-indicator-size) / 2 - var(--section-connector-width) / 2);
  top: var(--section-indicator-size);
  bottom: calc(-1 * var(--spacing-lg));
  width: var(--section-connector-width);
  background: linear-gradient(
    to bottom,
    var(--section-connector-color) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.main-content-section .section.scroll-reveal.revealed::after,
.main-content-section .section.scroll-fade.revealed::after {
  opacity: 1;
}

/* Hide connector on last section */
.main-content-section .section:last-child::after {
  display: none;
}

/* =========================================== */
/* READING PROGRESS INDICATOR */
/* =========================================== */

.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--reading-progress-height);
  background: rgba(0, 0, 0, 0.05);
  z-index: 999998;
  pointer-events: none;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* =========================================== */
/* SECTION NAVIGATION */
/* =========================================== */

.section-navigation {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.section-navigation.visible {
  opacity: 1;
  visibility: visible;
}

.section-nav-item {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--section-indicator-inactive);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.section-nav-item:hover {
  transform: scale(1.3);
  background: var(--section-indicator-active);
}

.section-nav-item.active {
  background: var(--section-indicator-active);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.section-nav-item::after {
  content: attr(data-section-title);
  position: absolute;
  right: calc(100% + 1rem);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.section-nav-item:hover::after {
  opacity: 1;
  visibility: visible;
}

/* =========================================== */
/* CONTENT FLOW INDICATORS */
/* =========================================== */

.content-flow-indicator {
  position: absolute;
  left: calc(var(--section-indicator-size) + 1rem);
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--section-indicator-active) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.section.scroll-reveal.revealed .content-flow-indicator,
.section.scroll-fade.revealed .content-flow-indicator {
  opacity: 0.3;
}

/* =========================================== */
/* RESPONSIVE ADJUSTMENTS */
/* =========================================== */

@media (max-width: 768px) {
  .main-content-section .section {
    padding-left: calc(var(--section-indicator-size) * 0.7 + 1rem);
  }
  
  .main-content-section .section::before {
    font-size: calc(var(--section-indicator-size) * 0.7);
  }
  
  .section-navigation {
    right: 1rem;
    gap: 0.5rem;
  }
  
  .section-nav-item {
    width: 10px;
    height: 10px;
  }
  
  .section-nav-item::after {
    display: none; /* Hide tooltips on mobile */
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-content-section .section::before,
  .main-content-section .section::after,
  .section-nav-item,
  .reading-progress-bar {
    transition: none;
  }
}

/* =========================================== */
/* ACCESSIBILITY */
/* =========================================== */

.section-navigation[aria-hidden="true"] {
  display: none;
}

.section-nav-item:focus-visible {
  outline: 2px solid var(--section-indicator-active);
  outline-offset: 2px;
}

