:root {
  --story-line: rgba(160, 235, 245, 0.18);
  --story-card: rgba(10, 21, 31, 0.7);
  --story-card-strong: rgba(8, 18, 26, 0.84);
  --story-glow: rgba(78, 230, 255, 0.1);
  --story-article: min(760px, 100%);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(101, 217, 231, 0.92), rgba(78, 230, 255, 1), rgba(230, 251, 255, 1));
  box-shadow: 0 0 18px rgba(78, 230, 255, 0.4);
}

.story-page {
  background:
    radial-gradient(circle at 20% 0%, rgba(92, 197, 214, 0.12), transparent 26%),
    radial-gradient(circle at 85% 22%, rgba(70, 124, 165, 0.18), transparent 28%),
    linear-gradient(180deg, #050b11 0%, #071017 42%, #08131a 100%);
}

.story-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(114, 222, 235, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
}

.story-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: clip;
  isolation: isolate;
}

.story-hero-media,
.story-hero-overlay {
  position: absolute;
  inset: 0;
}

.story-hero-media {
  background:
    linear-gradient(120deg, rgba(3, 10, 15, 0.18), rgba(3, 10, 15, 0.08)),
    url("./images/blog/how-i-became-first-open-water-dive.jpg") center 42% / cover no-repeat;
  transform: scale(1.03);
}

.story-hero-overlay {
  background:
    radial-gradient(circle at 50% 18%, rgba(100, 232, 247, 0.18), transparent 24%),
    linear-gradient(90deg, rgba(4, 10, 15, 0.86) 0%, rgba(5, 12, 19, 0.6) 40%, rgba(4, 9, 13, 0.56) 65%, rgba(4, 9, 13, 0.82) 100%),
    linear-gradient(180deg, rgba(2, 6, 10, 0.28), rgba(2, 7, 11, 0.76));
}

.story-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
  gap: 36px;
  align-items: end;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 150px 0 92px;
}

.story-hero-copy {
  max-width: 760px;
}

.story-kicker {
  margin-bottom: 18px;
  color: rgba(224, 248, 250, 0.76);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.story-hero h1,
.story-post h2 {
  font-family: "Arial Narrow", "Roboto Condensed", Inter, sans-serif;
  text-transform: uppercase;
  text-wrap: balance;
}

.story-hero h1 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.93;
  letter-spacing: 0.06em;
}

.story-deck {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(230, 240, 242, 0.84);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.72;
}

.story-meta,
.story-tags,
.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.story-meta {
  margin-top: 26px;
}

.story-meta span {
  padding: 10px 14px;
  border: 1px solid rgba(140, 227, 243, 0.14);
  border-radius: 999px;
  background: rgba(11, 22, 31, 0.4);
  color: rgba(232, 242, 244, 0.9);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.story-tags {
  margin-top: 18px;
}

.story-tags span {
  padding: 9px 12px;
  border: 1px solid rgba(146, 233, 246, 0.18);
  border-radius: 999px;
  background: rgba(12, 22, 30, 0.42);
  color: rgba(223, 245, 247, 0.88);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-actions {
  margin-top: 30px;
}

.story-memory-card {
  justify-self: end;
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid var(--story-line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(168, 227, 236, 0.14), rgba(10, 19, 27, 0.62));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.story-memory-card figure,
.story-media {
  margin: 0;
}

.story-memory-card img,
.story-media img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.story-memory-card img {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
}

.story-memory-card figcaption,
.story-media figcaption {
  color: rgba(217, 234, 236, 0.74);
  font-size: 0.92rem;
  line-height: 1.55;
}

.story-memory-card figcaption {
  margin-top: 14px;
}

.story-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 84px 0 110px;
}

.story-toc {
  position: sticky;
  top: 128px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--story-line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(130, 212, 228, 0.08), rgba(9, 18, 26, 0.8));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.story-toc p {
  margin: 0 0 12px;
  color: rgba(236, 248, 249, 0.84);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-toc a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid rgba(178, 235, 242, 0.1);
  color: rgba(216, 232, 235, 0.76);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 220ms ease, transform 220ms ease;
}

.story-toc a:hover,
.story-toc a.active {
  color: #fff;
  transform: translateX(3px);
}

.story-post {
  min-width: 0;
}

.story-post > * {
  width: var(--story-article);
  margin: 0 auto 60px;
}

.story-lede,
.story-section,
.story-closing {
  padding: 34px;
  border: 1px solid var(--story-line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 25, 35, 0.76), rgba(7, 15, 22, 0.84));
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.story-lede {
  background:
    radial-gradient(circle at top right, rgba(100, 228, 245, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(14, 25, 35, 0.78), rgba(7, 15, 22, 0.88));
}

.story-lede p:first-child {
  color: #f2fcfd;
  font-size: clamp(1.34rem, 2.35vw, 1.84rem);
  line-height: 1.36;
}

.story-lede p,
.story-section p,
.story-closing p,
.story-callout p {
  margin: 0 0 18px;
  color: rgba(225, 236, 238, 0.82);
  font-size: 1.05rem;
  line-height: 1.84;
}

.story-post p:last-child,
.story-callout p:last-child {
  margin-bottom: 0;
}

.story-post h2 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1;
  letter-spacing: 0.06em;
}

.story-memory,
.story-media,
.story-callout,
.story-photo-grid {
  margin-top: 28px;
}

.story-media {
  overflow: hidden;
  border: 1px solid rgba(136, 228, 244, 0.2);
  border-radius: 24px;
  background: rgba(8, 17, 24, 0.74);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.story-media img {
  aspect-ratio: 16 / 9;
}

.story-media figcaption {
  padding: 16px 18px 18px;
}

.story-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.story-callout {
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(141, 232, 247, 0.18);
  background: linear-gradient(180deg, rgba(19, 39, 52, 0.56), rgba(8, 18, 25, 0.82));
}

.story-callout strong {
  display: block;
  margin-bottom: 10px;
  color: #edfbfd;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-callout-info {
  box-shadow: inset 0 0 0 1px rgba(100, 227, 245, 0.06);
}

.story-callout-success {
  background: linear-gradient(180deg, rgba(17, 43, 48, 0.56), rgba(8, 18, 25, 0.86));
}

.story-dedication {
  margin-top: 28px;
  color: #f4fcfd;
  font-size: clamp(1.12rem, 1.8vw, 1.34rem);
  line-height: 1.65;
  font-style: italic;
}

.story-actions-bottom {
  margin-top: 28px;
}

.section-anchor {
  scroll-margin-top: 132px;
}

@media (max-width: 1080px) {
  .story-hero-grid,
  .story-shell {
    width: min(100% - 32px, 960px);
  }

  .story-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  .story-memory-card {
    justify-self: start;
    max-width: 380px;
  }

  .story-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .story-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }

  .story-toc p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .story-hero-grid {
    width: min(100% - 24px, 640px);
    padding: 136px 0 72px;
  }

  .story-deck {
    font-size: 1rem;
    line-height: 1.7;
  }

  .story-shell {
    width: min(100% - 24px, 640px);
    padding: 56px 0 90px;
  }

  .story-post > *,
  .story-memory-card {
    width: 100%;
  }

  .story-lede,
  .story-section,
  .story-closing {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .story-photo-grid,
  .story-toc {
    grid-template-columns: 1fr;
  }

  .story-meta span,
  .story-tags span {
    font-size: 0.76rem;
  }

  .story-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .story-actions .button,
  .story-actions .button-ghost {
    width: 100%;
    justify-content: center;
  }
}
