/* ============================================================
   nalais.gay — EARLY-2000s PRIDE stylesheet
   GeoCities-era personal homepage: beveled borders, Comic Sans,
   tiled starry-glitter background, rainbow dividers, marquee,
   hit counter — all drenched in pride. Sparkles stay ON.
   ============================================================ */

/* ---------- Palette ---------- */
:root {
  --red:    #ff0000;
  --orange: #ff8c00;
  --yellow: #ffe600;
  --green:  #00c020;
  --blue:   #1e5cff;
  --purple: #9b26ff;
  --pink:   #ff2fb0;
  --cyan:   #00d0d0;

  --ink:     #17121f;
  --ink-soft:#3a2f4a;
  --muted:   #6b5f7a;

  --panel:   #ffffff;
  --panel-2: #fff6fc;
  --cream:   #fffdf5;

  --link:    #0022cc;
  --visited: #7a1fb0;
  --hot:     #ff1493;

  --rainbow: linear-gradient(90deg,#ff0000,#ff8c00,#ffe600,#00c020,#1e5cff,#9b26ff,#ff2fb0);
  --font:    "Comic Sans MS", "Comic Neue", "Chalkboard SE", Verdana, Geneva, sans-serif;
  --font-body: Verdana, Geneva, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: #000; }

body {
  margin: 0;
  padding: 18px 10px 34px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  /* Classic black starfield, but the "stars" are rainbow glitter */
  background:
    radial-gradient(1.4px 1.4px at 20px 30px,  #fff,     transparent),
    radial-gradient(1.6px 1.6px at 120px 80px, #ffe600,  transparent),
    radial-gradient(1.5px 1.5px at 210px 160px,#ff2fb0,  transparent),
    radial-gradient(1.3px 1.3px at 90px 200px, #1e5cff,  transparent),
    radial-gradient(1.7px 1.7px at 260px 40px, #00c020,  transparent),
    radial-gradient(1.5px 1.5px at 300px 220px,#9b26ff,  transparent),
    radial-gradient(1.4px 1.4px at 160px 120px,#ff8c00,  transparent),
    #05010f;
  background-size: 320px 260px, 320px 260px, 320px 260px, 320px 260px, 320px 260px, 320px 260px, 320px 260px, auto;
  animation: starfield 8s linear infinite;
}
@keyframes starfield {
  to { background-position: 0 260px, 0 260px, 0 260px, 0 260px, 0 260px, 0 260px, 0 260px, 0 0; }
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--visited); }
a:hover { color: var(--hot); background: #fff7bd; }
img { border: 0; max-width: 100%; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }

/* Blink + marquee — the period essentials */
.blink { animation: blink 1s steps(1) infinite; font-weight: bold; }
@keyframes blink { 50% { opacity: 0; } }

.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 2px groove #ffd6f0; border-bottom: 2px groove #ffd6f0;
  background: #1a0033; color: #ffe600; font-family: var(--font);
  padding: 4px 0; font-size: 13px; font-weight: bold;
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 16s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Rainbow horizontal rule — the classic animated GIF divider, in CSS */
.rainbow-hr {
  height: 6px; border: 0; margin: 14px 0;
  background: var(--rainbow); background-size: 200% 100%;
  animation: rainbow-move 4s linear infinite;
  box-shadow: 0 0 0 1px #000 inset;
}
@keyframes rainbow-move { to { background-position: 200% 0; } }

/* ---------- Outer page frame (a big beveled table) ---------- */
.page {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  background: var(--cream);
  border: 4px ridge #ff64c6;
  box-shadow: 0 0 0 2px #000, 6px 6px 0 #000;
}

/* ---------- Banner ---------- */
.banner {
  position: relative;
  text-align: center;
  padding: 16px 14px 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,47,176,.5), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(30,92,255,.5), transparent 40%),
    repeating-linear-gradient(45deg, #10002a 0 10px, #1a0033 10px 20px);
  border-bottom: 3px ridge #ffe600;
}
.banner-link { display: inline-block; text-decoration: none; }
.banner-link:hover { background: transparent; }
.banner-logo {
  max-width: min(540px, 90%);
  margin: 4px auto;
  filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 14px rgba(255,47,176,.6));
  animation: logo-bob 3s ease-in-out infinite;
}
@keyframes logo-bob { 50% { transform: translateY(-5px); } }
.banner-title {
  font-family: var(--font);
  font-size: 52px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 1px;
  line-height: 1.05;
  color: #fff;
  background: var(--rainbow);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-move 4s linear infinite;
  text-shadow: 3px 3px 0 rgba(0,0,0,.35);
  transform: skew(-6deg);
}
.banner-sub {
  margin-top: 8px;
  color: #ffe600;
  font-family: var(--font);
  font-size: 15px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
}
.banner-flags { margin-top: 6px; font-size: 22px; letter-spacing: 4px; }

/* ---------- Top nav (beveled button row) ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #7a7a7a;
}
.navbar a {
  display: inline-block;
  padding: 4px 14px;
  color: #000;
  font-family: var(--font);
  font-weight: bold;
  font-size: 13px;
  text-decoration: none;
  background: linear-gradient(#f6f6f6, #d2d2d2);
  border: 3px outset #eee;
}
.navbar a:visited { color: #000; }
.navbar a:hover {
  color: #000;
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-move 3s linear infinite;
  border-style: inset;
}
.navbar a.is-active {
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-move 3s linear infinite;
  border-style: inset;
  color: #000;
  text-shadow: 0 0 3px #fff;
}

/* ---------- Layout ---------- */
.columns { display: flex; align-items: flex-start; }
.sidebar {
  width: 200px;
  flex: 0 0 200px;
  padding: 14px 12px;
  background: repeating-linear-gradient(0deg, #fff 0 22px, #fff6fc 22px 44px);
  border-right: 3px ridge #ffb3e6;
}
.content { flex: 1; min-width: 0; padding: 16px 18px 22px; background: var(--panel); }

/* ---------- Sidebar boxes ---------- */
.side-box {
  margin-bottom: 16px;
  background: #fff;
  border: 3px outset #ffd0ee;
}
.side-title {
  padding: 4px 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-move 4s linear infinite;
  border-bottom: 2px groove #fff;
}
.side-body { padding: 9px 10px; }

/* Quick facts */
.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: flex; gap: 6px; padding: 5px 0;
  border-bottom: 1px dashed #e3b8d8; font-size: 12px;
}
.facts li:last-child { border-bottom: 0; }
.facts .fact-key { color: var(--purple); min-width: 74px; font-weight: bold; }
.facts .fact-val { color: var(--ink); }

/* Sidebar avatar — beveled photo frame */
.side-avatar {
  display: block; width: 100%;
  aspect-ratio: 1 / 1; object-fit: cover;
  border: 4px ridge #ff64c6;
  background: #fff;
}

/* Socials */
.socials { display: flex; flex-direction: column; gap: 5px; }
.social-link {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  border: 2px outset #eee;
  background: linear-gradient(#fff, #ffe9f7);
  color: #000; font-weight: bold; font-size: 12px; text-decoration: none;
}
.social-link:visited { color: #000; }
.social-link:hover { border-style: inset; background: #fff7bd; color: #000; }
.social-link .ico { font-size: 15px; }
.social-link .handle { color: var(--muted); font-weight: normal; margin-left: auto; font-size: 11px; }

/* ---------- Headings / sections ---------- */
h1, h2, h3 { font-family: var(--font); color: var(--purple); }

.hero { text-align: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px double #ff9ede; }
.hero h1 {
  font-size: 26px; margin: 4px 0;
  color: #fff;
  background: var(--rainbow); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: rainbow-move 4s linear infinite;
  text-shadow: 2px 2px 0 rgba(0,0,0,.25);
}
.hero p { color: var(--ink-soft); font-size: 14px; margin: 0; font-family: var(--font); }

.section { margin: 18px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section h2, .section-head h2, .page-head h1 {
  font-family: var(--font);
  font-size: 16px;
  margin: 0 0 10px;
  padding: 5px 10px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-move 4s linear infinite;
  border: 2px outset #ffd6f0;
}
.section-head h2 { flex: 1; }
.more-link { font-size: 12px; white-space: nowrap; font-weight: bold; }
.page-head { margin-bottom: 14px; }
.page-head p { color: var(--ink-soft); font-family: var(--font); margin: 8px 2px 0; }

/* ---------- Prose ---------- */
.prose { font-size: 13px; line-height: 1.75; color: var(--ink); }
.prose p { margin: 0 0 12px; }
.prose h2 { font-size: 18px; color: var(--purple); margin: 18px 0 6px; }
.prose h3 { font-size: 15px; color: var(--pink); margin: 14px 0 5px; }
.prose a { color: var(--link); text-decoration: underline; }
.prose a:hover { color: var(--hot); }
.prose ul { margin: 0 0 12px; padding-left: 22px; list-style: none; }
.prose ul li::before { content: "🌈 "; }
.prose ol { margin: 0 0 12px; padding-left: 26px; }
.prose li { margin: 3px 0; }
.prose code { background: #ffeaf6; border: 1px solid #ff9ede; padding: 1px 4px; font-family: "Courier New", monospace; font-size: 12px; }
.prose blockquote {
  margin: 0 0 12px; padding: 6px 12px;
  background: #fff6fc; border-left: 5px solid var(--pink);
  font-style: italic; color: #4a3a52;
}
.prose img { border: 4px ridge #ff9ede; padding: 3px; background: #fff; margin: 12px 0; }

/* ---------- Card ---------- */
.card {
  background: #fff;
  border: 3px outset #ffd0ee;
  padding: 14px 16px;
}

/* ---------- Conventions ---------- */
.con-list { display: flex; flex-direction: column; gap: 12px; }
.con-card {
  display: flex; gap: 12px; padding: 10px;
  background: linear-gradient(#ffffff, #fff4fb);
  border: 3px outset #ffd0ee;
}
.con-card:hover { border-color: #ffe600; background: #fffbe8; }
.con-photo {
  flex: 0 0 108px; width: 108px; height: 108px; object-fit: cover;
  border: 3px ridge #ff64c6; background: #fff;
}
.con-photo-ph {
  flex: 0 0 108px; width: 108px; height: 108px;
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  border: 3px ridge #ff64c6;
  background: repeating-linear-gradient(45deg, #ffe9f7 0 8px, #fff 8px 16px);
}
.con-info { flex: 1; min-width: 0; }
.con-info h3 { margin: 2px 0 4px; font-size: 17px; color: var(--purple); }
.con-meta { color: var(--muted); font-size: 12px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; }
.con-meta .badge-year {
  color: #000; font-weight: bold; font-size: 11px; padding: 1px 8px;
  border: 2px outset #fff;
  background: var(--rainbow); background-size: 200% 100%; animation: rainbow-move 4s linear infinite;
}
.con-upcoming .badge-year { background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.con-notes { color: var(--ink); font-size: 12.5px; }

/* ---------- Photo grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.photo-item {
  margin: 0; background: #fff;
  border: 4px ridge #ff9ede; padding: 3px;
}
.photo-item:hover { border-color: #ffe600; }
.photo-item img { width: 100%; height: 165px; object-fit: cover; display: block; cursor: zoom-in; border: 1px solid #d9a8cd; }
.photo-grid.small .photo-item img { height: 135px; }
.photo-item figcaption { padding: 5px 4px 2px; font-size: 12px; font-family: var(--font); }
.photo-item figcaption strong { display: block; color: var(--purple); }
.photo-item figcaption .muted { font-size: 10.5px; font-family: var(--font-body); }

/* ---------- Public forms (guestbook) ---------- */
.gb-form label, .gb-form .field-label { display: block; margin-bottom: 12px; font-family: var(--font); font-weight: bold; font-size: 13px; color: var(--purple); }
.gb-form .req { color: var(--red); }
.gb-form input[type=text], .gb-form textarea, .gb-form select {
  width: 100%; margin-top: 5px; background: #fff; border: 2px inset #d9b8d0;
  padding: 7px 9px; font-size: 13px; font-family: var(--font-body); color: var(--ink);
}
.gb-form textarea { resize: vertical; line-height: 1.6; }
.gb-form input:focus, .gb-form textarea:focus, .gb-form select:focus { outline: none; border: 2px solid var(--pink); }
.gb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gb-form .form-actions { display: flex; gap: 10px; margin-top: 4px; }
.gb-form .small { font-weight: normal; font-family: var(--font-body); color: var(--muted); }
/* Honeypot: keep it in the DOM but far away from humans */
.gb-trap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Guestbook entries ---------- */
.gb-form-wrap { margin-bottom: 10px; }
.gb-list { display: flex; flex-direction: column; gap: 12px; }
.gb-entry {
  background: linear-gradient(#ffffff, #fff4fb);
  border: 3px outset #ffd0ee;
  padding: 10px 12px;
  position: relative;
}
.gb-entry::before {
  content: "✍️"; position: absolute; top: -10px; left: -10px; font-size: 18px;
  background: #fff; border: 2px ridge #ff9ede; border-radius: 50%; padding: 2px 3px; line-height: 1;
}
.gb-entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-bottom: 1px dashed #e3b8d8; padding-bottom: 5px; margin-bottom: 6px; }
.gb-name { font-family: var(--font); font-weight: bold; font-size: 15px; color: var(--purple); }
.gb-name a { color: var(--purple); text-decoration: underline; }
.gb-name a:hover { color: var(--hot); }
.gb-loc { font-size: 11px; color: var(--muted); }
.gb-date { font-size: 11px; color: var(--muted); margin-left: auto; font-family: "Courier New", monospace; }
.gb-mood { font-size: 12px; color: var(--pink); font-family: var(--font); margin-bottom: 4px; }
.gb-mood strong { color: var(--purple); }
.gb-message { font-size: 13px; color: var(--ink); line-height: 1.6; word-break: break-word; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--font);
  font-weight: bold; font-size: 13px;
  text-decoration: none; cursor: pointer;
  color: #000;
  background: linear-gradient(#f6f6f6, #d2d2d2);
  border: 3px outset #eee;
}
.btn:visited { color: #000; }
.btn:hover { text-decoration: none; border-style: inset; background: #fff7bd; color: #000; }
.btn-primary {
  color: #000;
  background: var(--rainbow); background-size: 200% 100%;
  animation: rainbow-move 4s linear infinite;
  border: 3px outset #ffd6f0;
  text-shadow: 0 0 3px #fff;
}
.btn-primary:hover { border-style: inset; color: #000; }

/* ---------- Alerts ---------- */
.alert { padding: 8px 12px; margin-bottom: 14px; font-size: 13px; border: 3px ridge; }
.alert-success { background: #e6ffe6; border-color: #00c020; color: #0a5a1a; }
.alert-error   { background: #ffe6e6; border-color: #ff0000; color: #8a0f0f; }
.alert-info    { background: #e6f0ff; border-color: #1e5cff; color: #123a8a; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 24px; color: var(--muted); font-family: var(--font); }
.empty .big { font-size: 40px; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.footer {
  padding: 12px 14px 16px;
  text-align: center;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  color: #222; font-size: 11px;
}
.footer-nav { margin-bottom: 6px; font-family: var(--font); font-weight: bold; font-size: 12px; }
.footer-nav a { color: #0022cc; margin: 0 5px; }
.footer .flags { font-size: 18px; letter-spacing: 3px; margin: 6px 0; }

/* Retro footer badges + hit counter */
.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 4px; }
.badge88 {
  font-family: var(--font-body); font-size: 9px; line-height: 1.15;
  width: 88px; height: 31px; padding: 3px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 1px outset #999; color: #fff; text-decoration: none; font-weight: bold;
}
.badge88 b { color: #ffe600; }
.badge-ie   { background: linear-gradient(#1e5cff, #0a2a8a); }
.badge-ns   { background: linear-gradient(#00c020, #075a12); }
.badge-res  { background: linear-gradient(#9b26ff, #4a0f8a); }
.badge-note { background: linear-gradient(#333, #000); }
.badge-pride{ background: var(--rainbow); background-size: 200% 100%; animation: rainbow-move 4s linear infinite; color:#000; }
.badge-pride b { color:#1a0033; }

.counter {
  display: inline-flex; gap: 2px; padding: 3px; margin: 4px auto;
  background: #000; border: 2px inset #888;
}
.counter i {
  font-family: "Courier New", monospace; font-style: normal; font-weight: bold;
  font-size: 15px; color: #00ff66; background: #001a0a; padding: 1px 4px;
  text-shadow: 0 0 4px #00ff66;
}
.footer-note { font-size: 10px; color: #444; font-style: italic; margin-top: 6px; }

/* ---------- Floating music player ---------- */
.music-player {
  position: fixed;
  left: 12px; bottom: 12px;
  z-index: 2500;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  background: #c0c0c0;
  border: 3px outset #eee;
  box-shadow: 2px 2px 0 #000;
  font-family: var(--font);
}
.music-player .music-note { font-size: 16px; }
.music-player.is-playing .music-note { animation: note-bounce 1s ease-in-out infinite; }
@keyframes note-bounce { 50% { transform: translateY(-3px) rotate(8deg); } }
.music-btn {
  font-family: var(--font); font-weight: bold; font-size: 12px; color: #000;
  padding: 4px 10px; cursor: pointer;
  background: linear-gradient(#f6f6f6, #d2d2d2);
  border: 2px outset #eee;
}
.music-btn:hover { background: #fff7bd; border-style: inset; }
.music-btn-stop { background: linear-gradient(#ffd0d0, #ff9a9a); }
.music-btn-stop:hover { background: #ff6b6b; color: #fff; }
@media (max-width: 700px) {
  .music-player { left: 8px; bottom: 8px; padding: 5px 6px; }
  .music-btn { font-size: 11px; padding: 3px 8px; }
}

/* ---------- Cursor sparkle + confetti (from pride.js) ---------- */
.pride-sparkle {
  position: fixed; pointer-events: none; z-index: 2147482000;
  margin: -0.5em 0 0 -0.5em; line-height: 1;
  text-shadow: 0 0 6px currentColor;
  animation: pride-spark .85s ease-out forwards;
}
@keyframes pride-spark {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25) rotate(var(--rot)); opacity: 0; }
}
.pride-confetti {
  position: fixed; width: 8px; height: 14px; pointer-events: none;
  z-index: 2147482500; border-radius: 1px; opacity: 0;
  will-change: transform, opacity;
  animation: pride-confetti 1.3s cubic-bezier(.2, .6, .3, 1) forwards;
}
@keyframes pride-confetti {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* ---------- Lightbox ---------- */
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(5, 1, 15, .92);
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 94vw; max-height: 94vh; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 94vw; max-height: 84vh; object-fit: contain; border: 4px ridge #ff64c6; background: #111; }
.lb-cap { color: #ffe600; font-family: var(--font); font-size: 14px; margin-top: 12px; text-align: center; max-width: 80vw; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: #c0c0c0; color: #000;
  border: 3px outset #eee; cursor: pointer; font-size: 22px; line-height: 1;
  width: 44px; height: 44px; padding: 0; font-family: var(--font); font-weight: bold;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-style: inset; background: #fff7bd; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .columns { flex-direction: column; }
  .sidebar { width: 100%; flex: none; border-right: 0; border-bottom: 3px ridge #ffb3e6; }
  .banner-title { font-size: 36px; }
  .con-card { flex-direction: column; }
  .con-photo, .con-photo-ph { width: 100%; flex: none; height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .rainbow-hr, .banner-logo, .banner-title, .side-title, .hero h1,
  .section h2, .section-head h2, .page-head h1, .con-meta .badge-year,
  .navbar a:hover, .navbar a.is-active, .btn-primary, .badge-pride,
  .marquee span, .blink {
    animation: none !important;
  }
  .pride-sparkle, .pride-confetti { animation-duration: .5s; }
}
