@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
  --bg: #050508;
  --surface: #0a0b10;
  --border: #1a1b22;
  --accent: #8a9bae;
  --accent-dim: rgba(138, 155, 174, 0.08);
  --accent-glow: rgba(138, 155, 174, 0.2);
  --amber: #c9a87c;
  --amber-dim: rgba(201, 168, 124, 0.08);
  --amber-glow: rgba(201, 168, 124, 0.15);
  --text: #909098;
  --text-muted: #757586;
  --text-bright: #c0c0c8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ── Easter Egg: Berry ASMR animation ─────────────────── */

@keyframes berry-asmr {
  0%   { transform: scale(1) rotate(0deg); }
  20%  { transform: scale(1.5) rotate(-8deg); }
  40%  { transform: scale(0.85) rotate(5deg); }
  60%  { transform: scale(1.3) rotate(-4deg); }
  80%  { transform: scale(0.95) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.berry-popping {
  animation: berry-asmr 0.6s ease-in-out forwards;
  cursor: pointer;
}

.nav-brand img {
  cursor: crosshair;
}

/* ── Easter Egg: Page flip ─────────────────────────────── */

@keyframes flip-out {
  from { transform: perspective(1200px) rotateY(0deg); opacity: 1; }
  to   { transform: perspective(1200px) rotateY(90deg); opacity: 0; }
}

@keyframes flip-in {
  from { transform: perspective(1200px) rotateY(-90deg); opacity: 0; }
  to   { transform: perspective(1200px) rotateY(0deg); opacity: 1; }
}

body.flipping-out { animation: flip-out 0.45s ease-in forwards; }
body.flipping-in  { animation: flip-in  0.45s ease-out forwards; }

/* ── Easter Egg: Back side (early internet) ────────────── */

#page-back {
  display: none;
  position: relative;
  min-height: 100vh;
  background-color: #000080;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: 'Comic Sans MS', 'Courier New', cursive;
  color: #ffff00;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

#page-back marquee {
  background: #ff00ff;
  color: #ffff00;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.4rem 0;
  letter-spacing: 0.08em;
}

.back-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  text-align: center;
}

.gif-strip {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.gif-strip img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  object-fit: contain;
}

.gif-strip img:nth-child(1) { transform: rotate(-6deg); }
.gif-strip img:nth-child(2) { transform: rotate(4deg); }
.gif-strip img:nth-child(3) { transform: rotate(-3deg); }
.gif-strip img:nth-child(4) { transform: rotate(7deg); }
.gif-strip img:nth-child(5) { transform: rotate(-5deg); }

.retro-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: #00ffff;
  flex-wrap: wrap;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.blink {
  animation: blink 1s step-start infinite;
  color: #ff69b4;
  font-weight: bold;
}

.back-blog {
  max-width: 600px;
  margin: 2rem auto;
  border: 4px solid transparent;
  border-image: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8b00ff) 1;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
}

.back-blog h2 {
  color: #ff69b4;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  text-shadow: 2px 2px #000000;
}

.blog-post h3 {
  color: #00ffff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.blog-img {
  max-width: 100%;
  border: 4px ridge #ff69b4;
  display: block;
  margin: 0 auto 1rem;
}

.blog-post p {
  color: #ffff00;
  font-size: 0.9rem;
}

#btn-flip-back {
  margin-top: 2rem;
  padding: 6px 14px;
  font-family: 'Arial', sans-serif;
  font-size: 0.8rem;
  background: #c0c0c0;
  color: #000000;
  border: none;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  cursor: pointer;
  letter-spacing: 0.02em;
}

#btn-flip-back:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* ── Falling Stars ─────────────────────────────────────── */

.falling-stars-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

@keyframes star-fall {
  0%   { top: -5%; opacity: 1; }
  100% { top: 105%; opacity: 0.3; }
}

.falling-star {
  position: absolute;
  font-size: 1.2rem;
  animation: star-fall linear infinite;
}

.falling-star:nth-child(1) { left:  8%; color: #ff69b4; animation-duration: 4.2s; animation-delay:  0.0s; }
.falling-star:nth-child(2) { left: 19%; color: #00ffff; animation-duration: 3.8s; animation-delay:  0.7s; }
.falling-star:nth-child(3) { left: 33%; color: #ffff00; animation-duration: 5.1s; animation-delay:  1.2s; }
.falling-star:nth-child(4) { left: 47%; color: #ff4500; animation-duration: 4.5s; animation-delay:  0.3s; }
.falling-star:nth-child(5) { left: 58%; color: #7fff00; animation-duration: 3.6s; animation-delay:  1.8s; }
.falling-star:nth-child(6) { left: 70%; color: #ff00ff; animation-duration: 4.8s; animation-delay:  0.9s; }
.falling-star:nth-child(7) { left: 81%; color: #00ff7f; animation-duration: 4.0s; animation-delay:  2.4s; }
.falling-star:nth-child(8) { left: 92%; color: #ffa500; animation-duration: 5.3s; animation-delay:  1.5s; }

/* ── Cursor Star Trail ─────────────────────────────────── */

.star-trail {
  position: fixed;
  pointer-events: none;
  font-size: 1rem;
  z-index: 9000;
  animation: trail-fade 0.8s ease-out forwards;
}

@keyframes trail-fade {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* ── Retro Badge Strip ─────────────────────────────────── */

.retro-badge-strip {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.retro-badge {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  font-size: 0.6rem;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
  cursor: default;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

.badge-ie         { background: #000080; color: #ffffff; }
.badge-notepad    { background: #006400; color: #ffff00; }
.badge-resolution { background: #8b0000; color: #00ffff; }
.badge-html       { background: #4b0082; color: #ff69b4; }

/* ── Rainbow Heading ───────────────────────────────────── */

.rainbow-heading {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Comic Sans MS', 'Courier New', cursive;
  margin: 1rem 0 0.5rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.rainbow-heading span {
  display: inline-block;
  animation: rainbow-cycle 3s linear infinite;
}

@keyframes rainbow-cycle {
  0%   { color: #ff0000; }
  14%  { color: #ff8800; }
  28%  { color: #ffff00; }
  42%  { color: #00ff00; }
  57%  { color: #00ffff; }
  71%  { color: #0000ff; }
  85%  { color: #ff00ff; }
  100% { color: #ff0000; }
}

/* ── Bottom Marquee ────────────────────────────────────── */

.marquee-bottom {
  background: #006400;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.3rem 0;
  letter-spacing: 0.06em;
  margin: 1rem 0;
}

/* ── Retro Clock ───────────────────────────────────────── */

#retro-clock {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  width: 135px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  z-index: 200;
  font-family: 'Arial', sans-serif;
}

body[data-side="back"] #retro-clock {
  display: block;
}

.clock-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 3px 5px;
}

.clock-body {
  padding: 6px 8px;
  text-align: center;
}

#clock-time {
  font-size: 0.82rem;
  font-weight: bold;
  color: #000000;
  font-family: 'Courier New', monospace;
}

#clock-date {
  font-size: 0.58rem;
  color: #404040;
  margin-top: 2px;
  font-family: 'Arial', sans-serif;
}

/* ── Guestbook ─────────────────────────────────────────── */

.back-guestbook {
  max-width: 600px;
  margin: 2rem auto;
  background: rgba(0, 0, 0, 0.4);
  border: 4px solid transparent;
  border-image: linear-gradient(90deg, #ff69b4, #00ffff, #ffff00, #ff69b4) 1;
  padding: 1.25rem;
}

.back-guestbook h2 {
  color: #ff69b4;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px #000000;
}

.gb-entry {
  background: rgba(255, 255, 255, 0.07);
  border: 1px dashed #00ffff;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.6rem;
  text-align: left;
}

.gb-entry:last-child {
  margin-bottom: 0;
}

.gb-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.gb-name {
  color: #ffff00;
  font-weight: bold;
  font-size: 0.75rem;
}

.gb-date {
  color: #00ffff;
  font-size: 0.62rem;
}

.gb-msg {
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1.5;
}

/* ── Web Ring ──────────────────────────────────────────── */

.webring {
  max-width: 400px;
  margin: 1.5rem auto;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 3px ridge #c0c0c0;
  font-family: 'Arial', sans-serif;
}

.webring-title {
  color: #00ffff;
  font-weight: bold;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.webring-nav {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}

.webring-btn {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  font-size: 0.68rem;
  padding: 2px 8px;
  cursor: pointer;
  font-family: 'Arial', sans-serif;
  color: #000000;
}

.webring-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* ── AIM Buddy List ────────────────────────────────────── */

#aim-widget {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 165px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  z-index: 200;
  font-family: 'Arial', sans-serif;
}

body[data-side="back"] #aim-widget {
  display: block;
}

#aim-widget.aim-hidden {
  display: none !important;
}

.aim-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 3px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aim-close-btn {
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  font-size: 0.55rem;
  width: 14px;
  height: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.aim-body {
  padding: 6px;
  background: #ffffff;
  font-size: 0.62rem;
  color: #000000;
}

.aim-group {
  font-weight: bold;
  color: #000080;
  font-size: 0.6rem;
  margin-bottom: 2px;
}

.aim-buddy {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 0;
  color: #000000;
  font-size: 0.62rem;
}

.aim-away-msg {
  font-style: italic;
  color: #808080;
  font-size: 0.55rem;
  margin: 1px 0 4px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aim-footer {
  display: flex;
  gap: 3px;
  padding: 4px;
  justify-content: center;
  background: #c0c0c0;
}

.aim-btn {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  font-size: 0.62rem;
  padding: 2px 8px;
  cursor: pointer;
  font-family: 'Arial', sans-serif;
}

.aim-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}


/* standalone: no flip, the page just is */
#page-back { display: block; }
body::before, body::after { content: none; }
body { animation: none; }

#btn-flip-back { text-decoration: none; }
