/* Home page: a fixed 1200×950 collage on paper. Every piece is placed by id below. */

body {
  min-height: 100vh;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: relative;
  width: 1200px;
  height: 950px;
  overflow: hidden;
}
/* Paper background */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/paper.png") no-repeat center center;
  background-size: 110%;
  z-index: -1;
}

.canvas-img {
  position: absolute;
  width: 300px;
  height: auto;
  display: block;
}
.drop-shadow {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
}

/* ---- Collage layout (in markup/paint order) ---- */

#mars         { top: 40px;  left: 60px;   width: 400px; z-index: -2; }
#moon         { top: 500px; left: 850px;  width: 400px; z-index: -2; }
#tv4          { top: 225px; left: 265px;  width: 336px; }
#tv5          { top: 105px; left: 450px;  width: 500px; }
#tv1          { top: 432px; left: 135px;  width: 500px; }
#tv6          { top: 130px; left: 810px;  width: 350px; }
#tv2          { top: 325px; left: 750px;  width: 500px; }
#sorry        { top: 154px; left: 910px;  width: 178px; border-radius: 5px; opacity: 0.7; }
#oscilloscope { top: 120px; left: 330px;  width: 200px; }
#tv7          { top: 590px; left: 500px;  width: 450px; }
#tv8          { top: 395px; left: 700px;  width: 200px; }
#tv3          { top: 440px; left: 600px;  width: 270px; transform: translateX(-50%); }
#eyes         { top: 460px; left: 542px;  width: 138px; border-radius: 3px; opacity: 0.7; }
#pot-empty    { top: 330px; left: 185px;  width: 175px; transform: rotate(-5deg); z-index: -1; }
#pothos       { top: 280px; left: 130px;  width: 300px; }
#tegu         { top: 480px; left: 0;      width: 300px; z-index: -1; }
#camera       { top: 30px;  left: 800px;  width: 150px; transform: translateX(-50%); z-index: 1; }
#sunflower1   { top: 600px; left: 850px;  width: 220px; transform: scaleX(-1); z-index: -1; }
#magpie       { top: 15px;  left: 1010px; width: 170px; }

/* "Welcome" sign on tv5: two dithered frames that alternate every half second */
#welcome-dither1,
#welcome-dither2 {
  top: 175px;
  left: 47%;
  width: 300px;
  animation: blink 1s steps(1) infinite;
}
#welcome-dither2 {
  opacity: 0;
  animation-delay: 0.5s;
}

/* Magpie links to the bird log and glows on hover */
#magpie img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease, filter 0.2s ease;
}
#magpie:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px #fff) drop-shadow(0 0 20px #fff);
}

/* ---- Terminal on tv1: a black screen with typed status text (static/js/index.js) ---- */

#tv1-rect,
#terminal {
  position: absolute;
  top: 470px;
  left: 255px;
  width: 178px;
  height: 250px;
}
#tv1-rect {
  background: #000;
  clip-path: polygon(0% 16%, 100% 8%, 100% 91%, 0% 85%);
  opacity: 0.9;
}
#terminal {
  box-sizing: border-box;
  padding: 46px 16px 0;
  overflow: hidden;
  transform-origin: left center;
  transform: perspective(300px) rotateY(-18deg);
  color: #33ff66;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}
#terminal .cursor {
  animation: blink 1s steps(1) infinite;
}

/* ---- Nav links ---- */

.nav-link {
  position: absolute;
  z-index: 10;
  color: #111;
  text-decoration: none;
  font-family: "Press Start 2P", sans-serif;
  font-size: 20px;
  text-transform: lowercase;
  text-shadow:
    0 0 4px #fff,
    0 0 8px #fff,
    0 0 14px #fff,
    0 0 20px #fff;
  display: inline-block;
  transition: font-size 0.15s ease;
}
.nav-link:hover {
  font-size: 24px;
  color: #fff;
  text-shadow:
    0 0 4px #111,
    0 0 8px #111,
    0 0 14px #111,
    0 0 20px #111;
}

.about-link {
  top: 320px;
  left: 425px;
  transform: translate(-50%, -50%);
}
.library-link {
  top: 480px;
  left: 1030px;
  font-size: 16px;
  transform: translateX(-50%) rotate(-6deg);
}
.library-link:hover {
  font-size: 19px;
}
.misc-link {
  top: 180px;
  left: 385px;
  font-size: 10px;
  transform: translateX(-50%);
}
.misc-link:hover {
  font-size: 8px;
}
.moodboard-link {
  top: 747px;
  left: 665px;
  transform: translate(-50%, -50%);
}

/* ---- 88×31 button carousel ---- */
/* index.js appends a copy of .carousel-group; scrolling by half the track then loops seamlessly. */

.carousel-wrapper {
  position: absolute;
  top: 65px;
  left: 375px;
  width: 400px;
  overflow: hidden;
  padding: 12px 0;
  z-index: -3;
}
.carousel {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scroll-left 25s linear infinite;
}
.carousel-wrapper:hover .carousel {
  animation-play-state: paused;
}
.carousel-group {
  display: flex;
  gap: 16px;
}
.carousel img {
  height: 31px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 8px)); }
}

.site-footer {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: #333;
}
.site-footer a {
  color: #333;
}
