/* ============================================================
   Robson Hatsukami Morgan — Home Page
   90s aesthetic, modern CSS underneath (custom properties, grid,
   flexbox, clamp()). No frameworks, no build step.
   ============================================================ */

:root {
  /* 90s Taco Bell interior palette: deep purple, teal, mustard yellow, raspberry pink */
  --hot-pink: #ff2e7e;
  --cyan: #00c2b8;
  --yellow: #ffcb05;
  --lime: #ff6b35;
  --purple: #4a1d6e;
  --purple-2: #6a2d99;
  --orange: #ff6b35;
  --bg-dark: #2b1046;
  --win-gray: #c0c0c0;
  --win-blue: #4a1d6e;
  --win-blue-light: #00c2b8;
  --text-dark: #1a1a1a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Comic Neue", "Comic Sans MS", "Chalkboard SE", cursive, sans-serif;
  color: var(--text-dark);
  background-color: var(--purple);
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22220%22%20height%3D%22220%22%20viewBox%3D%220%200%20220%20220%22%3E%0A%3Cpath%20d%3D%22M8%2034%20Q22%2014%2036%2034%20T64%2034%22%20stroke%3D%22%2300c2b8%22%20stroke-width%3D%226%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22/%3E%0A%3Cpolygon%20points%3D%22168%2C14%20190%2C52%20146%2C52%22%20stroke%3D%22%23ffcb05%22%20stroke-width%3D%224%22%20fill%3D%22none%22%20stroke-linejoin%3D%22round%22/%3E%0A%3Ccircle%20cx%3D%2234%22%20cy%3D%22120%22%20r%3D%229%22%20fill%3D%22%23ff2e7e%22/%3E%0A%3Cpath%20d%3D%22M104%20178%20L120%20160%20L136%20178%20L152%20160%20L168%20178%22%20stroke%3D%22%23ffcb05%22%20stroke-width%3D%226%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%0A%3Cpath%20d%3D%22M182%2096%20A22%2022%200%201%201%20182%20140%20A15%2015%200%201%200%20182%2096%20Z%22%20fill%3D%22%2300c2b8%22/%3E%0A%3Cpolygon%20points%3D%2218%2C196%2042%2C196%2030%2C174%22%20fill%3D%22%23ff2e7e%22/%3E%0A%3Ccircle%20cx%3D%22112%22%20cy%3D%2218%22%20r%3D%227%22%20stroke%3D%22%23ffcb05%22%20stroke-width%3D%223%22%20fill%3D%22none%22/%3E%0A%3Cpath%20d%3D%22M188%2020%20Q200%208%20212%2020%22%20stroke%3D%22%23ff2e7e%22%20stroke-width%3D%225%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22/%3E%0A%3Cpath%20d%3D%22M60%20100%20Q72%2084%2084%20100%20T108%20100%22%20stroke%3D%22%2300c2b8%22%20stroke-width%3D%225%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.85%22/%3E%0A%3C/svg%3E"),
    repeating-linear-gradient(45deg, var(--purple) 0 20px, var(--purple-2) 20px 40px);
  background-size: 220px 220px, auto;
  background-attachment: fixed, fixed;
  position: relative;
}

/* large Memphis-style corner squiggles, only where there's room to see them */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  width: 340px;
  height: 340px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22340%22%20height%3D%22340%22%20viewBox%3D%220%200%20340%20340%22%3E%0A%3Cpath%20d%3D%22M20%20260%20Q70%20200%20120%20260%20T220%20260%20T320%20260%22%20stroke%3D%22%2300c2b8%22%20stroke-width%3D%2214%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22/%3E%0A%3Cpolygon%20points%3D%2260%2C40%20130%2C40%2095%2C110%22%20fill%3D%22none%22%20stroke%3D%22%23ffcb05%22%20stroke-width%3D%228%22%20stroke-linejoin%3D%22round%22/%3E%0A%3Ccircle%20cx%3D%22250%22%20cy%3D%2270%22%20r%3D%2222%22%20fill%3D%22%23ff2e7e%22/%3E%0A%3Ccircle%20cx%3D%22250%22%20cy%3D%2270%22%20r%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23ffcb05%22%20stroke-width%3D%224%22/%3E%0A%3Cpath%20d%3D%22M180%20150%20A34%2034%200%201%201%20180%20218%20A22%2022%200%201%200%20180%20150%20Z%22%20fill%3D%22%23ffcb05%22%20opacity%3D%220.9%22/%3E%0A%3C/svg%3E");
  background-repeat: no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
body::before { left: 0; }
body::after { right: 0; transform: scaleX(-1) rotate(8deg); transform-origin: top right; }
@media (max-width: 1300px) {
  body::before, body::after { display: none; }
}

.marquee-bar, .page-header, .page-wrap, .page-footer {
  position: relative;
  z-index: 1;
}

/* ---------- marquee ---------- */
.marquee-bar {
  background: repeating-linear-gradient(90deg, var(--yellow) 0 20px, var(--hot-pink) 20px 40px);
  border-bottom: 4px solid #000;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
}
.marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 22s linear infinite;
}
.marquee-track span {
  font-family: "VT323", monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: #000;
  text-shadow: 1px 1px 0 #fff;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ---------- header ---------- */
.page-header {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
}
.title-flicker {
  font-family: "VT323", monospace;
  font-size: clamp(2rem, 7vw, 3.6rem);
  margin: 0;
  letter-spacing: 1px;
  color: var(--yellow);
  -webkit-text-stroke: 2px #000;
  text-shadow:
    3px 3px 0 var(--hot-pink),
    6px 6px 0 var(--cyan);
}
.blink { animation: blinker 1s step-start infinite; }
@keyframes blinker { 50% { opacity: 0; } }

.subtitle {
  font-size: 1.1rem;
  color: #fff;
  background: var(--win-blue);
  display: inline-block;
  padding: 4px 14px;
  border: 2px outset #4d4dff;
  margin-top: 0.6rem;
}

.badge-row { margin-top: 0.8rem; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  background: var(--lime);
  color: #000;
  border: 2px solid #000;
  padding: 2px 10px;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 #000;
}
.badge-alt { background: var(--cyan); transform: rotate(2deg); }

/* ---------- jukebox ---------- */
.jukebox-bar {
  max-width: 1100px;
  margin: 0 auto 0.5rem;
  padding: 8px 16px;
  background: #0a0a12;
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.jukebox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  flex: 1 1 240px;
}
.jukebox-label strong { color: var(--yellow); }

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}
.eq i {
  display: block;
  width: 4px;
  background: var(--hot-pink);
  animation: eq-bounce 0.9s ease-in-out infinite;
}
.eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq i:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.eq i:nth-child(3) { height: 9px; animation-delay: 0.3s; }
.eq i:nth-child(4) { height: 16px; animation-delay: 0.45s; }
@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.jukebox-bar.playing .eq i { animation-play-state: running; }
.jukebox-bar:not(.playing) .eq i { animation-play-state: paused; opacity: 0.5; }

.retro-play-btn {
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(180deg, var(--hot-pink), #c2005f);
  color: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 6px 16px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.retro-play-btn:hover { background: linear-gradient(180deg, #ff5c9a, var(--hot-pink)); }
.retro-play-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.jukebox-embed {
  flex-basis: 100%;
  max-width: 400px;
}
.jukebox-embed iframe {
  width: 100%;
  border-radius: 6px;
  display: block;
}

/* ---------- layout ---------- */
.page-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  align-items: start;
}
@media (max-width: 800px) {
  .page-wrap { grid-template-columns: 1fr; }
}

/* ---------- windows-95-ish content boxes ---------- */
.win95-box {
  background: var(--win-gray);
  border: 3px solid #fff;
  border-right-color: #555;
  border-bottom-color: #555;
  box-shadow: 3px 3px 0 #000;
  margin-bottom: 1.2rem;
}
.win95-titlebar {
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: #fff;
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  padding: 4px 8px;
  letter-spacing: 0.5px;
}
.win95-body {
  padding: 14px 16px;
  background: #fdfdf5;
  font-size: 1.02rem;
  line-height: 1.5;
}
.win95-body p { margin: 0 0 0.8rem; }
.win95-body p:last-child { margin-bottom: 0; }

.arrow-right { display: inline-block; animation: point 1s ease-in-out infinite; color: var(--hot-pink); font-weight: bold; }
@keyframes point { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

.retro-list { list-style: none; margin: 0; padding: 0; }
.retro-list li {
  padding: 4px 0;
  border-bottom: 1px dashed #999;
}
.retro-list li:last-child { border-bottom: none; }
.year {
  display: inline-block;
  min-width: 120px;
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  color: #fff;
  background: var(--hot-pink);
  padding: 1px 6px;
  margin-right: 8px;
}

.link-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.link-list li { padding: 5px 0; }
.link-list a {
  color: #0000ee;
  text-decoration: underline;
  font-weight: bold;
}
.link-list a:visited { color: #551a8b; }
.link-list a:hover { color: var(--hot-pink); background: var(--yellow); }
.tag {
  font-family: "VT323", monospace;
  font-size: 0.95rem;
  background: #000;
  color: var(--lime);
  padding: 0 6px;
  margin-left: 6px;
}

.intro-flex {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.intro-flex p { flex: 1 1 260px; margin: 0; }

.polaroid {
  flex: 0 0 auto;
  background: #fff;
  padding: 8px 8px 6px;
  box-shadow: 3px 3px 0 #000, 0 0 0 1px #999;
  transform: rotate(-3deg);
}
.polaroid img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid #333;
}
.polaroid-caption {
  margin: 6px 0 0;
  text-align: center;
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  color: #333;
}

/* ---------- footer ---------- */
.page-footer {
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
  padding: 1.5rem 1rem 2.5rem;
}
.page-footer a { color: var(--yellow); }
.hit-counter {
  font-family: "VT323", monospace;
  background: #000;
  color: var(--lime);
  padding: 2px 8px;
  border: 2px inset #444;
  margin-left: 4px;
}
.webring { margin-top: 0.6rem; font-family: "VT323", monospace; font-size: 1.1rem; }
.pix { image-rendering: pixelated; vertical-align: middle; }

/* ============================================================
   TI-83 calculator
   ============================================================ */
.calc-col { display: flex; justify-content: center; }
.calc-sticky { position: sticky; top: 14px; }

.ti83 {
  width: 280px;
  background: linear-gradient(180deg, #5b5570, #3f3a52);
  border-radius: 14px 14px 26px 26px;
  padding: 14px 14px 18px;
  box-shadow: 0 10px 0 #221f30, 0 14px 20px rgba(0,0,0,0.5);
  border: 2px solid #2b2740;
}
.ti83-brand {
  font-family: Arial, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: #d8d4e6;
  text-align: right;
}
.ti83-model {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 1.1rem;
  color: #fff;
  text-align: right;
  margin-bottom: 6px;
}
.ti83-model .plus {
  background: var(--hot-pink);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 4px;
  margin-left: 3px;
  border-radius: 2px;
}

.ti83-screen-frame {
  background: #2b2740;
  border-radius: 6px;
  padding: 10px 10px 6px;
  box-shadow: inset 0 0 0 2px #17152280;
}
.ti83-screen {
  position: relative;
  background: #9fb28f;
  border: 3px solid #14130f;
  box-shadow: inset 2px 2px 6px rgba(0,0,0,0.5);
  aspect-ratio: 1 / 1;
  display: block;
}
#game {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.ti83-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(159, 178, 143, 0.92);
  font-family: "VT323", monospace;
  color: #14130f;
  font-size: 1.15rem;
  line-height: 1.3;
  padding: 6px;
}
.ti83-overlay.hidden { display: none; }
.ti83-overlay .small { font-size: 0.85rem; }

.ti83-screen-label {
  display: flex;
  justify-content: space-between;
  padding: 4px 2px 0;
  font-family: Arial, sans-serif;
  font-size: 0.5rem;
  color: #d8d4e6;
  letter-spacing: 0.5px;
}

.ti83-controls { margin-top: 10px; }
.ti83-toprow, .ti83-numrow {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.key {
  font-family: Arial, sans-serif;
  font-size: 0.55rem;
  font-weight: bold;
  color: #241f38;
  background: linear-gradient(180deg, #cfcbdd, #a9a4c0);
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 0 #1c1930, inset 0 1px 0 rgba(255,255,255,0.5);
  padding: 6px 2px;
  flex: 1;
  cursor: pointer;
  user-select: none;
}
.key:active { transform: translateY(2px); box-shadow: 0 0 0 #1c1930; }
.key-small { font-size: 0.5rem; padding: 5px 2px; }
.key-dark { background: linear-gradient(180deg, #4a4560, #35304a); color: #eae7f5; }
.key-num { font-size: 0.48rem; }

.dpad-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 10px auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
}
.dpad {
  background: radial-gradient(circle at 35% 30%, #6b6584, #2d2942);
  color: #d8d4e6;
  border-radius: 6px;
  font-size: 0.8rem;
}
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-center { grid-column: 2; grid-row: 2; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--hot-pink), #7a0059); color: #fff; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

.ti83-score {
  margin-top: 10px;
  text-align: center;
  font-family: "VT323", monospace;
  font-size: 1rem;
  color: var(--lime);
  background: #000;
  padding: 3px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.calc-hint {
  text-align: center;
  color: #fff;
  font-size: 0.8rem;
  max-width: 280px;
  margin: 10px auto 0;
}
.calc-hint kbd {
  background: #000;
  color: var(--yellow);
  padding: 1px 5px;
  font-family: "VT323", monospace;
}
