/* 2008 called. it wants its stylesheet back. */

:root {
  --bg: #0b1e5b;
  --panel: #ffffff;
  --panel-alt: #e8f0ff;
  --border-light: #ffffff;
  --border-dark: #5a6a9a;
  --link: #0000ee;
  --visited: #551a8b;
  --accent: #ff6600;
  --box-title-a: #3a6fd8;
  --box-title-b: #1b3f9e;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  color: #111;
  background-color: var(--bg);
  /* fallback starfield, shown until the first deep dream image loads */
  background-image:
    radial-gradient(circle at 10px 12px, #fff 1px, transparent 1.6px),
    radial-gradient(circle at 44px 36px, #ffe066 1px, transparent 1.6px),
    linear-gradient(180deg, #06123b 0%, #0b1e5b 60%, #123083 100%);
  background-size: 80px 80px, 80px 80px, 100% 100%;
  background-attachment: fixed;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='20' viewBox='0 0 16 20'><path d='M1 1 L1 15 L4.6 11.6 L7.2 17.6 L9.8 16.5 L7.2 10.6 L12.2 10.6 Z' fill='white' stroke='black' stroke-width='1.2' stroke-linejoin='round'/></svg>") 1 1, auto;
}

body.dreaming {
  background-image: var(--dream);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: #ff0000; text-decoration: underline; }

#page {
  width: 800px;
  max-width: 100%;
  margin: 14px auto 30px;
  padding: 0 8px;
}

#frame {
  width: 100%;
  background: var(--panel);
  border: 3px ridge #b9c6ff;
  box-shadow: 0 0 0 2px #06123b, 0 0 18px rgba(255, 255, 255, 0.35);
  table-layout: fixed;
}

#topbar {
  background: linear-gradient(180deg, #ffe680 0%, #ffb347 50%, #ff8c1a 100%);
  border-bottom: 2px solid #c25a00;
  padding: 3px 0;
  font-weight: bold;
  color: #3a1a00;
  font-size: 12px;
}

.marquee { width: 100%; }

#sidebar {
  width: 190px;
  vertical-align: top;
  background: var(--panel-alt);
  border-right: 2px groove #c9d4ff;
  padding: 10px 8px;
}

#content {
  vertical-align: top;
  padding: 14px 18px 24px;
  background: #fff;
  background-image: linear-gradient(180deg, #ffffff 0 120px, #fffdf5 120px);
  word-wrap: break-word;
}

#footer {
  background: linear-gradient(180deg, #2b4fb0, #15307a);
  color: #dfe8ff;
  padding: 6px 10px;
  font-size: 11px;
  text-align: center;
  border-top: 2px solid #0a1c4f;
}
#footer a { color: #ffe680; }
#footer .tiny { color: #b7c6f2; }

/* bevelled boxes */
.box, .shoutbox {
  background: #fff;
  border: 2px outset #c9d4ff;
  margin-bottom: 10px;
}
.box-title {
  background: linear-gradient(180deg, var(--box-title-a), var(--box-title-b));
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 6px;
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 0.5px;
}
.box-body { padding: 6px 7px; font-size: 11px; }
.box-body p { margin: 4px 0; }

.navlist { list-style: none; margin: 0; padding: 6px; }
.navlist li { margin: 4px 0; }

.btn {
  display: block;
  text-align: center;
  padding: 4px 6px;
  font-weight: bold;
  font-size: 12px;
  text-decoration: none;
  color: #112 !important;
  background: linear-gradient(180deg, #ffffff, #cdd9ff);
  border: 2px outset #dfe6ff;
  text-shadow: 1px 1px 0 #fff;
}
.btn:hover {
  background: linear-gradient(180deg, #fff6c7, #ffd36b);
  border-color: #ffd36b;
  color: #a00 !important;
}
.btn:active { border-style: inset; }

p .btn, p.center .btn { display: inline-block; }

.avatar {
  width: 64px; height: 64px;
  margin: 0 auto 6px;
  border: 2px inset #bcd;
  background: linear-gradient(135deg, #ffd1f5, #c3e3ff);
  text-align: center;
  line-height: 60px;
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  font-weight: bold;
  font-size: 16px;
}

.avatar-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 6px;
  border: 2px inset #bcd;
}

.stats { text-align: center; }
.counter {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 3px;
  background: #000;
  color: #39ff14;
  padding: 2px 6px;
  border: 2px inset #666;
  margin: 3px 0;
}

.tiny { font-size: 10px; color: #445; }
.center { text-align: center; }


/* ===================== WORDART ===================== */

.wordart-stage {
  text-align: center;
  padding: 10px 0 6px;
  overflow: visible;
}

.wordart {
  display: inline-block;
  line-height: 1;
  user-select: none;
}

.wa-line {
  display: block;
  margin: 0 auto;
}

/* The big one: orange/yellow 3D extruded italic, same as the WordArt meme. */
.wa-3d {
  font-family: "Arial Black", Impact, "Franklin Gothic Heavy", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 72px;
  letter-spacing: -1px;
  padding: 8px 24px 20px 10px;
  background: linear-gradient(180deg, #fff3a3 0%, #ffd400 32%, #ff9900 60%, #ff6a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: perspective(380px) rotateX(16deg) rotateY(-14deg) skewX(-8deg);
  transform-origin: 50% 100%;
  /* each drop-shadow is one step of extrusion; stacked they make the 3d block */
  filter:
    drop-shadow(1px 1px 0 #b34700)
    drop-shadow(1px 1px 0 #a84200)
    drop-shadow(1px 1px 0 #9c3d00)
    drop-shadow(1px 1px 0 #903800)
    drop-shadow(1px 1px 0 #843300)
    drop-shadow(1px 1px 0 #782e00)
    drop-shadow(1px 1px 0 #6c2900)
    drop-shadow(1px 1px 0 #602400)
    drop-shadow(1px 1px 0 #541f00)
    drop-shadow(1px 1px 0 #481a00)
    drop-shadow(3px 6px 4px rgba(0, 0, 0, 0.45));
}

/* Rainbow gradient fill with a dark outline, like "When you made your projects with". */
.wa-rainbow-outline {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
  font-weight: 900;
  font-size: 40px;
  letter-spacing: 0;
  background: linear-gradient(90deg, #ff2a2a 0%, #ff8a00 20%, #ffe600 38%, #2ecc40 56%, #0074d9 76%, #b10dc9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.6px rgba(20, 20, 40, 0.55);
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.35));
  padding: 6px 10px 2px;
}

/* Blue chrome with black outline and a slight bulge, like "feeling like a". */
.wa-wave {
  display: inline-block;
  font-family: "Arial Black", Impact, sans-serif;
  font-weight: 900;
  font-size: 30px;
  background: linear-gradient(180deg, #d9f0ff 0%, #4ea4ff 35%, #0b3fa8 60%, #7fc6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px #06183d;
  transform: skewX(-4deg) scaleY(1.15);
  filter: drop-shadow(2px 2px 0 #000);
  margin: 10px 0 6px;
  padding: 4px 8px 0;
}

.wa-welcome .wa-rainbow-outline { font-size: 38px; margin-bottom: -6px; }
.wa-welcome .wa-3d { font-size: 86px; }

.wa-3d, .wa-rainbow-outline, .wa-wave {
  animation: wobble 6s ease-in-out infinite alternate;
}
.wa-rainbow-outline { animation-duration: 7s; }
.wa-wave { animation: none; }

@keyframes wobble {
  from { rotate: -1.2deg; }
  to { rotate: 1.2deg; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-3d, .wa-rainbow-outline { animation: none; }
  .blink { animation: none; }
}

/* ===================== content ===================== */

.hr-rainbow {
  height: 4px;
  margin: 10px 0 14px;
  background: linear-gradient(90deg, #ff2a2a, #ff8a00, #ffe600, #2ecc40, #0074d9, #b10dc9);
  border: 1px solid #333;
}

.divider { height: 6px; }

.section-title { text-align: center; margin: 4px 0 6px; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  padding: 8px 10px;
  margin: 0 0 8px;
  background: #f6f9ff;
  border: 2px groove #d6e0ff;
}
.post-date {
  display: block;
  font-size: 10px;
  color: #556;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.post-link {
  font-family: "Comic Sans MS", "Comic Neue", "Trebuchet MS", cursive;
  font-weight: bold;
  font-size: 17px;
  text-decoration: none;
}
.post-link:hover { text-decoration: underline; }
.post-desc { margin-top: 3px; color: #334; }

.new-badge {
  display: inline-block;
  background: #ff0000;
  color: #ffff00;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border: 1px solid #800;
  vertical-align: middle;
  margin-left: 4px;
}
.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.post-title { text-align: center; margin: 6px 0 2px; font-size: 36px; }
.post-meta { text-align: center; font-size: 11px; color: #556; }

.post-body { font-size: 14px; line-height: 1.6; }
.post-body h2, .post-body h3 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: #1b3f9e;
  border-bottom: 1px dotted #9ab;
  padding-bottom: 2px;
}
.post-body img { max-width: 100%; border: 2px inset #bcd; }
.post-body blockquote {
  margin: 10px 0;
  padding: 6px 12px;
  background: #fff7d6;
  border-left: 5px solid #ff9900;
  font-style: italic;
}
.post-body pre {
  background: #000;
  color: #39ff14;
  padding: 8px 10px;
  border: 2px inset #666;
  overflow-x: auto;
  font-size: 12px;
}
.post-body code { font-family: "Courier New", monospace; }
.post-body :not(pre) > code {
  background: #eef;
  padding: 0 3px;
  border: 1px solid #ccd;
}
.post-body table { border-collapse: collapse; }
.post-body td, .post-body th { border: 1px solid #99a; padding: 3px 6px; }
.post-body th { background: #dde6ff; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.post-nav a { flex: 1; }
.post-nav a:nth-child(2) { text-align: center; }
.post-nav a:last-child { text-align: right; }
.post-nav span { flex: 1; }

/* ===================== guestbook ===================== */

.gb-form {
  background: #f6f9ff;
  border: 2px groove #d6e0ff;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.gb-form label { display: block; font-weight: bold; font-size: 12px; margin: 6px 0 2px; }
.gb-form input[type=text], .gb-form textarea {
  width: 100%;
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  font-size: 14px;
  padding: 4px;
  border: 2px inset #ccc;
  background: #fff;
}
.gb-form textarea { height: 90px; resize: vertical; }
.gb-form .btn { display: inline-block; margin-top: 8px; cursor: pointer; font-family: inherit; }
.gb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-status { font-size: 12px; margin-left: 8px; }
.gb-status.err { color: #c00; }
.gb-entries { list-style: none; margin: 0; padding: 0; }
.gb-entry {
  padding: 8px 10px;
  margin: 0 0 8px;
  background: #fffdf0;
  border: 2px groove #f0e3a8;
}
.gb-name { font-weight: bold; color: #1b3f9e; font-family: "Comic Sans MS", "Comic Neue", cursive; font-size: 15px; }
.gb-date { font-size: 10px; color: #667; margin-left: 6px; }
.gb-msg { margin-top: 4px; white-space: pre-wrap; word-wrap: break-word; font-size: 13px; }

/* ===================== cursor trail ===================== */

.trail-dot {
  position: fixed;
  left: 0; top: 0;
  width: 16px; height: 20px;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
}
.trail-dot svg { display: block; width: 16px; height: 20px; overflow: visible; }

.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 3px currentColor) drop-shadow(0 0 6px #fff);
  transform: translate(-50%, -50%) scale(0);
  animation: twinkle ease-in-out forwards;
}
@keyframes twinkle {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1) rotate(45deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(90deg); opacity: 0; }
}

/* ===================== background crossfade ===================== */

.dreamfade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}
body.dreaming { position: relative; z-index: 0; }

/* ===================== small screens (unheard of in 2008) ===================== */

@media (max-width: 640px) {
  #frame, #frame tbody, #frame tr, #frame td { display: block; width: 100%; }
  #sidebar { border-right: 0; border-bottom: 2px groove #c9d4ff; }
  #content { padding: 12px; }
  .wa-welcome .wa-3d { font-size: 54px; padding-right: 14px; }
  .wa-welcome .wa-rainbow-outline { font-size: 26px; }
  .post-title { font-size: 26px; }
  .trail-dot { display: none; }
}
