/* ══════════════════════════════════════
   GORA — shared menu/back styling
══════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Share Tech Mono', monospace;
}

a {
  color: inherit;
}

#back {
  position: fixed;
  top: 1.8rem;
  left: 2rem;
  z-index: 99999;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.2s ease;
}

#back:hover {
  color: #c1111e;
}

#menu-trigger {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 140px;
  height: 140px;
  z-index: 99999;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#menu-trigger.open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

#menu-sketch {
  width: 140px;
  height: 140px;
}

#menu-sketch canvas {
  position: relative !important;
  width: 140px !important;
  height: 140px !important;
  display: block;
  background: transparent !important;
}

#menu-overlay {
  position: fixed;
  top: 4rem;
  right: 2rem;
  width: auto;
  height: auto;
  z-index: 99998;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#menu-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;

  width: 280px;

  gap: 0.6rem;
  text-align: right;

  pointer-events: all;
}

.menu-link {
  display: flex;
  justify-content: flex-end;
  align-items: center;

  width: 100%;
  min-height: 28px;

  padding: 0.35rem 0;

  text-align: right;

  font-family: 'Share Tech Mono', monospace !important;
  font-weight: 900;
  font-size: clamp(3.2rem, 2.4vw, 1.8rem);

  letter-spacing: 0.06em;

  color: #c1111e !important;

  text-decoration: none !important;
  text-transform: uppercase;

  cursor: pointer;

  opacity: 0;
  transform: translateX(10px);

  transition:
    opacity .3s ease,
    transform .3s ease,
    color .2s ease;
}

.menu-link:hover,
.menu-link:visited,
.menu-link:focus {
  color: #c1111e !important;
  text-decoration: none !important;
}

#menu-overlay.open .menu-link:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.03s;
}

#menu-overlay.open .menu-link:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.08s;
}

#menu-overlay.open .menu-link:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.13s;
}

#menu-overlay.open .menu-link:nth-child(4) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.18s;
}

#menu-overlay.open .menu-link:nth-child(5) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.23s;
}


/* ══════════════════════════════════════
   Creative coding sketch slider layout
══════════════════════════════════════ */
#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

#slider-track {
  display: flex;
  width: 400vw;
  height: 100vh;
  transition: transform 0.75s cubic-bezier(0.77, 0, 0.175, 1);
}

#slider-track.slide-2 {
  transform: translateX(-100vw);
}

#slider-track.slide-3 {
  transform: translateX(-200vw);
}

#slider-track.slide-4 {
  transform: translateX(-300vw);
}

.slide {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: #000;
}

.instruction-panel {
  width: 22%;
  min-width: 260px;
  height: 100vh;
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 20;
}

.small-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.instruction-title {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
}

.instruction-text {
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.canvas-wrap {
  width: 78%;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.canvas-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

#wrap-4 {
  cursor: none;
}

#nav {
  position: fixed;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.nav-arrow {
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 0.2s;
}

.nav-arrow:hover {
  color: #fff;
}

.nav-arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: #fff;
}

#sketch-label {
  position: fixed;
  bottom: 2.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ══════════════════════════════════════
   ABOUT PANEL
══════════════════════════════════════ */

#about-blur-bg {
  position: fixed;
  inset: 0;
  z-index: 900;

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  background: rgba(0, 0, 0, 0.18);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

#about-blur-bg.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Center panel — hidden until About is clicked */

#about-panel {
  position: fixed;

  top: 50%;
  left: 50%;

  width: min(950px, 85vw);
  height: min(700px, 82vh);

  transform: translate(-50%, -50%) scale(0.96);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  overflow: hidden;

  z-index: 1000;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease,
    transform 0.35s ease;
}

#about-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;

  transform: translate(-50%, -50%) scale(1);
}

/* p5 sketch background */

#about-canvas {
  position: absolute;
  inset: 0;

  z-index: 1;

  overflow: hidden;

  background: transparent !important;
}

#about-canvas canvas {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  background: transparent !important;
}

/* text layer */

.about-copy {
  position: relative;
  z-index: 2;

  width: 100%;
  height: 100%;

  overflow-y: auto;

  padding: 70px;

  color: white;
  background: transparent !important;

  font-family: 'Share Tech Mono', monospace;

  line-height: 1.9;

  scrollbar-width: none;
}

.about-copy::-webkit-scrollbar {
  display: none;
}

.about-copy h3 {
  font-size: 1rem;
  font-weight: 900;

  text-transform: uppercase;

  letter-spacing: 0.15em;

  margin: 2rem 0 1rem;

  color: #fff;
}

.about-copy p {
  font-size: 0.9rem;

  max-width: 680px;

  margin-bottom: 1.2rem;

  color: rgba(255, 255, 255, 0.92);
}

.about-copy a {
  color: #c1111e;
  text-decoration: none;
}

.about-copy a:hover {
  opacity: 0.8;
}

/* close dot */

#about-close-dot {
  position: absolute;

  top: 24px;
  right: 24px;

  width: 10px;
  height: 10px;

  border: 0;
  border-radius: 50%;

  background: #c1111e;

  cursor: pointer;

  z-index: 20;

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}

#about-close-dot.visible {
  opacity: 1;
  pointer-events: all;
}

#about-close-dot:hover {
  transform: scale(1.35);
}

/* mobile */

@media (max-width: 768px) {
  #menu-links {
    width: 220px;
  }

  #about-panel {
    width: 92vw;
    height: 84vh;
  }

  .about-copy {
    padding: 32px;
  }

  .about-copy p {
    font-size: 0.82rem;
  }
}

.about-links {
  margin-top: 3rem;

  display: flex;
  flex-direction: column;

  gap: 1rem;
}

.about-links a {
  color: #c1111e !important;

  font-size: 0.9rem;

  letter-spacing: 0.12em;

  text-decoration: none;

  transition: opacity .2s ease;
}

.about-links a:hover {
  opacity: .7;
}