/* ===================================================================
   NETSCAPADE — a Y2K trip through internet history
   Two moods: the chrome/starfield "portal" home page, and the tiled,
   table-cornered BBS-forum look for every era page. No JS anywhere —
   every "animated gif" here is a CSS @keyframes loop instead.
   =================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Verdana, Geneva, "Trebuchet MS", sans-serif;
  color: #e8e8ff;
  background: #05010f;
}

a {
  color: inherit;
}

/* ---------- shared bits ---------- */

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  background: #000;
  color: #0f0;
  padding: 0.4rem 0.8rem;
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  border-top: 2px solid #f4ff00;
  border-bottom: 2px solid #f4ff00;
  padding: 0.4rem 0;
}

.marquee p {
  display: inline-block;
  margin: 0;
  padding-left: 100%;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 0.15em;
  color: #39ff14;
  text-shadow: 0 0 6px #39ff14, 0 0 12px rgb(57 255 20 / 60%);
  animation: scroll-left 16s linear infinite;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

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

  50%,
  100% {
    opacity: 0;
  }
}

.blink {
  animation: blink 1.1s step-start infinite;
}

.icon {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .marquee p,
  .blink {
    animation: none;
  }
}

/* ---------- era / forum pages: BBS mood ---------- */

.bbs {
  min-height: 100vh;
  background-color: #1a1330;
  background-image: repeating-linear-gradient(
    45deg,
    rgb(255 255 255 / 3%) 0,
    rgb(255 255 255 / 3%) 2px,
    transparent 2px,
    transparent 14px
  );
}

.bbs-nav {
  background: #000;
  border-bottom: 3px double #ff00d4;
  padding: 0.6rem 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.bbs-nav a {
  margin-right: 1rem;
  color: #00fff2;
  text-decoration: none;
}

.bbs-nav a:hover {
  text-decoration: underline;
}

.board {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.board-banner {
  background: linear-gradient(90deg, #ff00d4, #7b2ff7 50%, #00c3ff);
  border: 3px ridge #ffd6f7;
  padding: 0.75rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.board-banner .board-name {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-transform: uppercase;
}

.board h1 {
  font-family: Impact, "Arial Black", sans-serif;
  color: #fff;
  margin: 0.25rem 0 0;
  text-shadow: 2px 2px 0 #000;
}

.thread-meta {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #ffd6f7;
  border-bottom: 1px dashed #7b2ff7;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.post {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  background: #241a44;
  border: 2px solid #4b1a8f;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.post.op {
  border-color: #00fff2;
  box-shadow: 0 0 12px rgb(0 255 242 / 35%);
}

.poster {
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: #b79dff;
}

.avatar {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Impact, sans-serif;
  font-size: 1.25rem;
  color: #05010f;
  background: linear-gradient(135deg, #00fff2, #ff00d4);
  border: 2px solid #fff;
}

.poster .handle {
  color: #f4ff00;
  font-weight: bold;
}

.post-body p {
  line-height: 1.6;
}

.post-body h2 {
  font-size: 1.1rem;
  color: #00fff2;
}

.signature {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dotted #7b2ff7;
  font-style: italic;
  font-size: 0.8rem;
  color: #ffd6f7;
}

.era-nav {
  display: flex;
  justify-content: space-between;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  margin-top: 2rem;
}

.era-nav-link {
  text-decoration: none;
  color: #00fff2;
  border: 1px solid #00fff2;
  padding: 0.35rem 0.75rem;
}

.era-nav-link:hover {
  background: #00fff2;
  color: #05010f;
}

.rainbow-rule {
  height: 4px;
  border: 0;
  margin: 1.5rem 0;
  background: linear-gradient(90deg, #ff00d4, #f4ff00, #00fff2, #ff00d4);
  background-size: 300% 100%;
  animation: rainbow-slide 5s linear infinite;
}

@media (width <= 30rem) {
  .post {
    grid-template-columns: 1fr;
  }

  .poster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }

  .avatar {
    margin: 0;
  }
}

/* ---------- home page: cluttered low-fi Y2K ---------- */

.portal {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #1a0533;
  background-image:
    repeating-conic-gradient(
      from 45deg at 50% 50%,
      #ff00d4 0deg 90deg,
      #f4ff00 90deg 180deg,
      #00fff2 180deg 270deg,
      #ff6a00 270deg 360deg
    );
  background-size: 2.75rem 2.75rem;
}

.portal::before,
.portal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* a scattered "sparkle GIF" overlay, classic tiled personal-homepage glitter */
.portal::before {
  background-image: radial-gradient(0.5rem 0.5rem at 10% 20%, #fff 0%, rgb(255 255 255 / 0%) 70%),
    radial-gradient(0.35rem 0.35rem at 82% 12%, #fff 0%, rgb(255 255 255 / 0%) 70%),
    radial-gradient(0.6rem 0.6rem at 92% 68%, #fff 0%, rgb(255 255 255 / 0%) 70%),
    radial-gradient(0.4rem 0.4rem at 6% 82%, #fff 0%, rgb(255 255 255 / 0%) 70%),
    radial-gradient(0.3rem 0.3rem at 32% 92%, #fff 0%, rgb(255 255 255 / 0%) 70%),
    radial-gradient(0.45rem 0.45rem at 60% 6%, #fff 0%, rgb(255 255 255 / 0%) 70%);
  animation: sparkle-flicker 0.6s steps(2) infinite;
}

/* a corrupted-looking hard-stop gradient band, standing in for a heavily
   compressed low-res photo/gif strip */
.portal::after {
  height: 4.5rem;
  top: auto;
  bottom: 0;
  background-image: repeating-linear-gradient(
    100deg,
    #ff8fd6 0%,
    #ff8fd6 4%,
    #8fd6ff 4%,
    #8fd6ff 9%,
    #d6ff8f 9%,
    #d6ff8f 11%,
    #444 11%,
    #444 15%,
    #ff8fd6 15%,
    #ff8fd6 22%
  );
  opacity: 0.5;
  filter: blur(0.5px) saturate(1.4);
}

@keyframes sparkle-flicker {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  text-align: center;
}

.hero h1 {
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: bold;
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin: 0.5rem 0 0;
  letter-spacing: 0.03em;
  color: #f4ff00;
  -webkit-text-stroke: 3px #05010f;
  text-shadow:
    3px 3px 0 #ff00d4,
    -3px -3px 0 #00fff2,
    0 0 24px rgb(255 0 212 / 60%);
  transform: rotate(-1.5deg);
}

.hero .tagline {
  font-family: "Comic Sans MS", "Trebuchet MS", cursive, sans-serif;
  color: #fff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  margin: 1rem 0 0;
}

.hero .subtag {
  color: #00fff2;
  font-family: "Times New Roman", serif;
  font-style: italic;
  font-size: 0.9rem;
  text-shadow: 1px 1px 0 #000;
}

.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.75rem 0;
}

.badge {
  position: relative;
  border: 2px outset #ccc;
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 rgb(0 0 0 / 60%);
}

.badge-row .badge:nth-child(1) {
  transform: rotate(-6deg);
  background: #ff00d4;
  color: #fff;
  border-color: #ffd6f7;
  font-family: "Comic Sans MS", cursive;
}

.badge-row .badge:nth-child(2) {
  transform: rotate(3deg);
  background: #fff;
  color: #00e;
  border-color: #999;
  font-family: "Times New Roman", serif;
  text-transform: none;
  font-style: italic;
}

.badge-row .badge:nth-child(3) {
  transform: rotate(-2deg);
  background: linear-gradient(180deg, #ffe600, #ff9d00);
  color: #4a1d00;
  border-color: #fff2b0;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.portal-button {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  padding: 1.25rem 1rem;
  border-radius: 2px;
  border: 3px outset #ddd;
  background: repeating-linear-gradient(135deg, #241143 0 10px, #1a0c33 10px 20px);
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%);
  transition: transform 0.1s ease;
}

/* every button leans toward the palette its own era pays off in */
.portal-grid a:nth-child(1) {
  border-color: #39ff14;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%), inset 0 0 12px rgb(57 255 20 / 25%);
}

.portal-grid a:nth-child(2) {
  border-color: #00fff2;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%), inset 0 0 12px rgb(123 47 247 / 35%);
}

.portal-grid a:nth-child(3) {
  border-color: #00e;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%), inset 0 0 12px rgb(255 255 0 / 15%);
}

.portal-grid a:nth-child(4) {
  border-color: #c8c8d0;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%), inset 0 0 14px rgb(200 210 220 / 35%);
}

.portal-grid a:nth-child(5) {
  border-color: #b7e9fb;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%), inset 0 0 14px rgb(180 230 250 / 35%);
}

.portal-grid a:nth-child(6) {
  border-color: #fff;
  background: repeating-linear-gradient(135deg, #2a2a2e 0 10px, #1e1e21 10px 20px);
  box-shadow: 3px 3px 0 rgb(0 0 0 / 70%);
}

.portal-button:hover,
.portal-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgb(0 0 0 / 80%);
}

.portal-button .icon {
  position: relative;
  z-index: 1;
  margin: 0 auto 0.5rem;
  color: #fff;
  filter: drop-shadow(1px 0 0 #ff00d4) drop-shadow(-1px 0 0 #00fff2);
  animation: jerky-spin 2.4s steps(8) infinite;
}

.portal-button strong {
  position: relative;
  z-index: 1;
  display: block;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.portal-button span {
  position: relative;
  z-index: 1;
  display: block;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #f4ff00;
  margin-top: 0.25rem;
}

@keyframes jerky-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hero footer {
  margin-top: 3rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #fff;
}

.hero footer p:first-child {
  color: #d0d0d0;
}

.hero footer .counter {
  display: inline-block;
  background: #000;
  color: #0f0;
  letter-spacing: 0.2em;
  padding: 0.15rem 0.6rem;
  border: 2px inset #666;
}

@media (prefers-reduced-motion: reduce) {
  .portal::before,
  .portal-button .icon {
    animation: none;
  }
}
