.console-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 100%, rgba(120, 128, 249, 0.12), transparent 34%),
    linear-gradient(rgba(120, 128, 249, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 178, 0.038) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.ambient {
  position: absolute;
  inset: -5%;
  z-index: -4;
  background-image: url("../assets/scene-01.png");
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  filter: blur(12px) saturate(1.32) contrast(1.08) brightness(0.72);
  transform: scale(1.05);
  transition: background-image 520ms var(--ease), transform 300ms var(--ease);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 42% 44%, transparent 0 22%, rgba(2, 3, 6, 0.42) 46%, #020306 78%),
    linear-gradient(90deg, rgba(2, 3, 6, 0.92), rgba(2, 3, 6, 0.18) 36%, rgba(2, 3, 6, 0.72));
}

.frame {
  position: absolute;
  pointer-events: none;
  border: 1px solid var(--line);
}

.frame-outer {
  inset: 24px;
  z-index: 24;
}

.frame-inner {
  inset: 78px 52px 82px;
  z-index: 4;
  border-color: rgba(210, 218, 255, 0.08);
}

.frame-inner::before,
.frame-inner::after {
  content: "";
  position: absolute;
  height: 1px;
  width: 18%;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}

.frame-inner::before {
  top: -1px;
  left: 28%;
}

.frame-inner::after {
  bottom: -1px;
  right: 28%;
}

.topbar {
  position: relative;
  z-index: 34;
  height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(210, 218, 255, 0.08);
  padding: 0 28px;
}

.brand,
.menu-button {
  display: inline-flex;
  align-items: center;
}

.brand {
  justify-self: start;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-mark {
  font-size: 18px;
}

.brand-pixel {
  width: 8px;
  height: 8px;
  background: var(--pink);
  box-shadow: 18px 0 0 rgba(120, 128, 249, 0.72);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 52px;
}

.topnav button {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 27px 0;
}

.topnav button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  transform: translateX(-50%);
  transition: width 320ms var(--ease);
}

.topnav button.is-active {
  color: var(--ink);
}

.topnav button.is-active::after {
  width: 36px;
}

.menu-button {
  justify-self: end;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.menu-button i {
  width: 20px;
  height: 20px;
  background:
    radial-gradient(circle, rgba(241, 243, 251, 0.78) 1.2px, transparent 1.6px) 0 0 / 7px 7px;
}

.left-index {
  position: absolute;
  left: 58px;
  top: 32%;
  z-index: 28;
  display: grid;
  gap: 24px;
}

.index-line {
  position: absolute;
  left: -18px;
  top: -28px;
  bottom: 122px;
  width: 1px;
  background: rgba(210, 218, 255, 0.16);
}

.index-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--active, 0) * 48px + 12px);
  width: 2px;
  height: 38px;
  background: linear-gradient(var(--violet), var(--pink));
  box-shadow: 0 0 18px rgba(120, 128, 249, 0.8);
  transition: top 420ms var(--ease);
}

.index-item {
  position: relative;
  width: 42px;
  color: rgba(241, 243, 251, 0.25);
  text-align: left;
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: color 260ms var(--ease), transform 260ms var(--ease);
}

.index-item.is-active {
  color: var(--violet);
  transform: translateX(10px);
}

.coords {
  margin: 86px 0 0;
  display: grid;
  gap: 9px;
  color: rgba(241, 243, 251, 0.38);
  font-size: 11px;
  letter-spacing: 0.11em;
}

.coords em {
  color: var(--violet);
  font-style: normal;
}

.copy-block {
  position: absolute;
  left: clamp(136px, 14vw, 240px);
  top: 25%;
  z-index: 32;
  width: 310px;
  transition: transform 300ms var(--ease);
}

.ghost-number {
  margin: 0 0 -4px;
  color: rgba(241, 243, 251, 0.15);
  font-size: 72px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.04em;
}

.copy-block h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.project-sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.project-desc {
  margin: 34px 0 28px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.background-stage {
  position: absolute;
  inset: 24px;
  z-index: 18;
  overflow: hidden;
  border: 1px solid rgba(210, 218, 255, 0.14);
  background: #020306;
  box-shadow:
    inset 0 0 0 1px rgba(120, 128, 249, 0.08),
    inset 0 0 120px rgba(120, 128, 249, 0.07),
    0 0 54px rgba(0, 0, 0, 0.64);
  perspective: 1600px;
  transform-style: preserve-3d;
  touch-action: pan-y;
}

.background-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  background: #020306;
}

.bg-slide {
  position: absolute;
  inset: -1px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: auto;
  opacity: 0;
  filter: saturate(1.08) contrast(1.08) brightness(0.72) blur(5px);
  transform: translate3d(0, 105%, -120px) rotateX(-10deg) scale(1.012);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  transition:
    opacity 760ms var(--ease),
    filter 860ms var(--ease),
    transform 900ms var(--ease);
  will-change: transform, opacity, filter;
}

.bg-slide.is-active {
  z-index: 5;
  opacity: 1;
  filter: saturate(1.2) contrast(1.14) brightness(1.06) blur(0);
  transform: translate3d(0, 0, 0) scale(1.006);
}

.bg-slide.is-prev {
  z-index: 3;
  opacity: 0;
  filter: saturate(0.94) contrast(1.02) brightness(0.5) blur(5px);
  transform: translate3d(0, -82%, -150px) rotateX(10deg) scale(0.93);
}

.bg-slide.is-next {
  z-index: 3;
  opacity: 0;
  filter: saturate(0.98) contrast(1.02) brightness(0.52) blur(5px);
  transform: translate3d(0, 82%, -150px) rotateX(-10deg) scale(0.93);
}

.bg-slide.is-far {
  z-index: 1;
  opacity: 0;
  transform: translate3d(0, 0, -260px) scale(0.86);
}

.tech-grid {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.32;
  background:
    linear-gradient(90deg, rgba(120, 128, 249, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(210, 218, 255, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(255, 45, 178, 0.1) 46.2% 46.4%, transparent 46.7%);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, #000 0 13%, transparent 30% 70%, #000 87% 100%);
  mask-image: linear-gradient(90deg, #000 0 13%, transparent 30% 70%, #000 87% 100%);
}

.focus-lines {
  position: absolute;
  inset: 34px;
  z-index: 9;
  pointer-events: none;
}

.focus-lines i {
  position: absolute;
  width: 104px;
  height: 104px;
  opacity: 0.72;
  border-color: rgba(210, 218, 255, 0.34);
  filter: drop-shadow(0 0 12px rgba(120, 128, 249, 0.32));
}

.focus-lines i:nth-child(1) {
  top: 0;
  left: 0;
  border-top: 1px solid;
  border-left: 1px solid;
}

.focus-lines i:nth-child(2) {
  top: 0;
  right: 0;
  border-top: 1px solid;
  border-right: 1px solid;
}

.focus-lines i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.focus-lines i:nth-child(4) {
  left: 0;
  bottom: 0;
  border-left: 1px solid;
  border-bottom: 1px solid;
}

.slide-caption {
  position: absolute;
  right: clamp(190px, 19vw, 310px);
  bottom: clamp(92px, 12vh, 150px);
  z-index: 15;
  display: grid;
  gap: 5px;
  color: rgba(241, 243, 251, 0.78);
  pointer-events: none;
}

.slide-caption span {
  color: rgba(241, 243, 251, 0.28);
  font-size: clamp(54px, 6vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.04em;
}

.slide-caption b {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.flip-control {
  position: absolute;
  right: clamp(50px, 6vw, 88px);
  z-index: 42;
  width: 48px;
  height: 48px;
  color: rgba(241, 243, 251, 0.58);
  font-size: 34px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  border: 1px solid rgba(210, 218, 255, 0.16);
  background: rgba(2, 3, 6, 0.18);
  backdrop-filter: blur(10px);
}

.flip-up {
  top: 42%;
}

.flip-down {
  top: calc(42% + 62px);
}

.radar-main {
  position: absolute;
  left: 50%;
  bottom: 5%;
  z-index: 12;
  transform: translateX(-50%);
}

.right-status {
  position: absolute;
  right: 58px;
  top: 17%;
  bottom: 108px;
  z-index: 28;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 34px;
  min-width: 168px;
  color: var(--muted);
}

.year {
  margin: 0 0 2px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.status-dots {
  display: flex;
  gap: 8px;
}

.status-dots i {
  width: 5px;
  height: 5px;
  background: rgba(241, 243, 251, 0.22);
}

.status-dots i.is-active {
  background: var(--violet);
  box-shadow: 0 0 12px rgba(120, 128, 249, 0.9);
}

.right-project {
  margin-top: 30px;
  display: grid;
  gap: 8px;
  padding-left: 22px;
  border-left: 1px solid rgba(210, 218, 255, 0.16);
}

.right-project span {
  color: rgba(241, 243, 251, 0.76);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.right-project small {
  color: rgba(241, 243, 251, 0.38);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.radar-small {
  margin-top: auto;
  width: 74px;
}

.bottom-hud {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 36px;
  z-index: 32;
  display: grid;
  grid-template-columns: 1fr 1.2fr auto 1fr;
  align-items: end;
  gap: 26px;
  color: rgba(241, 243, 251, 0.42);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.copyright {
  margin: 0;
}

.progress-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
}

#progressText {
  color: var(--violet);
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: center;
}

.progress-rail i {
  height: 2px;
  background: rgba(241, 243, 251, 0.18);
}

.progress-rail i.is-active {
  background: linear-gradient(90deg, var(--violet), var(--pink));
  box-shadow: 0 0 16px rgba(120, 128, 249, 0.74);
}

.scroll-cue {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(241, 243, 251, 0.42);
}

.scroll-cue i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.socials {
  justify-self: end;
  display: flex;
  gap: 48px;
}

.socials a {
  color: rgba(241, 243, 251, 0.46);
}

body:not(.in) .topbar,
body:not(.in) .left-index,
body:not(.in) .copy-block,
body:not(.in) .right-status,
body:not(.in) .bottom-hud {
  opacity: 0;
  transform: translateY(18px);
}

body:not(.in) .bg-slide {
  opacity: 0;
  transform: translate3d(0, 18%, -220px) scale(1.08);
}

.topbar,
.left-index,
.copy-block,
.right-status,
.bottom-hud {
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

@media (max-width: 1180px) {
  .topnav {
    gap: 28px;
  }

  .copy-block {
    left: 110px;
    width: 270px;
  }

  .right-status {
    right: 42px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .console-shell {
    min-height: 100svh;
    padding: 14px;
    background-size: auto, 48px 48px, 48px 48px;
  }

  .frame-outer {
    inset: 12px;
    border-radius: 28px;
  }

  .frame-inner {
    inset: 82px 24px 86px;
    border-radius: 18px;
  }

  .ambient {
    inset: -16%;
    opacity: 0.38;
    filter: blur(12px) saturate(1.22) contrast(1.08) brightness(0.6);
  }

  .topbar {
    height: 70px;
    grid-template-columns: 1fr auto 1fr;
    padding: 0 22px;
  }

  .topnav {
    gap: 22px;
  }

  .topnav button {
    padding: 22px 0;
    font-size: 0;
  }

  .topnav button::before {
    content: attr(data-project);
    font-size: 0;
  }

  .topnav button::after {
    bottom: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(241, 243, 251, 0.7);
  }

  .topnav button.is-active::after {
    width: 26px;
    height: 2px;
    border-radius: 0;
    bottom: -1px;
  }

  .menu-button span {
    display: none;
  }

  .menu-button i {
    width: 26px;
    height: 18px;
    background:
      linear-gradient(rgba(241, 243, 251, 0.86), rgba(241, 243, 251, 0.86)) 0 0 / 26px 1px no-repeat,
      linear-gradient(rgba(241, 243, 251, 0.86), rgba(241, 243, 251, 0.86)) 5px 8px / 21px 1px no-repeat,
      linear-gradient(rgba(241, 243, 251, 0.86), rgba(241, 243, 251, 0.86)) 0 16px / 26px 1px no-repeat;
  }

  .left-index {
    display: none;
  }

  .copy-block {
    left: 44px;
    right: 44px;
    top: 16%;
    width: auto;
  }

  .ghost-number {
    font-size: 60px;
  }

  .copy-block h1 {
    font-size: 30px;
  }

  .project-desc {
    margin: 26px 0 0;
  }

  .text-link {
    display: none;
  }

  .background-stage {
    inset: 12px;
    border-radius: 28px;
    perspective: 900px;
  }

  .bg-slide {
    background-position: center;
  }

  .bg-slide.is-active {
    transform: translate3d(0, 0, 0) scale(1.012);
  }

  .bg-slide.is-prev {
    transform: translate3d(0, -88%, -120px) rotateX(9deg) scale(0.94);
  }

  .bg-slide.is-next {
    transform: translate3d(0, 88%, -120px) rotateX(-9deg) scale(0.94);
  }

  .tech-grid {
    opacity: 0.2;
    background-size: 52px 52px, 52px 52px, 100% 100%;
    -webkit-mask-image: linear-gradient(90deg, #000 0 18%, transparent 38% 62%, #000 82% 100%);
    mask-image: linear-gradient(90deg, #000 0 18%, transparent 38% 62%, #000 82% 100%);
  }

  .focus-lines {
    inset: 28px;
  }

  .focus-lines i {
    width: 58px;
    height: 58px;
    opacity: 0.58;
  }

  .slide-caption {
    right: 32px;
    bottom: 118px;
  }

  .flip-control {
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 32px;
  }

  .flip-up {
    top: auto;
    bottom: 180px;
  }

  .flip-down {
    top: auto;
    bottom: 126px;
  }

  .radar-main {
    width: 74px;
    bottom: 1%;
  }

  .right-status {
    display: none;
  }

  .bottom-hud {
    left: 42px;
    right: 42px;
    bottom: 26px;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 16px;
  }

  .copyright,
  .socials {
    display: none;
  }

  .progress-wrap {
    grid-template-columns: auto 1fr;
  }

  .scroll-cue {
    justify-self: center;
  }
}
