/* ==========================================================================
   Story page – Můj profesní příběh
   ========================================================================== */

.story {
  max-width: 820px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
}

.story__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.story__header .eyebrow {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.3rem;
}

.story__header h1 {
  font: 600 clamp(2rem, 3.5vw, 2.8rem)/1.12 "IBM Plex Serif", serif;
  color: var(--text);
  margin: 0;
}

/* --- Journey rail (Three.js canvas) --- */

.story__body {
  position: relative;
}

.journey-rail {
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 220px;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.journey-rail__canvas {
  position: sticky;
  top: 0;
  display: block;
}

.journey-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 42;
}

.has-journey .story-chapter {
  padding-left: 140px;
}

.has-journey .story-chapter::before {
  display: none;
}

.has-journey .story-chapter__marker::before {
  display: none;
}

.has-journey .story-chapter__marker {
  padding-left: 0;
}

/* --- Chapters --- */

.story-chapter {
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 2.8rem;
}

.story-chapter:last-child {
  margin-bottom: 0;
}

/* Timeline line */
.story-chapter::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: -2.8rem;
  width: 2px;
  background: var(--line);
}

.story-chapter:last-child::before {
  bottom: 0;
}

/* Year marker */
.story-chapter__marker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.story-chapter__marker::before {
  content: "";
  position: absolute;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Chapter heading */
.story-chapter h2 {
  font: 600 clamp(1.25rem, 2.2vw, 1.5rem)/1.25 "IBM Plex Serif", serif;
  color: var(--text);
  margin: 0 0 0.8rem;
}

/* Narrative paragraphs */
.story-chapter p {
  font-size: 1.04rem;
  line-height: 1.74;
  margin: 0 0 1rem;
  max-width: 700px;
  color: var(--text);
}

.story-chapter p:last-child {
  margin-bottom: 0;
}

/* --- Pull quotes --- */

.story-pullquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(184, 91, 52, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font: 500 1.08rem/1.62 "IBM Plex Serif", serif;
  color: var(--accent-dark);
  max-width: 700px;
}

/* --- Closing section --- */

.story__closing {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.story__closing p {
  font-size: 1.06rem;
  line-height: 1.74;
  margin: 0 0 1rem;
  max-width: 700px;
  color: var(--text);
}

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

.story__signature {
  margin-top: 1.5rem;
  font: 600 1.2rem/1.3 "IBM Plex Serif", serif;
  color: var(--accent-dark);
}

/* --- Responsive --- */

@media (max-width: 1180px) {
  .story {
    max-width: none;
  }
}

@media (max-width: 920px) {
  .story-chapter {
    padding-left: 2rem;
  }
}

@media (max-width: 640px) {
  .story {
    padding: 1.5rem;
    border-radius: var(--radius-sm);
  }

  .story-chapter {
    padding-left: 0;
  }

  .story-chapter::before {
    display: none;
  }

  .story-chapter__marker::before {
    position: static;
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
  }
}
