/* ============================================================
   Interactive Design — immersive case-study walk
   Hollow Knight themed. Reuses --glow / --text vars from style.css
   ============================================================ */

/* ---- Opening portal ---- */
.ixd-portal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 24px;
}
.ixd-portal-inner { max-width: 780px; }
.ixd-portal-badge {
  display: inline-block;
  font-family: var(--font-type);
  letter-spacing: .42em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--glow-soft);
  border: 1px solid rgba(143, 222, 211, .32);
  border-radius: 999px;
  padding: 8px 20px 8px 24px;
  margin-bottom: 30px;
}
.ixd-portal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1.04;
  color: var(--text);
  margin: 0 0 20px;
  text-shadow: 0 0 48px rgba(143, 222, 211, .25);
}
.ixd-portal-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.75;
  margin: 0 auto 42px;
  max-width: 580px;
}
.ixd-portal-scroll {
  display: inline-block;
  font-size: 1.7rem;
  color: var(--glow);
  text-decoration: none;
  animation: ixdBob 2.4s ease-in-out infinite;
}
@keyframes ixdBob {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(11px); opacity: 1; }
}

/* ---- Walk container ---- */
.ixd-walk {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 4vh 24px 14vh;
}
.ixd-plate {
  margin: 0 auto 15vh;
  opacity: 0;
  transform: translateY(64px) scale(.965);
  transition: opacity 1.05s ease, transform 1.05s cubic-bezier(.16, .84, .44, 1);
  will-change: opacity, transform;
}
.ixd-plate.in-view { opacity: 1; transform: none; }

.ixd-frame {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #070a0f;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .62),
    0 0 0 1px rgba(143, 222, 211, .18),
    0 0 64px rgba(143, 222, 211, .10);
  cursor: zoom-in;
}
.ixd-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(143, 222, 211, .22);
  pointer-events: none;
}
.ixd-frame img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.04);
  transition: transform .7s ease;
  will-change: transform;
}
.ixd-plate.in-view .ixd-frame img { transform: scale(1); }

.ixd-caption {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 24px;
  padding-left: 4px;
}
.ixd-caption-index {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--glow);
  line-height: 1;
  text-shadow: 0 0 18px rgba(143, 222, 211, .4);
}
.ixd-caption-text {
  margin: 0;
  color: var(--text-dim);
  font-size: .92rem;
  letter-spacing: .05em;
}
.ixd-caption-text .zh { color: var(--text); }
.ixd-caption-text .sep { color: var(--text-faint); margin: 0 8px; }

/* ---- Cursor soul-glow ---- */
.ixd-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(143, 222, 211, .12), transparent 62%);
  opacity: 0;
  transition: opacity .45s ease;
  transform: translate3d(-9999px, -9999px, 0);
}
body.ixd-cursor-on .ixd-cursor { opacity: 1; }

/* ---- Constellation rail ---- */
.ixd-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}
.ixd-rail-line {
  position: absolute;
  left: 10px; top: 6px; bottom: 6px;
  width: 1px;
  background: rgba(143, 222, 211, .16);
}
.ixd-rail-nodes {
  position: relative;
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.ixd-rail-nodes li {
  width: 21px; height: 21px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(143, 222, 211, .32);
  background: rgba(8, 11, 16, .82);
  cursor: pointer;
  font-family: var(--font-type);
  font-size: 9px;
  color: var(--text-faint);
  transition: all .3s ease;
}
.ixd-rail-nodes li:hover { color: var(--glow-soft); }
.ixd-rail-nodes li.active {
  border-color: var(--glow);
  color: var(--glow);
  box-shadow: 0 0 14px rgba(143, 222, 211, .55);
  background: rgba(143, 222, 211, .14);
}
@media (max-width: 760px) { .ixd-rail { display: none; } }

/* ---- Lightbox ---- */
.ixd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 9, .95);
  padding: 4vh 4vw;
  backdrop-filter: blur(7px);
}
.ixd-lightbox.open { display: flex; }
.ixd-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 70px rgba(0, 0, 0, .75);
}
.ixd-lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  font-size: 1.5rem;
  color: var(--glow);
  background: none;
  border: 1px solid rgba(143, 222, 211, .4);
  border-radius: 50%;
  width: 48px; height: 48px;
  cursor: pointer;
  line-height: 1;
}
.ixd-lightbox-hint {
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  text-align: center;
  color: var(--text-faint);
  font-size: .8rem;
  letter-spacing: .04em;
}

/* ---- Closing ---- */
.ixd-end {
  text-align: center;
  padding: 12vh 24px 16vh;
}
.ixd-end p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 0 26px;
}
.ixd-end a {
  color: var(--glow);
  font-family: var(--font-type);
  letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 222, 211, .4);
  padding-bottom: 2px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ixd-plate { opacity: 1 !important; transform: none !important; transition: none; }
  .ixd-portal-scroll { animation: none; }
  .ixd-frame img { transform: none !important; }
}
