/* =========================
   GLOBAL RESET / BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Iosevka Charon Mono", monospace;
    font-style: normal;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    scroll-behavior: auto;
}

:root {
    --bg-color: #121212;
    --text-primary: #E0E0E0;
    --text-secondary: #B0B0B0;
    --panel-bg: #121212;
    --nav-text: #B0B0B0;
    --dim-brightness: 0.5;
    --dim-opacity: 0.4;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

body.light-mode {
    --bg-color: #f5f5f5;
    --text-primary: #111111;
    --text-secondary: #444444;
    --panel-bg: #ffffff;
    --nav-text: #333333;
}

/* =========================
   TYPOGRAPHY
========================= */
.primary {
    color: var(--text-primary);
}

.secondary {
    color: var(--text-secondary);
}

.chapter-label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8e8e8e;
    margin-bottom: 1.25rem;
}

.story-copy {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    max-width: 760px;
}

/* =========================
   NAVIGATION
========================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.25rem 0;
    pointer-events: none;
}

#contains-nav-bar,
#contains-logo,
#contains-links,
.links-list {
    display: flex;
}

#contains-nav-bar {
    width: min(90%, 1400px);
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

#contains-logo {
    align-items: center;
    gap: 0.75rem;
}

#contains-logo h1 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

#contains-links {
    align-items: center;
}

.links-list {
    align-items: center;
    gap: 0.5rem;
}

.link-item {
    padding: 0;
    list-style-type: none;
}

.nav-link-text {
    text-decoration: none;
    color: var(--nav-text);
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    transition: opacity 0.2s ease;
}

#contains-logo {
    color: var(--text-primary);
}

#contains-logo svg path {
    fill: currentColor !important;
}

.nav-link-text:hover {
    opacity: 0.7;
}

.mobile-nav-toggle {
    display: none;
    border: none;
    background: transparent;
    width: 44px;
    height: 38px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--nav-text);
}

.mobile-nav-toggle .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.28s ease, opacity 0.28s ease;
    margin: 0 0 7px;
}

.mobile-nav-toggle .hamburger-line:last-child {
    margin-bottom: 0;
}

.mobile-nav-toggle.open .hamburger-line:first-child {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.open .hamburger-line:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-panel {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: min(88vw, 340px);
    max-height: calc(100vh - 2.5rem);
    padding: 1.5rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 26px 60px rgba(10, 10, 10, 0.15);
    backdrop-filter: blur(20px);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.mobile-nav-panel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-links-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-links-list .link-item {
    margin: 0;
}

.mobile-links-list .nav-link-text {
    display: block;
    padding: 0.85rem 0.75rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--nav-text);
    transition: background 0.25s ease, transform 0.25s ease;
}

.mobile-links-list .nav-link-text:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 999;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-nav-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    #contains-links {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }
}

@media (max-width: 640px) {
    .site-nav {
        padding: 1rem 0;
    }

    .mobile-nav-panel {
        top: 0.95rem;
        right: 0.95rem;
        width: min(92vw, 300px);
        max-height: calc(100vh - 1.9rem);
    }
}

/* =========================
   SCROLL HINT
========================= */
#scroll-hint-cont {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    position: absolute; /* changed from fixed */
    bottom: 2rem;
    left: 0;
    z-index: 5;
    padding: 0;
    pointer-events: none;
}

#scroll-hint {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    border: none;
    padding: 0.8rem 1.25rem;
    transition: all 0.25s ease;
    pointer-events: auto;
}

#scroll-hint > h3 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #121212;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#scroll-hint:hover {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

#scroll-hint:hover > h3 {
    color: #E0E0E0;
}

/* =========================
   HERO / STORY INTRO
========================= */
header {
    position: relative;
    min-height: 220vh; /* scroll distance for story animation */
    width: 100%;
}

/* optional helper if you still want slight spacing */
.push-down-slight {
    padding-top: 0;
}

/* =========================
   STORY PANELS / NEXT SECTIONS
========================= */
.story-panel {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10rem 6vw;
    z-index: 10;
    background: var(--panel-bg);
}

.story-panel__inner {
    width: min(100%, 900px);
}

.story-panel h2 {
    font-size: clamp(2.2rem, 5vw, 5rem);
    line-height: 1.08;
    margin-bottom: 1.5rem;
}

.story-panel--overlap {
    margin-top: -25vh;
    padding-top: 28vh;
    background:
        linear-gradient(
            to bottom,
            rgba(18, 18, 18, 0) 0%,
            rgba(18, 18, 18, 0.35) 12%,
            rgba(18, 18, 18, 0.75) 22%,
            rgba(18, 18, 18, 1) 34%
        );
}

/* =========================
   OPTIONAL STORY IMAGE SECTION
========================= */
.story-image-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 6vw;
    background: #121212;
}

.story-image-section__content {
    width: min(100%, 1400px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.story-image-section__text h2 {
    font-size: clamp(2rem, 4.5vw, 4.5rem);
    line-height: 1.08;
    margin-bottom: 1.25rem;
}

.story-image-section__visual {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    background: #1a1a1a;
}

.story-image-section__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================
   SPACING HELPERS
========================= */
.section-shell {
    width: min(90%, 1400px);
    margin: 0 auto;
}

/* ========================= STORY PROGRESSION ========================= */

.story-panel {
  transition: filter 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}

/* inactive panels */
.story-panel.is-dim {
  filter: blur(6px) brightness(var(--dim-brightness));
  opacity: var(--dim-opacity);
  transform: scale(0.98);
}

/* active panel */
.story-panel.is-active {
  filter: blur(0px) brightness(1);
  opacity: 1;
  transform: scale(1);
}

/* ========================= LEFT PROGRESS ========================= */

.story-progress {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.story-progress__track {
  width: 2px;
  height: 220px;
  background: rgba(255,255,255,0.15);
  position: relative;
}

.story-progress__fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: #E0E0E0;
}

.story-progress__dots {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-progress__dots li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.story-progress__dots li.active {
  background: #fff;
  transform: scale(1.6);
}

/* ========================= FOOTER ========================= */

.site-footer {
  padding: 6rem 0;
  text-align: center;
  background: var(--panel-bg);
}

.site-footer .small {
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
    .story-image-section__content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    #contains-links {
        display: none;
    }

    header {
        min-height: 190vh;
    }

    .whitish-box {
        width: 55vw;
        height: 38vw;
        min-width: 220px;
        min-height: 150px;
        border-radius: 22px;
    }

    .story-panel {
        padding: 8rem 1.5rem;
    }

    .story-panel--overlap {
        margin-top: -15vh;
        padding-top: 20vh;
    }

    .story-image-section {
        padding: 6rem 1.5rem;
    }

    .story-text h1 {
        font-size: clamp(2.2rem, 11vw, 4.5rem);
    }
}

