/* josephxanderkirby.com — page shell: black xerox wall, scrawled masthead,
   marquee, footer, cursor/party effects. Pinned-item styles live in items.css.
   Aesthetic: punk zine collage — black ground, blood red scrawl, acid-olive
   hand-drawn pattern frames, newsprint scraps, typewriter text. */

:root {
  --ink: #14120e;
  --wall: #0d0c0a;
  --paper: #f2ecdc;
  --red: #e01f1f;
  --red-deep: #4a0805;
  --acid: #cfc23a;
  --font-display: 'Arial Black', Impact, sans-serif;
  --font-scrawl: 'Segoe Print', 'Comic Sans MS', cursive;
  --font-mono: 'Courier New', monospace;
  /* grayscale film grain */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* decor strips and edge text bleed past the board on purpose; clip, don't scroll */
  overflow-x: hidden;
  color: var(--paper);
  font-family: var(--font-mono);
  background-image:
    var(--noise),
    /* sparse hand-drawn wall doodles */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cpath d='M24 24 l14 14 M38 24 l-14 14' stroke='%23cfc23a' stroke-width='3' opacity='0.12'/%3E%3Ccircle cx='128' cy='118' r='4' fill='%23e01f1f' opacity='0.16'/%3E%3C/svg%3E");
  background-color: var(--wall);
}

a { color: var(--red); }
a:visited { color: #a1341f; }
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- masthead ---------- */
.masthead {
  position: relative;
  padding: 30px 14px 0;
  text-align: center;
  background-color: var(--wall);
  background-image: var(--noise);
  border-bottom: 5px solid var(--red);
  overflow: hidden;
}

/* TLOP-style repeated name echoing behind the masthead */
.echo-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 8px;
  line-height: 2.1;
  color: rgba(224, 31, 31, 0.13);
  text-align: center;
  pointer-events: none;
}

/* pasted polaroid in the masthead */
.paste-photo { display: none; }
@media (min-width: 760px) {
  .paste-photo {
    display: block;
    position: absolute;
    right: 3%;
    top: 130px;
    width: 128px;
    margin: 0;
    padding: 8px 8px 4px;
    background: #fff;
    border: 1px solid #888;
    box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.55);
    transform: rotate(7deg);
    z-index: 2;
  }
  .paste-photo img { width: 100%; display: block; }
  .paste-photo figcaption {
    font-family: var(--font-scrawl);
    color: var(--red);
    font-size: 0.78rem;
    text-align: center;
    margin: 2px 0 4px;
  }
}

/* imageboard-style jump bar */
.chan-bar {
  position: relative;
  background: #ffffee;
  border-top: 2px solid #800000;
  margin: 0 -14px;
  padding: 3px 6px;
}
.chan-bar button {
  background: none;
  border: none;
  color: #800000;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.68rem;
  cursor: pointer;
  padding: 1px 2px;
}
.chan-bar button:hover { color: var(--red); text-decoration: underline; }

/* xeroxed halftone texture framed by zigzags: masthead band + wall strips */
.halftone-band, .decor-strip {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10'%3E%3Cpath d='M0 8 L4.5 2 L9 8 L13.5 2 L18 8' fill='none' stroke='%23cfc23a' stroke-width='2.2'/%3E%3C/svg%3E") left top repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10'%3E%3Cpath d='M0 8 L4.5 2 L9 8 L13.5 2 L18 8' fill='none' stroke='%23cfc23a' stroke-width='2.2'/%3E%3C/svg%3E") left bottom repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='3' cy='3' r='2.2' fill='%23f2ecdc' fill-opacity='0.5'/%3E%3Ccircle cx='9' cy='9' r='1.3' fill='%23f2ecdc' fill-opacity='0.3'/%3E%3C/svg%3E") center / 12px 12px repeat,
    #16130d;
}
.halftone-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  bottom: 46px;
}
.decor-strip { display: none; }
@media (min-width: 760px) {
  .decor-strip {
    display: block;
    position: absolute;
    left: -30px;
    right: -30px;
    height: 90px;
    opacity: 0.85;
    pointer-events: none;
  }
  .decor-strip.s1 { top: 140px; transform: rotate(-1deg); }
  .decor-strip.s2 { top: 650px; transform: rotate(0.8deg); }
  .decor-strip.s3 { top: 1160px; transform: rotate(-0.6deg); }
}

/* repeated name running down the wall edges */
.edge-text { display: none; }
@media (min-width: 760px) {
  .edge-text {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    overflow: hidden;
    writing-mode: vertical-rl;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 4px;
    color: rgba(224, 31, 31, 0.22);
    pointer-events: none;
  }
  .edge-text.left { left: -6px; }
  .edge-text.right { right: -6px; transform: rotate(180deg); color: rgba(207, 194, 58, 0.2); }
}

.construction {
  position: relative;
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  background: #000;
  color: var(--acid);
  border: 2px dashed var(--acid);
  font-weight: bold;
  font-size: 0.78rem;
  letter-spacing: 1px;
}

#bigName {
  position: relative;
  margin: 4px 0 30px;
  font-family: var(--font-display);
}
.word {
  display: block;
  font-size: clamp(2.4rem, 9vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: 0.05em;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--red-deep);
}
.word:nth-child(odd) { transform: rotate(-4deg); }
.word:nth-child(even) { transform: rotate(2.5deg); }
.letter { display: inline-block; }

.marquee {
  position: relative;
  overflow: hidden;
  margin: 0 -14px;
  background: var(--red);
  border-top: 4px solid #000;
}
.marquee span {
  display: inline-block;
  white-space: nowrap;
  padding: 7px 0;
  color: #fdf6e4;
  font-weight: bold;
  font-size: 0.85rem;
  animation: marquee-scroll 32s linear infinite;
}
@keyframes marquee-scroll { to { transform: translateX(-50%); } }
.marquee.acid { margin: 0; background: var(--acid); border-top: 4px solid #000; border-bottom: 4px solid #000; }
.marquee.acid span { color: #0d0c0a; animation-direction: reverse; }

/* ---------- the wall ---------- */
.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 14px 80px;
}
@media (min-width: 760px) {
  .board {
    display: block;
    position: relative;
    height: 1500px;
    padding: 0;
  }
}

/* ---------- footer ---------- */
.strip {
  background: #070605;
  text-align: center;
  padding: 28px 14px 32px;
  border-top: 5px solid var(--acid);
}
#linkFarm {
  max-width: 900px;
  margin: 0 auto 16px;
  font-size: 0.64rem;
  line-height: 1.9;
  color: #55506a;
}
.farm-link {
  background: none;
  border: none;
  color: #8fb0ff;
  text-decoration: underline;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.64rem;
  cursor: pointer;
  padding: 0 2px;
}
.farm-link:hover { color: #fff; }
#footerBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.webring { font-size: 0.82rem; color: #b0a88c; }
.webring button, .controls button {
  background: #000;
  color: var(--acid);
  border: 2px outset #4a4430;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 0.78rem;
  padding: 5px 10px;
  margin: 4px 2px;
  cursor: pointer;
}
.webring button:hover, .controls button:hover { color: var(--paper); background: var(--red); }
.webring button:active, .controls button:active { border-style: inset; }
.fineprint { font-size: 0.7rem; color: #7d7460; margin: 16px 0 0; }
.noscript { background: var(--wall); color: var(--paper); text-align: center; padding: 14px; margin: 0; }

/* ---------- toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) scale(0.9);
  background: #000;
  color: var(--red);
  border: 2px solid var(--red);
  font-weight: bold;
  font-size: 0.85rem;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 999;
}
#toast.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---------- cursor sparkles + confetti ---------- */
#sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 998;
}
.spark {
  position: absolute;
  font-size: 14px;
  animation: spark-fall 0.9s ease-in forwards;
}
@keyframes spark-fall {
  to { transform: translateY(46px) rotate(140deg); opacity: 0; }
}
.confetti {
  position: fixed;
  top: -20px;
  width: 9px;
  height: 15px;
  z-index: 997;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); }
}

/* ---------- party mode (konami) ---------- */
body.party { animation: party-hue 3s linear infinite; }
@keyframes party-hue { to { filter: hue-rotate(360deg); } }
body.party .pin-item { animation: party-dance 0.5s infinite alternate; }
@keyframes party-dance {
  from { transform: rotate(var(--tilt, 0deg)); }
  to { transform: rotate(calc(var(--tilt, 0deg) + 4deg)) scale(1.02); }
}

.blink { animation: blink 1.1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .marquee span { animation: none; }
}
