/* ============================================================
   WILLOW'S STRAWPAGE -- riso-zine / scrapbook design system
   Palette: red-light #c8493d, red-mid #9c332b, red-dark #5e1f1a,
            maroon #2c0f0d, cream #f5e3c9, accent #e2492f,
            gold #e8a33d (new -- for stickers/stamps), stripe #1c1210
   Type: Bungee (display), Special Elite (body/typewriter), VT323 (mono/retro)
   Signature: pinned scrapbook notes with scarf-stripe washi tape +
              star cursor trail. Extended here with torn-paper "diary"
              pages for the blog and postage-stamp date badges.
   ============================================================ */

:root {
  --red-light: #c8493d;
  --red-mid:   #9c332b;
  --red-dark:  #5e1f1a;
  --maroon:    #2c0f0d;
  --cream:     #f5e3c9;
  --cream-dim: #e9d3ae;
  --accent:    #e2492f;
  --gold:      #e8a33d;
  --stripe:    #1c1210;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #5e1f1a;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: 'Special Elite', 'Courier New', monospace;
  color: var(--maroon);
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, var(--red-light) 0%, var(--red-mid) 40%, var(--red-dark) 72%, var(--maroon) 100%);
  background-attachment: fixed;
  position: relative;
}

.page {
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

/* subtle custom-art texture layer, sits under the grain dots below */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background: url('bg.png') center / cover no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0.5px, transparent 0.5px),
    radial-gradient(circle at 60% 70%, #fff 0.5px, transparent 0.5px),
    radial-gradient(circle at 85% 20%, #fff 0.5px, transparent 0.5px);
  background-size: 3px 3px, 5px 5px, 4px 4px;
  z-index: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  z-index: 1001;
  transition: width 0.1s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
}

.landscape-warning {
  display: none;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--cream);
  font-size: 1.1rem;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .landscape-warning { display: block; }
  .page { display: none; }
}

.hero {
  text-align: center;
  padding: 3rem 1rem 1.25rem;
  position: relative;
  z-index: 1;
}

.hero-crest {
  display: block;
  margin: 0 auto 0.75rem;
  max-width: 130px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
}

.eyebrow {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  color: var(--cream-dim);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.eyebrow .blink-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow .blink-cursor { animation: none; }
}

.title-main, .title-sub {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: clamp(2.5rem, 9vw, 6rem);
  line-height: 1;
  margin: 0.05em 0;
  color: var(--cream);
  -webkit-text-stroke: 3px var(--maroon);
  text-shadow:
    3px 3px 0 var(--maroon),
    3px 3px 0 var(--maroon),
    7px 7px 0 rgba(0,0,0,0.25);
  letter-spacing: 0.03em;
}

.title-main { position: relative; }

.title-badge {
  position: absolute;
  top: -0.6em;
  right: -1.4em;
  font-size: 0.28em;
  background: var(--gold);
  color: var(--maroon);
  -webkit-text-stroke: 0;
  text-shadow: none;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  transform: rotate(12deg);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  font-family: 'VT323', monospace;
  letter-spacing: 0.05em;
  animation: wobble 3.2s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(12deg); }
  50%      { transform: rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .title-badge { animation: none; }
}

.landscape-note {
  font-size: 0.9rem;
  color: var(--cream-dim);
  opacity: 0.85;
  margin: 1rem 0 0;
}

.mood-sticker {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  color: var(--maroon);
  background: var(--cream);
  padding: 0.3rem 0.9rem;
  border-radius: 3px;
  transform: rotate(-2deg);
  box-shadow: 3px 4px 0 rgba(0,0,0,0.3);
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1.5rem 1.75rem;
  position: relative;
  z-index: 1;
}

.link-badge {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: var(--maroon);
  background: var(--cream);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.link-badge:hover {
  transform: translateY(-3px);
  box-shadow: 4px 6px 0 rgba(0,0,0,0.35);
  background: var(--accent);
  color: var(--cream);
}

.link-badge.is-current {
  background: var(--maroon);
  color: var(--gold);
}

.link-badge:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.stripe-divider {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--stripe) 0px, var(--stripe) 16px,
    var(--accent) 16px, var(--accent) 32px
  );
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

.squiggle-divider {
  position: relative;
  z-index: 1;
  height: 28px;
  background: var(--maroon);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 12.5 0 25 10 T 50 10 T 75 10 T 100 10 T 125 10 T 150 10 T 175 10 T 200 10 V20 H0 Z' fill='%23000'/%3E%3C/svg%3E") center / 200px 20px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 12.5 0 25 10 T 50 10 T 75 10 T 100 10 T 125 10 T 150 10 T 175 10 T 200 10 V20 H0 Z' fill='%23000'/%3E%3C/svg%3E") center / 200px 20px repeat-x;
}

.marquee-wrap {
  overflow: hidden;
  background: var(--maroon);
  padding: 0.55rem 0;
  position: relative;
  z-index: 1;
}

.marquee {
  display: flex;
  width: max-content;
  animation: scroll-left 24s linear infinite;
}

.marquee span {
  white-space: nowrap;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--cream);
  padding-right: 1rem;
  letter-spacing: 0.02em;
}

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

.marquee-reverse {
  animation-direction: reverse;
  animation-duration: 26s;
}

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

.art-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2vw;
  flex-wrap: wrap;
  padding: 2.25rem 2rem 2rem;
  position: relative;
  z-index: 1;
}

.char-frame {
  margin: 0;
  position: relative;
}

.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb199, var(--accent) 60%, var(--maroon) 100%);
  box-shadow: 0 3px 4px rgba(0,0,0,0.4);
  z-index: 2;
}

.char {
  display: block;
  max-width: 28vw;
  min-width: 180px;
  height: auto;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,0.4));
  transition: transform 0.25s ease;
}

.char-frame-mid .char { max-width: 24vw; }
.char-frame-left  { animation: float-left 4s ease-in-out infinite; }
.char-frame-mid   { animation: float-mid 4.6s ease-in-out infinite; animation-delay: 0.3s; }
.char-frame-right { animation: float-right 4.2s ease-in-out infinite; animation-delay: 0.6s; }

@keyframes float-left {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%      { transform: rotate(-2deg) translateY(-10px); }
}
@keyframes float-mid {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes float-right {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50%      { transform: rotate(2deg) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .char-frame-left, .char-frame-mid, .char-frame-right { animation: none; }
}

.char-frame:hover .char { transform: translateY(-6px) scale(1.02); }

.section-title {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: 1.4rem;
  color: var(--cream);
  -webkit-text-stroke: 1.5px var(--maroon);
  text-shadow: 2px 2px 0 var(--maroon);
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.95rem;
  margin: 0 0 1.75rem;
  font-style: italic;
}

.about-section {
  padding: 2.5rem 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

.about-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 4px;
  padding: 1.75rem 2rem;
  position: relative;
  box-shadow: 8px 10px 18px rgba(0,0,0,0.35);
  transform: rotate(-0.6deg);
}

.about-wrap::before {
  content: "☆";
  position: absolute;
  top: -18px;
  left: -18px;
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--maroon);
}

.about-wrap p {
  line-height: 1.7;
  margin: 0 0 1rem;
}

.about-wrap p:last-child { margin-bottom: 0; }

.about-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag-pill {
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  background: var(--maroon);
  color: var(--gold);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.notes-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2.25rem;
  padding: 2.5rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.note {
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 4px;
  padding: 0.6rem;
  width: 300px;
  position: relative;
  box-shadow:
    0 10px 0 -4px rgba(0,0,0,0.15),
    8px 10px 18px rgba(0,0,0,0.35);
  transform: rotate(var(--base-rot, 0deg));
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.note-tilt-left  { --base-rot: -2.5deg; }
.note-tilt-right { --base-rot: 2.5deg; }
.note-tall       { width: 340px; }

.note.tilting { transition: none; }

.note.popped { animation: pop-flash 0.3s ease; }
@keyframes pop-flash {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .note { transition: none; }
}

.tape {
  position: absolute;
  top: -14px;
  width: 64px;
  height: 24px;
  background: repeating-linear-gradient(
    45deg,
    var(--stripe) 0px, var(--stripe) 5px,
    var(--accent) 5px, var(--accent) 10px
  );
  opacity: 0.92;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35);
}

.tape-left  { left: -16px; transform: rotate(-40deg); }
.tape-right { right: -16px; transform: rotate(40deg); }

.note-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(44, 15, 13, 0.15);
  transition: transform 0.2s ease;
}

.note:hover .note-img { transform: scale(1.01); }

.note-heart { width: 320px; }

.heart-shape {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.95;
  background: var(--maroon);
  clip-path: path('M160,300 C40,220 0,140 0,80 C0,30 40,0 80,0 C115,0 145,20 160,55 C175,20 205,0 240,0 C280,0 320,30 320,80 C320,140 280,220 160,300 Z');
  overflow: hidden;
}

.heart-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scribbles-section {
  padding: 1rem 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.scribbles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.scribble-card {
  display: block;
  text-decoration: none;
  color: var(--maroon);
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 3px;
  padding: 1.1rem 1.2rem 1.4rem;
  position: relative;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scribble-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 7px 11px 0 rgba(0,0,0,0.35);
}

.scribble-card:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.scribble-stamp {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  color: var(--cream);
  background: var(--red-mid);
  padding: 0.1rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.scribble-card h3 {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.scribble-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  opacity: 0.85;
}

.scribble-more {
  text-align: center;
  margin-top: 2rem;
}

.hit-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: 'VT323', monospace;
}

.counter-caption {
  font-size: 0.9rem;
  color: var(--cream-dim);
  letter-spacing: 0.05em;
}

.counter-digits {
  background: var(--maroon);
  color: #ff9b6a;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.6), 0 0 6px rgba(226,73,47,0.4);
}

#star-trail {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

.links-section {
  text-align: center;
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 1;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.link-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 110px;
  padding: 1rem 0.5rem;
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 8px;
  text-decoration: none;
  color: var(--maroon);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  box-shadow: 5px 6px 0 rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-tile:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 6px 9px 0 rgba(0,0,0,0.35);
}

.link-tile:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.link-tile-icon {
  font-size: 1.8rem;
}

.link-tile-label {
  letter-spacing: 0.03em;
}

.reveal {
  animation: fade-up 0.8s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

.scribbles-grid .scribble-card:nth-child(1) { animation-delay: 0s; }
.scribbles-grid .scribble-card:nth-child(2) { animation-delay: 0.08s; }
.scribbles-grid .scribble-card:nth-child(3) { animation-delay: 0.16s; }

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 998;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--maroon);
  box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover { background: var(--accent); color: var(--cream); }

.back-to-top:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.site-footer {
  text-align: center;
  color: var(--cream-dim);
  opacity: 0.75;
  font-size: 0.8rem;
  padding: 1.5rem 0 2.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a:focus-visible,
.note:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.gallery-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--cream-dim);
  padding: 0 1.5rem;
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.gallery-item {
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 3px;
  padding: 0.6rem 0.6rem 0.9rem;
  position: relative;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.3);
  transform: rotate(var(--base-rot, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid .gallery-item:nth-child(3n+1) { --base-rot: -1.4deg; }
.gallery-grid .gallery-item:nth-child(3n+2) { --base-rot: 0.8deg; }
.gallery-grid .gallery-item:nth-child(3n)   { --base-rot: -0.6deg; }

.gallery-item:hover {
  transform: translateY(-5px) rotate(0deg);
  box-shadow: 7px 11px 0 rgba(0,0,0,0.35);
}

.gallery-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 2px;
  overflow: hidden;
}

.gallery-thumb-btn:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
}

.gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(44, 15, 13, 0.15);
}

.gallery-caption {
  margin: 0.6rem 0.2rem 0;
}

.gallery-caption h3 {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.gallery-caption p {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.75;
}

.fandom-tag {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 0.75rem;
  background: var(--red-mid);
  color: var(--cream);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 8, 7, 0.88);
}

.lightbox.is-open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 720px);
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: var(--cream);
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--maroon);
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
}

.lightbox-close:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(245, 227, 201, 0.9);
  color: var(--maroon);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
}

.lightbox-prev { left: -22px; }
.lightbox-next { right: -22px; }

.lightbox-nav:hover { background: var(--gold); }

.lightbox-nav:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

.guestbook-intro {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--cream-dim);
  padding: 0 1.5rem;
  line-height: 1.6;
}

.guestbook-embed {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.5rem;
  background: var(--maroon);
  color: var(--cream-dim);
  border: 2px dashed var(--gold);
  border-radius: 4px;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  line-height: 1.6;
}

.guestbook-embed a { color: var(--gold); }

.guestbook-form {
  max-width: 480px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.guestbook-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.guestbook-form-row label {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
}

.guestbook-form-row input,
.guestbook-form-row textarea {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 3px;
  background: var(--cream);
  color: var(--maroon);
  box-shadow: inset 0 0 0 2px rgba(44,15,13,0.15);
  resize: vertical;
}

.guestbook-form-row input:focus-visible,
.guestbook-form-row textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.guestbook-submit {
  display: block;
  margin: 0 auto;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: var(--maroon);
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.guestbook-submit:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 0 rgba(0,0,0,0.35);
  background: var(--accent);
  color: var(--cream);
}

.guestbook-submit:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.guestbook-empty {
  text-align: center;
  color: var(--cream-dim);
  font-style: italic;
  grid-column: 1 / -1;
}

.guestbook-note.is-new { animation: pop-flash 0.4s ease; }
.guestbook-wall {
  columns: 260px;
  column-gap: 1.75rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.guestbook-note {
  break-inside: avoid;
  margin: 0 0 1.75rem;
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  border-radius: 3px;
  padding: 1rem 1.1rem 1.2rem;
  position: relative;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.3);
  transform: rotate(var(--base-rot, 0deg));
  transition: transform 0.2s ease;
}

.guestbook-wall .guestbook-note:nth-child(3n+1) { --base-rot: -1.6deg; }
.guestbook-wall .guestbook-note:nth-child(3n+2) { --base-rot: 1deg; }
.guestbook-wall .guestbook-note:nth-child(3n)   { --base-rot: -0.4deg; }

.guestbook-note:hover { transform: translateY(-4px) rotate(0deg); }

.guestbook-note p {
  margin: 0 0 0.6rem;
  line-height: 1.55;
}

.guestbook-signoff {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  color: var(--red-mid);
  text-align: right;
}

.blog-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--cream-dim);
  padding: 0 1.5rem;
  line-height: 1.6;
}

.diary-list {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  position: relative;
  z-index: 1;
}

.diary-page {
  background: var(--cream);
  background-image: linear-gradient(var(--cream), var(--cream-dim));
  padding: 1.75rem 2rem 2.25rem;
  position: relative;
  box-shadow: 8px 10px 18px rgba(0,0,0,0.35);
  transform: rotate(var(--base-rot, 0deg));
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 96%,
    97% 100%, 94% 96%, 91% 100%, 88% 96%, 85% 100%, 82% 96%,
    79% 100%, 76% 96%, 73% 100%, 70% 96%, 67% 100%, 64% 96%,
    61% 100%, 58% 96%, 55% 100%, 52% 96%, 49% 100%, 46% 96%,
    43% 100%, 40% 96%, 37% 100%, 34% 96%, 31% 100%, 28% 96%,
    25% 100%, 22% 96%, 19% 100%, 16% 96%, 13% 100%, 10% 96%,
    7% 100%, 4% 96%, 0% 100%
  );
}

.diary-page:nth-child(odd)  { --base-rot: -0.6deg; }
.diary-page:nth-child(even) { --base-rot: 0.6deg; }

.diary-stamp {
  position: absolute;
  top: -14px;
  right: 1.5rem;
  background: var(--red-mid);
  color: var(--cream);
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  transform: rotate(4deg);
  box-shadow: 3px 4px 0 rgba(0,0,0,0.3);
}

.diary-page h2 {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: 1.3rem;
  margin: 0.25rem 0 0.9rem;
  line-height: 1.3;
}

.diary-page p {
  line-height: 1.7;
  margin: 0 0 1rem;
}

.diary-page p:last-of-type { margin-bottom: 1rem; }

.diary-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.back-home-link {
  display: block;
  text-align: center;
  margin: 0 auto 2.5rem;
  color: var(--cream);
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .notes-row { flex-direction: column; align-items: center; }
  .note, .note-tall, .note-heart { width: 90%; max-width: 400px; }
  .diary-page { padding: 1.4rem 1.3rem 1.9rem; }
}

/* ============================================================
   OVERHAUL PACK -- mixtape player, glitch text, magnetic UI,
   parallax, scroll-reveal, easter egg confetti
   ============================================================ */

/* ---------- GLITCH HOVER ON TITLE BADGE ---------- */
.title-badge {
  cursor: pointer;
}

.title-badge:hover,
.title-badge:focus-visible {
  animation: wobble 3.2s ease-in-out infinite, glitch-badge 0.25s steps(2) 2;
}

@keyframes glitch-badge {
  0%   { transform: rotate(12deg) translate(0, 0); }
  25%  { transform: rotate(12deg) translate(-2px, 1px); }
  50%  { transform: rotate(12deg) translate(2px, -1px); }
  75%  { transform: rotate(12deg) translate(-1px, 1px); }
  100% { transform: rotate(12deg) translate(0, 0); }
}

/* title text itself gets a chromatic-aberration glitch on hover */
.title-main:hover, .title-sub:hover {
  animation: glitch-text 0.35s steps(3) 1;
}

@keyframes glitch-text {
  0% {
    text-shadow: 3px 3px 0 var(--maroon), 3px 3px 0 var(--maroon), 7px 7px 0 rgba(0,0,0,0.25);
  }
  30% {
    text-shadow: -3px 0 0 var(--gold), 3px 0 0 var(--red-mid), 3px 3px 0 var(--maroon), 7px 7px 0 rgba(0,0,0,0.25);
  }
  60% {
    text-shadow: 3px 0 0 var(--gold), -3px 0 0 var(--red-mid), 3px 3px 0 var(--maroon), 7px 7px 0 rgba(0,0,0,0.25);
  }
  100% {
    text-shadow: 3px 3px 0 var(--maroon), 3px 3px 0 var(--maroon), 7px 7px 0 rgba(0,0,0,0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-badge:hover, .title-badge:focus-visible { animation: none; }
  .title-main:hover, .title-sub:hover { animation: none; }
}

/* ---------- AMBIENT GRADIENT BLOBS BEHIND HERO ---------- */
.blob-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.blob-1 {
  width: 38vw; height: 38vw;
  top: -8vw; left: -6vw;
  background: var(--gold);
  animation: drift-1 22s ease-in-out infinite;
}

.blob-2 {
  width: 30vw; height: 30vw;
  bottom: -5vw; right: -4vw;
  background: var(--accent);
  animation: drift-2 26s ease-in-out infinite;
}

.blob-3 {
  width: 24vw; height: 24vw;
  top: 40vh; left: 60vw;
  background: var(--red-light);
  animation: drift-3 19s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4vw, 6vw) scale(1.15); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-5vw, -4vw) scale(1.1); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-3vw, 5vw) scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .blob-1, .blob-2, .blob-3 { animation: none; }
}

@media (max-width: 700px) {
  .blob-field { display: none; }
}

/* ---------- SCROLL-REVEAL (IntersectionObserver driven) ----------
   .reveal-io starts hidden and only animates in once it enters the
   viewport. If JS never runs (blocked/errors), the .reveal-io-fallback
   class keeps content visible via a plain CSS animation identical to
   the old .reveal -- so nothing can get stuck invisible. */
/* .reveal-io is fully visible by default -- JS must explicitly opt an
   element into the hidden-until-scrolled state via .js-ready. That way,
   if script.js never runs, every .reveal-io section is just... visible,
   the same as any other content on the page. */
.reveal-io.js-ready {
  opacity: 0;
  transform: translateY(36px);
}

.reveal-io.js-ready.in-view {
  animation: fade-up 0.7s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-io.js-ready { opacity: 1; transform: none; }
  .reveal-io.js-ready.in-view { animation: none; }
}

/* ---------- MAGNETIC HOVER (link badges + tiles) ---------- */
.link-badge, .link-tile, .scribble-card {
  will-change: transform;
}

/* JS sets --mx/--my (pointer offset) and toggles .is-magnetic;
   pure decoration, layout is unaffected if JS never runs */
.is-magnetic {
  transition: transform 0.12s ease-out;
  transform: translate(var(--mx, 0px), var(--my, 0px));
}

/* ---------- PARALLAX ON CHARACTER ART ---------- */
.art-row {
  perspective: 1200px;
}

.char-frame {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ---------- MIXTAPE PLAYER (signature element) ----------
   A pinned floating cassette. Ships fully visible and usable even if
   script.js errors after this point -- default state (paused icon,
   "add a tape!" label) is baked into the HTML, not generated by JS. */
.mixtape {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  width: 220px;
  background: linear-gradient(155deg, #3a1512, var(--maroon) 55%, #1c0908);
  border-radius: 10px;
  padding: 0.85rem 0.9rem 0.7rem;
  box-shadow: 4px 6px 0 rgba(0,0,0,0.4), 0 0 0 2px rgba(232,163,61,0.25) inset;
  font-family: 'VT323', monospace;
  color: var(--cream);
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mixtape:active { cursor: grabbing; }

.mixtape.is-dragging {
  transition: none;
  box-shadow: 6px 10px 0 rgba(0,0,0,0.45), 0 0 0 2px rgba(232,163,61,0.35) inset;
}

.mixtape-window {
  background: #150807;
  border-radius: 5px;
  padding: 0.6rem 0.65rem 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(232,163,61,0.35), inset 0 3px 8px rgba(0,0,0,0.6);
  margin-bottom: 0.6rem;
}

.mixtape-reels {
  display: flex;
  justify-content: space-between;
  padding: 0 0.4rem;
  margin-bottom: 0.4rem;
}

.mixtape-reel {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--maroon) 0 3px, transparent 3.5px),
    repeating-conic-gradient(#0000 0deg 14deg, rgba(245,227,201,0.5) 14deg 18deg);
  box-shadow: 0 0 0 2px rgba(245,227,201,0.3);
}

.mixtape.is-playing .mixtape-reel {
  animation: spin-reel 2.2s linear infinite;
}

@keyframes spin-reel {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mixtape.is-playing .mixtape-reel { animation: none; }
}

.mixtape-viz {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 16px;
  margin: 0 0 0.5rem;
}

.viz-bar {
  width: 4px;
  height: 100%;
  background: linear-gradient(to top, var(--gold), var(--accent));
  border-radius: 2px;
  transform: scaleY(0.12);
  transform-origin: bottom;
  transition: transform 0.09s linear;
}

@media (prefers-reduced-motion: reduce) {
  .viz-bar { transition: none; transform: scaleY(0.12) !important; }
}

.mixtape-label {
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--gold);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mixtape-progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(245,227,201,0.15);
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 0.45rem;
  box-shadow: inset 0 0 0 1px rgba(232,163,61,0.25);
}

.mixtape-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  border-radius: 999px;
  pointer-events: none;
}

/* wider hit target than the visible bar, easier to grab on mobile */
.mixtape-progress::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  bottom: -8px;
}

.mixtape-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--cream-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.mixtape-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mixtape-play {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--maroon);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mixtape-play:hover { background: var(--accent); color: var(--cream); }

.mixtape-play:focus-visible,
.mixtape-volume:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

.mixtape-volume {
  flex: 1 1 auto;
  accent-color: var(--gold);
}

.mixtape-status {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--cream-dim);
  text-align: center;
  opacity: 0.8;
}

.mixtape.is-minimized .mixtape-window,
.mixtape.is-minimized .mixtape-controls {
  display: none;
}

.mixtape-toggle-min {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
}

.mixtape-toggle-min:focus-visible {
  outline: 2px solid var(--cream);
}

@media (max-width: 560px) {
  .mixtape { left: 0.6rem; bottom: 0.6rem; width: 180px; }
}

/* ---------- EASTER EGG TOAST ---------- */
.egg-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 1002;
  background: var(--gold);
  color: var(--maroon);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.egg-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- GENERAL 3D HOVER-TILT FOR HOVERABLE IMAGES ----------
   Applied via the .tilt-3d class (see script.js "generic 3D tilt on
   hoverable images"). Works on any element -- gallery thumbnails,
   character art, etc. JS drives the live rotateX/rotateY/scale while
   the mouse moves over the element; this block just supplies the
   resting transition + a CSS-only fallback for touch (:active) so
   tapping still gives a little "pop" even without mousemove. */
.tilt-3d {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, filter 0.35s ease;
  will-change: transform;
}

.tilt-3d.is-tilting {
  transition: none;
  z-index: 6;
}

.tilt-3d:active {
  transform: perspective(700px) scale(1.06) rotateX(3deg) rotateY(-3deg);
}

@media (prefers-reduced-motion: reduce) {
  .tilt-3d,
  .tilt-3d.is-tilting,
  .tilt-3d:active {
    transition: none;
    transform: none;
  }
}

/* ---------- CHARACTERS PAGE ---------- */
.characters-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--cream-dim);
  padding: 0 1.5rem;
  line-height: 1.6;
}

.character-list {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.character-card {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  text-align: left;
}

.character-portrait-btn {
  flex: 0 0 auto;
  display: block;
  width: min(38vw, 240px);
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: visible;
  position: relative;
}

.character-portrait-btn:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
  border-radius: 8px;
}

.character-portrait {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.4));
}

.character-text {
  flex: 1 1 320px;
  min-width: 220px;
}

.character-name {
  font-family: 'Bungee', 'VT323', monospace;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--cream);
  -webkit-text-stroke: 1.5px var(--maroon);
  text-shadow: 2px 2px 0 var(--maroon);
  margin: 0 0 0.6rem;
  letter-spacing: 0.03em;
  text-align: left;
}

.character-bio {
  color: var(--cream-dim);
  line-height: 1.75;
  margin: 0;
  text-align: left;
}

@media (max-width: 720px) {
  .character-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .character-portrait-btn { width: 55vw; max-width: 220px; }
}

/* ---------- "MEET THE CHARACTERS" CTA BUTTON (art page) ---------- */
.cta-row {
  text-align: center;
  margin: -1rem auto 2.5rem;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Bungee', 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--maroon);
  background: var(--gold);
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  box-shadow: 4px 5px 0 rgba(0,0,0,0.35);
  transform: rotate(-1deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cta-button:hover {
  transform: rotate(-1deg) translateY(-3px) scale(1.03);
  box-shadow: 5px 8px 0 rgba(0,0,0,0.4);
  background: var(--accent);
  color: var(--cream);
}

.cta-button:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}
