/* =========================================================
   retro.css: the 1999 look, plus the Windows 98 bits
   (Notepad, message boxes, the blue screen, the little helper).
   Most of 1999 lives in the HTML attributes themselves:
   BGCOLOR, FONT, CELLPADDING. This file just adds what
   Netscape would have faked with a GIF.
   ========================================================= */

/* ---------- which act shows what ---------- */
body:not(.era-1999) .only-1999,
body:not(.era-today) .only-today,
body:not(.era-today) .act3,
body:not(.era-today) .title-today,
.era-today .not-today,
.era-today .title-1999 { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 1000;
  background: #ffff00; color: #000; padding: 6px 10px; font: bold 14px Arial, sans-serif;
}
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hamburger { display: none; }

/* ---------- 1999 ---------- */
.era-1999 { font-family: "Times New Roman", Times, serif; margin: 0; }
.era-1999 :focus-visible { outline: 2px dotted #ffff00; outline-offset: 2px; }
.era-1999 a:hover { color: #ffff00; }

.era-1999 #title { margin: 6px 0 10px; line-height: 1.15; letter-spacing: 1px; }
.era-1999 #title font[size="7"] {
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #444, 4px 4px 0 #444, 5px 5px 6px #000;
}
.era-1999 .ticker { display: block; width: 96%; margin: 8px auto; border: 3px ridge #808080; padding: 4px 0; }
.era-1999 .tagline { display: none; }
.era-1999 .construction { margin: 14px 0 18px; }

.era-1999 #sidebar { padding: 12px 10px; border-right: 3px ridge #808080; text-align: left; }
.era-1999 .nav-head { margin: 0 0 8px; }
.era-1999 #nav a { font: bold 14px/2 Arial, Helvetica, sans-serif; }
.era-1999 #nav img { vertical-align: middle; }
.era-1999 #sidebar hr { margin: 14px 0; color: #808080; }

.counter-box { position: relative; text-align: center; }
.era-1999 .counter {
  display: inline-block; margin: 6px 0 2px; padding: 3px; cursor: pointer;
  background: #000; border: 3px inset #808080;
  font: bold 19px/1 "Courier New", Courier, monospace;
}
.era-1999 .counter:hover { border-color: #ffff00; }
.counter .digit {
  display: inline-block; width: 0.78em; padding: 3px 0; margin: 0 1px; overflow: hidden;
  background: linear-gradient(#3a3a3a, #000 48%, #000 52%, #262626); color: #39ff14;
  border-radius: 2px; text-align: center;
}
.counter .digit.roll { animation: digit-roll 70ms ease-out; }
@keyframes digit-roll { from { transform: translateY(-70%); filter: blur(1px); } to { transform: none; } }
.counter.y2k { animation: y2k 0.35s steps(4); }
.counter.y2k .digit { color: #ff3030; }
@keyframes y2k { 25% { transform: translate(-3px, 1px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-2px, 0); } }

/* the classic pale yellow Windows tooltip */
.counter-tip {
  position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px);
  padding: 2px 6px; white-space: nowrap; pointer-events: none;
  background: #ffffe1; color: #000; border: 1px solid #000;
  font: 12px Tahoma, Verdana, sans-serif; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.12s;
}
.era-1999 .counter-box:hover .counter-tip,
.era-1999 .counter:focus-visible + .counter-tip,
.era-1999 .counter-tip.tip-show { opacity: 1; }
body:not(.era-1999) .counter-tip { display: none; }

.era-1999 .music { text-align: center; }
.era-1999 .music .btn98 { margin-top: 6px; font-size: 11px; padding: 3px 8px; }

.era-1999 #main { padding: 12px 16px; text-align: left; }
.era-1999 #main h2 { margin: 6px 0 10px; font-size: 28px; text-shadow: 2px 2px 0 #000; }
.era-1999 #main ul { list-style: square; }
.era-1999 .new { vertical-align: middle; }
.era-1999 .divider { display: block; margin: 16px 0; }
.era-1999 .frame { margin: 0 auto; }
.era-1999 .frame img { display: block; }
.era-1999 .caption { color: #cccccc; }

/* guestbook, 1999 edition */
.era-1999 .gb-form input[type="text"],
.era-1999 .gb-form textarea {
  border: 2px inset #808080; background: #ffffff; color: #000;
  font: 14px "Courier New", Courier, monospace; padding: 2px; max-width: 100%;
}
.era-1999 .poll fieldset { border: 2px groove #808080; padding: 8px; }
.era-1999 .poll-bar {
  display: inline-block; width: 70px; height: 10px; vertical-align: middle;
  background: url("assets/rainbow-bar.gif") 0 0 / 100% 100%; border: 1px solid #fff;
}
.era-1999 .gb-status { color: #ffff00; font: bold 14px Arial, sans-serif; }
.era-1999 .gb-entries-head { font: bold 20px "Comic Sans MS", Arial, sans-serif; color: #00ffff; margin: 18px 0 4px; }
.era-1999 .gb-entry { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 3px groove #808080; }
.era-1999 .gb-entry p { margin: 2px 0; }
.era-1999 .gb-meta { order: -1; display: flex; flex-direction: column; font: 14px Arial, sans-serif; }
.era-1999 .gb-name::before { content: "Name: "; font-weight: bold; color: #ffff00; }
.era-1999 .gb-date::before { content: "Date: "; font-weight: bold; color: #ffff00; }
.era-1999 .gb-msg::before { content: "Comments: "; font: bold 14px Arial, sans-serif; color: #ffff00; }
.d-today { display: none; }
.era-today .d-today { display: inline; }
.era-today .d-1999 { display: none; }

.era-1999 #footer { padding: 0 10px; font-family: Arial, Helvetica, sans-serif; }
.era-1999 .badges img { margin: 2px; vertical-align: middle; }
.era-1999 .email-me img { vertical-align: middle; }
.era-1999 .nudge { margin: 26px 0 6px; font-family: "Courier New", monospace; }

.blink { animation: blink 1s steps(1) infinite; }
.view-source:hover .blink,
.view-source:focus .blink { animation: none; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- Windows 98 buttons and windows ---------- */
.btn98 {
  display: inline-block; min-width: 72px; padding: 4px 12px; cursor: pointer;
  background: #c0c0c0; color: #000; border: 0; border-radius: 0;
  font: 12px Tahoma, Verdana, "Segoe UI", sans-serif;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.btn98:active { box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; padding: 5px 11px 3px 13px; }
.btn98:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.view-source { font-size: 14px; font-weight: bold; padding: 6px 16px; }

.win98 {
  background: #c0c0c0; color: #000; border: 0; padding: 3px;
  font: 12px Tahoma, Verdana, "Segoe UI", sans-serif;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #ffffff, 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.win98 .titlebar,
.win98-window .titlebar {
  display: flex; align-items: center; gap: 4px; padding: 3px 3px 3px 4px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: bold;
}
.titlebar-icon {
  width: 14px; height: 14px; flex: none;
  background: #fff; border: 1px solid #000; box-shadow: inset 0 3px 0 #9cf;
}
.titlebar-buttons { margin-left: auto; display: flex; gap: 2px; }
.tb-btn {
  width: 18px; height: 16px; padding: 0; display: inline-grid; place-items: center;
  background: #c0c0c0; color: #000; border: 0; font: bold 12px/1 Tahoma, sans-serif; cursor: default;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
button.tb-btn { cursor: pointer; }
button.tb-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

dialog.win98 { max-width: min(660px, 96vw); width: 660px; margin: auto; }
dialog.win98::backdrop { background: rgba(0, 0, 40, 0.45); }

.menubar { display: flex; gap: 2px; padding: 2px 0; position: relative; }
.menubar > span, .menu-btn { padding: 2px 7px; font: inherit; background: none; border: 0; color: #000; }
.menu-btn { cursor: pointer; }
.menu-btn[aria-expanded="true"], .menu-btn:hover { background: #000080; color: #fff; }
.menu { position: relative; }
.menu-list {
  position: absolute; left: 0; top: 100%; z-index: 2; min-width: 150px; padding: 2px;
  display: flex; flex-direction: column; background: #c0c0c0;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #ffffff;
}
.menu-list[hidden] { display: none; }
.menu-list button { text-align: left; padding: 4px 20px; font: inherit; background: none; border: 0; color: #000; cursor: pointer; }
.menu-list button:hover, .menu-list button:focus { background: #000080; color: #fff; outline: none; }

.notepad-text {
  margin: 0; padding: 6px 8px; height: min(58vh, 420px); overflow: auto;
  background: #fff; color: #000; white-space: pre;
  font: clamp(9.5px, 2.55vw, 14px)/1.4 "Lucida Console", "Courier New", monospace;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.notepad-text:focus { outline: none; }
.notepad-text .caret { animation: blink 0.9s steps(1) infinite; }

dialog.msgbox { width: 320px; }
.msgbox-body { display: flex; align-items: center; gap: 14px; padding: 18px 14px 8px; }
.msgbox-body p { margin: 0; font-size: 13px; }
.msgbox-icon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: #0000c0; border: 2px solid #000080; font: bold 20px Georgia, serif;
}
.msgbox-actions { text-align: center; margin: 6px 0 10px; }

/* ---------- the blue screen ---------- */
dialog.bsod {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0;
  padding: 6vh 8vw; background: #0000aa; color: #fff;
  font: clamp(14px, 2.2vw, 22px)/1.5 "Lucida Console", "Courier New", monospace;
}
dialog.bsod[open] { display: flex; flex-direction: column; justify-content: center; }
dialog.bsod::backdrop { background: #0000aa; }
dialog.bsod p { max-width: 46em; margin: 0 auto 1.2em; width: 100%; }
.bsod-head { text-align: center; }
.bsod-head span { background: #aaaaaa; color: #0000aa; padding: 0 0.5em; }
.bsod-press { text-align: center; }
.bsod-cursor { animation: blink 1s steps(1) infinite; }

/* ---------- the little helper (a floppy disk, obviously) ---------- */
.helper {
  position: fixed; right: 16px; bottom: 16px; z-index: 900; width: min(300px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font: 13px Tahoma, Verdana, sans-serif; color: #000;
}
.helper[hidden] { display: none; }
.helper-bubble {
  position: relative; padding: 12px 14px; background: #ffffe1; border: 1px solid #000; border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}
.helper-bubble::after {
  content: ""; position: absolute; right: 34px; bottom: -11px; width: 18px; height: 18px;
  background: #ffffe1; border-right: 1px solid #000; border-bottom: 1px solid #000;
  transform: skewX(-25deg) rotate(45deg) translateY(-6px);
}
.helper-bubble p { margin: 0 0 10px; }
.helper-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 !important; }
.helper-floppy { width: 64px; height: 64px; margin-right: 18px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }

/* ---------- 1999 on a phone (we didn't have these, so we're improvising) ---------- */
@media (max-width: 799px) {
  .era-1999 #layout { width: 100%; }
  .era-1999 #layout > tbody > tr > td { display: block; width: auto; }
  .era-1999 #sidebar { border-right: 0; border-bottom: 3px ridge #808080; }
  .era-1999 #title font[size="7"] { font-size: clamp(30px, 9vw, 48px); }
  .era-1999 img { max-width: 100%; height: auto; }
  .era-1999 #about .frame img { max-width: none; }
  .era-1999 #masthead { padding: 0 10px; }
  .era-1999 .spacer { height: 1px; }
  .era-1999 .gb-layout td { display: block; width: auto; }
  .era-1999 .gb-form textarea { width: 100%; box-sizing: border-box; }
  .era-1999 #nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
  .era-1999 #nav a { margin-right: 8px; }
  .era-1999 #nav .nav-head { flex-basis: 100%; }
  .era-1999 #nav br { display: none; }
}

/* ---------- people who asked for less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .era-1999 .ticker { display: none; }
  .era-1999 .tagline { display: block; margin: 8px 0; font: bold 18px Arial, sans-serif; color: #00ff00; }
  .blink, .bsod-cursor, .notepad-text .caret, .helper-floppy, .counter.y2k { animation: none; }
}

/* ---------- free AOL CDs (they just kept coming) ---------- */
.cd {
  --size: 116px;
  position: relative; display: inline-block; width: var(--size); height: var(--size); flex: none;
  margin: 8px 0 4px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  font-family: "Arial Black", Arial, sans-serif; text-align: center;
  background:
    radial-gradient(circle, #000 0 6%, #dcdcdc 6.5% 12%, #9a9a9a 12.5% 13%, transparent 13.5%),
    radial-gradient(circle, transparent 0 21%, #0d3f96 21.5% 70%, #0a2f72 96%, #7d7d7d 97%, #c8c8c8 99%),
    conic-gradient(#d6e2ff, #ffd6f5, #fff6c2, #d2ffe9, #cfe8ff, #ead6ff, #d6e2ff);
  box-shadow: 0 0 0 1px #555, 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.cd::after { /* the shine */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.15));
}
.cd-brand { position: absolute; left: 0; right: 0; top: 9%; font-size: calc(var(--size) * 0.15); letter-spacing: 1px; }
.cd-hours {
  position: absolute; left: 0; right: 0; bottom: 9%;
  font: bold calc(var(--size) * 0.09)/1.05 Arial, sans-serif; color: #ffe14d;
}
button.cd:focus-visible { outline: 2px dotted #ffff00; outline-offset: 4px; }
button.cd:hover { box-shadow: 0 0 0 1px #ffff00, 3px 3px 0 rgba(0, 0, 0, 0.6); }
.cd.spin { animation: cd-spin 0.6s ease-out; }
@keyframes cd-spin { to { transform: rotate(360deg); } }
.cd.mini { --size: 46px; cursor: default; }
.cd.mini .cd-brand { top: 6%; letter-spacing: 0; }
.aol-box { text-align: center; }
.cd-pile { position: relative; height: 0; margin: 0 auto; width: 150px; transition: height 0.2s; }
.cd-pile .cd { position: absolute; animation: cd-land 0.35s ease-out; }
@keyframes cd-land { from { transform: translateY(-30px) scale(1.3); opacity: 0; } }
.aol-count { margin: 6px 0 0; font: 12px/1.35 Arial, sans-serif; color: #ffffff; }
@media (prefers-reduced-motion: reduce) {
  .cd.spin, .cd-pile .cd { animation: none; }
}
