#pixel-puffler {
  position: fixed;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

#pixel-puffler img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}


body {
  background: #fafafa;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #111;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.logo {
  position: fixed;
  bottom: 20px;
  right: 40px;
  width: 64px;
  height: auto;
  z-index: 1000;
}

main {
  position: relative;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  text-align: left;
  z-index: 1001;
}

h1 {
  font-size: 1em;
  margin: 60px 0 10px 40px;
  font-weight: normal;
  color: #de4742 !important;
  z-index: 1002;
  letter-spacing: 0.05em;
}

nav {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 1001;
  letter-spacing: 0.05em;

}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav li {
  margin-bottom: 0.8em;
}

nav a {
  text-decoration: none;
  color: #111;
  font-size: 1em;
  border-bottom: 1px solid transparent;
}

nav a:hover {
  border-bottom: 1px solid #111;
}

#running-banner {
  position: fixed;
  top: 0;
  transform: translateY(10px);
  width: 100%;
  height: 20px;
  overflow: hidden;
  z-index: 9999;
  font-size: 1em;
  letter-spacing: 0.05em;
  font-family: inherit;
  white-space: nowrap;
}

body.home #running-banner {
  color: #de4742; /* red-orange */
    border-bottom: 1px solid #de4742;
}

body.sheddy #running-banner {
  color: #f3bb32; /* yellow*/
    border-bottom: 1px solid #f3bb32;
}

body.puffler #running-banner {
  color: #69a6bb; /* blue */
    border-bottom: 1px solid #69a6bb;
}

body.RT4U #running-banner {
  color: #4e8837; /* green */
    border-bottom: 1px solid #4e8837;
}

body.Analysis #running-banner {
  color: #000000; /* black */
    border-bottom: 1px solid #000000;
}


#banner-track {
  display: flex;
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.banner-segment {
  padding-right: 100px;
  white-space: nowrap;
}



#caption {
  position: fixed;
  top: 60px;
  right: 40px;
  max-width: 350px;
  font-size: 1em;
  color: #111;
  z-index: 1001;
  text-align: right;
  letter-spacing: 0.05em;
  pointer-events: none;
  background-color: rgba(250, 250, 250, 0.85)
}

#description {
  position: absolute;
  left: 40px;
  top: 170px;
  width: 220px;
  padding-right: 20px;
  font-size: 1em;
  color: #111;
  z-index: 1001;
  letter-spacing: 0.05em;
}

.about-text {
  margin-left: 40px;
  margin-top: 20px;
  max-width: 250px; /* optional, keeps it readable on large screens */
  letter-spacing: 0.05em;
    z-index: 1001;
}

.grid {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  z-index: 1;
}

.grid img {
  position: absolute;
  cursor: grab;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  max-height: 70vh;
  max-width: 70vw;      /* NEW: keeps width from overflowing */
  width: auto;
  height: auto;
}

.time-stamp {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1em;
  font-family: Arial, sans-serif;
  color: #111;
  font-weight: normal;
  z-index: 9999;
  letter-spacing: 0.05em;
}



#reset-link {
  left: 40px;
  position: fixed;
  bottom: 20px;
  right: 40px;
  font-size: 1em;
  color: #111;
  text-decoration: none;
  z-index: 1002;
  letter-spacing: 0.05em;
}
#reset-link:hover {
  border-bottom: none;
}


#image-links {
  position: fixed;
  top: 180px;
  right: 40px;
  font-size: 1em;
  text-align: right;
  z-index: 1001;
  letter-spacing: 0.05em;
}

#image-links a {
  display: block;
  text-decoration: none;
  color: #111;
  margin-top: 12px;
}

#image-links a:hover {
  text-decoration: underline;
}



@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.blink {
  animation: blink 1s steps(1, start) infinite;
}

.front-grid {
  position: relative;
  z-index: 1;
}

.front-img {
  position: absolute;
  max-width: 70vw;
  max-height: 30vw;
  cursor: grab;
  box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}


#magnifier-label {
  position: fixed;
  bottom: 40px; /* 20px above reset button */
  left: 40px;
  font-size: 1em;
  color: #de4742; /* matching your magnifier border red */
  font-family: Arial, sans-serif;
  z-index: 1002;
  letter-spacing: 0.05em;
  pointer-events: none;
}


.corner-dust {
  position: fixed;    /* position in viewport */
  font-family: "Noto Sans Symbols", "Segoe UI Symbol", "Arial Unicode MS", serif;
  font-size: 1.1em;
  color: #111;
  pointer-events: none;
  z-index: 4000;
  width: 0;
  height: 0;
}

#dust-top-left {
  top: 0;
  left: 0;
}

#dust-top-right {
  top: 0;
  right: 0;
  text-align: right;
}

#dust-bottom-left {
  bottom: 0;
  left: 0;
}

#dust-bottom-right {
  bottom: 0;
  right: 0;
  text-align: right;
}






@media (min-width: 769px) {
  #magnifier {
    display: block;
    pointer-events: auto;

  }
}

@media (min-width: 769px) {
  body:not(.home) .grid figure {
    display: contents;
  }

  body:not(.home) .grid figcaption {
    display: none;
  }
}

@media (max-width: 768px) {
   body {
    overflow: auto;
  }
  
  .logo {
    width: 65px;
    bottom: 10px;
    right: 15px;
  }

  h1 {
    font-size: 1.1em;
    margin: 50px 20px 10px;
  }

  nav {
    position: relative;
    top: auto;
    left: auto;
    margin: 20px;
  }

  nav li {
    margin-bottom: 0.5em;
  }
  
 nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
  }

 nav a {
    font-size: 1.1em;
  }

  .time-stamp {
    font-size: 1.1em;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  #description {
    position: relative;
    top: auto;
    left: auto;
    width: 90%;
    margin: 20px;
    font-size: 1.1em;
  }

  #caption, #image-links {
    position: relative;
    right: auto;
    top: auto;
    margin: 20px;
    text-align: left;
  }

  #reset-link {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
    margin: 20px;
  }
  
 body:not(.home) .grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0px 60px 0px;
    padding-top: 0px; /* ensure it clears nav + description */
    position: relative;
    z-index: 0;
  }

 body:not(.home) .grid figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw; /* instead of 100vw */
  margin: 0;
}

body:not(.home) .grid img {
  position: static !important;
  display: block;
  max-width: 90vw;
  width: auto;
  height: auto;
  margin: 20px 0px 20px 0px;
  box-shadow: none;
  cursor: default;
}

  body:not(.home) .grid figcaption {
    margin-top: 6px;
    font-size: 14px;
    color: #333;
    text-align: left;
    padding: 0 5vw;
    max-width: 90vw;
  }

 body.home .front-img {
   max-width: 80vw;
  max-height: 30vh;
  height: auto;
  width: auto;
  }
  
  .image-block {
  width: 100%;
  text-align: center;
  margin-bottom: 24px;
}

.mobile-caption {
  font-size: 1.1em;
  color: #111;
  margin-top: 1px;
  margin-bottom: 0;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

#caption,
  #image-links {
    display: none;
  }
  
   #reset-link {
    display: none;
  }
  
   #magnifier,
  #magnifier-label {
    display: none;
  }
}


@media (min-width: 769px) {
  .mobile-caption {
    display: none;
  }
}

