/* =========================================================
   eras.css: the web after 1999, one decade-ish at a time.
   warp.js swaps a class on <body>:
     era-2004   glossy Web 2.0 (gradients, reflections, a "beta" badge)
     era-2010   flat Bootstrap (navbar, jumbotron, three columns)
     era-2016   Material (app bar, hamburger, cards, a pink button)
     era-today  see modern.css
   Same words, same markup. Only the clothes change.
   ========================================================= */

/* ---------- the great un-1999-ing: every era after 1999 starts here ---------- */
body:not(.era-1999) { margin: 0; background-image: none; }
body:not(.era-1999) :is(table, tbody, tr, td) {
  display: block; width: auto; height: auto; border: 0; padding: 0;
  background: none; border-spacing: 0; text-align: inherit;
}
body:not(.era-1999) font { font: inherit; color: inherit; }
body:not(.era-1999) img { max-width: 100%; height: auto; }
body:not(.era-1999) #title { text-shadow: none; }
body:not(.era-1999) :is(.spacer, .divider, .ticker, .webring, .badges, .best-viewed, .email-me,
  .nudge, .new, .nav-head, #nav img, #links img, .counter-box, .music, .aol-box, .gb-poll-cell, .legal) { display: none; }
body:not(.era-1999) .blink { animation: none; }
body:not(.era-1999) .gb-status:empty { display: none; }

/* the transition between eras: each new decade paints in top to bottom, like a page on dial-up.
   A curtain in the new page colour rolls up from the top in chunky steps. */
.curtain {
  position: fixed; inset: 0; z-index: 930; pointer-events: none;
  background: var(--curtain, #fff); transform-origin: bottom; transform: scaleY(0);
}
body.repaint .curtain { animation: repaint 0.5s steps(7); }
@keyframes repaint { from { transform: scaleY(1); } to { transform: scaleY(0); } }

/* ---------- warp machinery: the year badge and the CRT ---------- */
.hud {
  position: fixed; left: 12px; bottom: 12px; z-index: 950;
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: rgba(12, 16, 48, 0.88); color: #fff; border-radius: 999px;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.hud[hidden] { display: none; }
.hud-year { padding: 6px 10px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hud-year.tick { animation: tick 0.35s ease-out; }
@keyframes tick { from { transform: translateY(-60%); opacity: 0; } }
.hud-sound {
  padding: 6px 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: inherit; font: inherit; font-weight: 500; font-size: 12px;
}
.hud-sound:hover { background: rgba(255, 255, 255, 0.24); }
.hud-sound:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* the old monitor switching off and on again */
.crt { position: fixed; inset: 0; z-index: 940; pointer-events: none; opacity: 0; }
.crt::before {
  content: ""; position: absolute; inset: 0; background: #fff; opacity: 0;
  transform-origin: 50% 50%;
}
.crt::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
body.crt-on .crt { animation: crt-screen 1.2s linear both; }
body.crt-on .crt::before { animation: crt-line 1.2s ease-in both; }
@keyframes crt-screen {
  0% { opacity: 0; background: transparent; }
  6% { opacity: 1; }
  12% { opacity: 0.35; }
  18% { opacity: 1; }
  24% { opacity: 0.6; background: transparent; }
  30% { opacity: 1; background: #000; }
  72% { opacity: 1; background: #000; }
  100% { opacity: 0; background: #000; }
}
@keyframes crt-line {
  0%, 24% { opacity: 0; transform: none; }
  30% { opacity: 0.9; transform: scale(1, 1); }
  44% { opacity: 1; transform: scale(1, 0.004); }
  58% { opacity: 1; transform: scale(0.004, 0.004); }
  66%, 100% { opacity: 0; transform: scale(0, 0); }
}
/* reduced motion: no flicker, just a calm fade */
body.fade-out #layout { opacity: 0; transition: opacity 0.4s; }
body.fade-in #layout { animation: fade-in 0.6s ease-out both; }
@keyframes fade-in { from { opacity: 0; } }

/* =========================================================
   2004: Web 2.0. Everything is glossy. Everything is in beta.
   ========================================================= */
.era-2004 {
  padding: 24px 12px 40px;
  background: #dbeaf6 linear-gradient(#a9d2f2, #eef6fc 460px) no-repeat;
  color: #333; font: 13px/1.6 "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
}
.era-2004 a { color: #0b6bbf; text-decoration: none; }
.era-2004 a:hover { text-decoration: underline; }
.era-2004 #layout {
  max-width: 780px; margin: 0 auto; background: #fff; overflow: hidden;
  border: 1px solid #9cc2e3; border-radius: 12px; box-shadow: 0 6px 22px rgba(30, 80, 140, 0.28);
}
.era-2004 #masthead {
  position: relative; padding: 26px 110px 30px 30px; text-align: left; color: #fff;
  background: linear-gradient(#93d3ff, #3f9de9 50%, #2384db 50%, #4ba8ef);
  border-bottom: 1px solid #1a6fb9;
}
.era-2004 #title {
  margin: 0; font: bold 32px/1.15 "Trebuchet MS", "Lucida Grande", sans-serif; letter-spacing: -1px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  -webkit-box-reflect: below -4px linear-gradient(transparent 50%, rgba(255, 255, 255, 0.3));
}
.era-2004 #title br { display: none; }
.era-2004 .tagline {
  display: inline-block; margin: 22px 0 0; padding: 3px 12px; font-size: 12px;
  background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 20px;
}
.era-2004 .construction { position: absolute; top: 18px; right: 22px; margin: 0; }
.era-2004 .construction > * { display: none; }
.era-2004 .construction::before {
  content: "beta"; display: grid; place-items: center; width: 74px; height: 74px;
  background: radial-gradient(circle at 40% 35%, #ffc46b, #f7780f 60%, #d65500);
  color: #fff; font: bold italic 19px "Trebuchet MS", sans-serif; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  transform: rotate(14deg);
  clip-path: polygon(100% 50%, 90% 58%, 96% 69%, 84% 73%, 85% 85%, 73% 84%, 69% 96%, 58% 90%, 50% 100%, 42% 90%, 31% 96%, 27% 84%, 15% 85%, 16% 73%, 4% 69%, 10% 58%, 0% 50%, 10% 42%, 4% 31%, 16% 27%, 15% 15%, 27% 16%, 31% 4%, 42% 10%, 50% 0%, 58% 10%, 69% 4%, 73% 16%, 85% 15%, 84% 27%, 96% 31%, 90% 42%);
}
.era-2004 #layout > tbody > tr:nth-child(2) { display: flex; }
.era-2004 #sidebar {
  flex: 0 0 180px; padding: 20px 14px;
  background: linear-gradient(#f5fafe, #e4eff8); border-right: 1px solid #cfe0ee;
}
.era-2004 #nav br { display: none; }
.era-2004 #nav a {
  display: block; margin: 0 0 7px; padding: 6px 12px; font-weight: bold; color: #1d5f9e;
  border: 1px solid #a6c9e8; border-radius: 7px; text-decoration: none;
  background: linear-gradient(#ffffff, #e6f1fb 50%, #d4e7f8 50%, #eaf4fd);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.era-2004 #nav a:hover { background: linear-gradient(#fffbe9, #ffeeb3 50%, #ffe28a 50%, #fff2c2); border-color: #e8c25a; }
.era-2004 #main { flex: 1; min-width: 0; padding: 18px 26px 10px; }
.era-2004 #main h2 {
  margin: 14px 0 10px; padding-bottom: 4px; color: #2384db;
  font: bold 21px "Trebuchet MS", sans-serif; letter-spacing: -0.5px; border-bottom: 2px solid #e2eef8;
}
.era-2004 #about tr, .era-2004 .gallery tr { display: flex; gap: 16px; align-items: flex-start; }
.era-2004 .frame img, .era-2004 .gallery img {
  border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  -webkit-box-reflect: below 2px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.35));
}
.era-2004 .gallery td { flex: 1; margin-bottom: 26px; text-align: center; }
.era-2004 .caption { display: block; margin-top: 18px; color: #777; font-size: 11px; }
.era-2004 #links a::before { content: "\00BB  "; color: #f7780f; }
.era-2004 .gb-form input[type="text"], .era-2004 .gb-form textarea {
  width: 100%; box-sizing: border-box; padding: 6px 8px; font: inherit;
  border: 1px solid #a9c4dc; border-radius: 6px; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.08);
}
.era-2004 .btn98, .era-2004 .view-source {
  min-width: 0; padding: 6px 18px; border: 1px solid #2a77c4; border-radius: 16px; color: #fff;
  font: bold 13px "Lucida Grande", "Trebuchet MS", sans-serif; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(#8fd0ff, #3f9de9 50%, #2384db 50%, #57b1f2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.era-2004 .gb-entry {
  margin: 0 0 10px; padding: 10px 14px; background: #f1f8fe; border: 1px solid #cfe3f4; border-radius: 10px;
}
.era-2004 .gb-entry p { margin: 0; }
.era-2004 .gb-name { font-weight: bold; color: #1d5f9e; }
.era-2004 .gb-date { color: #888; font-size: 11px; margin-left: 6px; }
.era-2004 #footer { padding: 16px 26px 22px; background: #f3f7fb; border-top: 1px solid #dde9f3; color: #888; font-size: 11px; text-align: center; }
.era-2004 #footer::before { content: "\00A9  2004 Juan's Home Page \00B7  Now in beta \00B7  RSS"; display: block; margin-bottom: 10px; }

/* =========================================================
   2010: flat, Bootstrap, three columns, "View details »".
   ========================================================= */
.era-2010 {
  padding-top: 50px; background: #fff; color: #333;
  font: 14px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.era-2010 a { color: #0088cc; text-decoration: none; }
.era-2010 a:hover { color: #005580; text-decoration: underline; }
.era-2010 #layout { max-width: 940px; margin: 0 auto; padding: 20px 20px 0; }
.era-2010 #sidebar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 50px; padding: 0 20px;
  display: flex; align-items: center; background: linear-gradient(#2c2c2c, #1b1b1b); border-bottom: 1px solid #000;
}
.era-2010 #sidebar::before { content: "Uncle Juan"; color: #fff; font-size: 20px; font-weight: 200; margin-right: 20px; white-space: nowrap; }
.era-2010 #nav { display: flex; height: 100%; }
.era-2010 #nav br { display: none; }
.era-2010 #nav a { display: flex; align-items: center; padding: 0 12px; color: #999; text-decoration: none; }
.era-2010 #nav a:hover, .era-2010 #nav a:first-of-type { color: #fff; background: #111; }
.era-2010 .hamburger { margin-left: auto; }
.era-2010 #masthead { margin-bottom: 30px; padding: 56px 60px; background: #eee; border-radius: 6px; text-align: left; }
.era-2010 #title { margin: 0 0 18px; font-size: 54px; line-height: 1.05; font-weight: bold; letter-spacing: -1px; }
.era-2010 #title br { display: none; }
.era-2010 .tagline { margin: 0 0 28px; font-size: 21px; font-weight: 200; line-height: 30px; }
.era-2010 .construction { margin: 0; }
.era-2010 .construction > * { display: none; }
.era-2010 .construction::before {
  content: "Learn more \00BB"; display: inline-block; padding: 10px 16px; font-size: 18px;
  color: #fff; background: #428bca; border: 1px solid #357ebd; border-radius: 6px;
}
.era-2010 #main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.era-2010 #guestbook { grid-column: 1 / -1; }
.era-2010 #main h2 { margin: 10px 0; font-size: 24px; line-height: 40px; font-weight: 500; }
.era-2010 #main .gb-entries-head { font-size: 18px; font-weight: 500; margin: 20px 0 10px; }
.era-2010 :is(#about, #links, #photos)::after {
  content: "View details \00BB"; display: inline-block; margin-top: 12px; padding: 6px 12px;
  color: #333; background: #fff; border: 1px solid #ccc; border-radius: 4px;
}
.era-2010 #about ul { padding-left: 18px; }
.era-2010 .frame img, .era-2010 .gallery img { padding: 4px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.era-2010 .gallery tr { display: flex; gap: 10px; }
.era-2010 .gallery td { flex: 1; margin-bottom: 10px; }
.era-2010 .caption { display: block; color: #999; font-size: 12px; }
.era-2010 .gb-form { max-width: 460px; }
.era-2010 .gb-form input[type="text"], .era-2010 .gb-form textarea {
  width: 100%; box-sizing: border-box; padding: 6px 12px; font: inherit; color: #555;
  border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.era-2010 .gb-form :is(input[type="text"], textarea):focus { border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); }
.era-2010 .btn98, .era-2010 .view-source {
  min-width: 0; padding: 6px 12px; font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff; background: #428bca; border: 1px solid #357ebd; border-radius: 4px; box-shadow: none;
}
.era-2010 input[type="reset"].btn98, .era-2010 .view-source { color: #333; background: #fff; border-color: #ccc; }
.era-2010 .gb-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.era-2010 .gb-entry { margin-bottom: 20px; padding: 19px; background: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); }
.era-2010 .gb-entry p { margin: 0 0 6px; }
.era-2010 .gb-name { font-weight: bold; }
.era-2010 .gb-date { color: #999; margin-left: 6px; }
.era-2010 #footer { margin-top: 30px; padding: 30px 0 40px; border-top: 1px solid #eee; color: #999; }
.era-2010 #footer::before { content: "\00A9  Uncle Juan 2010"; display: block; margin-bottom: 12px; }

/* the collapsed navbar button, Bootstrap 3 style */
.era-2010 .hamburger { display: none; }
@media (max-width: 767px) {
  .era-2010 #nav { display: none; }
  .era-2010 .hamburger {
    display: block; position: relative; width: 22px; height: 2px; padding: 9px 10px 17px 10px; border: 1px solid #333; border-radius: 4px;
  }
  .era-2010 .hamburger span, .era-2010 .hamburger::before, .era-2010 .hamburger::after {
    content: ""; position: absolute; left: 10px; width: 22px; height: 2px; background: #fff; border-radius: 1px;
  }
  .era-2010 .hamburger span { top: 9px; }
  .era-2010 .hamburger::before { top: 15px; }
  .era-2010 .hamburger::after { top: 21px; }
  .era-2010 #main { grid-template-columns: 1fr; }
  .era-2010 .gb-entries { grid-template-columns: 1fr; }
  .era-2010 #masthead { padding: 30px 24px; }
  .era-2010 #title { font-size: 36px; }
}

/* =========================================================
   2016: Material Design. App bar, hamburger, cards, a FAB.
   ========================================================= */
.era-2016 {
  padding-top: 64px; background: #fafafa; color: rgba(0, 0, 0, 0.87);
  font: 16px/1.5 Roboto, "Helvetica Neue", Arial, sans-serif;
}
.era-2016 a { color: #3f51b5; text-decoration: none; }
.era-2016 #sidebar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px; padding: 0 20px;
  display: flex; align-items: center; color: #fff; background: #3f51b5;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
}
.era-2016 #nav { display: none; }
.era-2016 .hamburger { display: block; position: relative; width: 18px; height: 12px; margin-right: 30px; }
.era-2016 .hamburger span, .era-2016 .hamburger::before, .era-2016 .hamburger::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: #fff;
}
.era-2016 .hamburger span { top: 5px; }
.era-2016 .hamburger::before { top: 0; }
.era-2016 .hamburger::after { top: 10px; }
.era-2016 #sidebar::after { content: "Uncle Juan"; font: 500 20px Roboto, sans-serif; letter-spacing: 0.02em; }
.era-2016 #masthead { padding: 40px max(24px, calc(50% - 404px)) 72px; color: #fff; background: #3f51b5; text-align: left; }
.era-2016 #title { margin: 0 0 12px; font: 400 44px/1.15 Roboto, sans-serif; }
.era-2016 #title br { display: none; }
.era-2016 .tagline { margin: 0; font-size: 16px; color: rgba(255, 255, 255, 0.72); }
.era-2016 .construction {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; margin: 0; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 50%; background: #ff4081;
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);
}
.era-2016 .construction > * { display: none; }
.era-2016 .construction::before { content: "+"; color: #fff; font: 300 34px/1 Roboto, sans-serif; }
.era-2016 #main { position: relative; max-width: 840px; margin: -40px auto 0; padding: 0 16px; display: grid; gap: 16px; }
.era-2016 #main .section {
  padding: 24px; background: #fff; border-radius: 2px;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.era-2016 #main h2 { margin: 0 0 16px; font: 400 24px Roboto, sans-serif; }
.era-2016 #main .gb-entries-head { margin: 24px 0 8px; font: 500 14px Roboto, sans-serif; color: rgba(0, 0, 0, 0.54); }
.era-2016 :is(#about, #links, #photos)::after {
  content: "LEARN MORE"; display: inline-block; margin: 16px 0 -8px -8px; padding: 0 8px;
  color: #ff4081; font: 500 14px/36px Roboto, sans-serif; letter-spacing: 0.04em;
}
.era-2016 #about tr { display: flex; gap: 16px; }
.era-2016 .gallery tr { display: flex; gap: 8px; margin-bottom: 8px; }
.era-2016 .gallery td { flex: 1; }
.era-2016 .caption { display: block; font-size: 12px; color: rgba(0, 0, 0, 0.54); }
.era-2016 .gb-form input[type="text"], .era-2016 .gb-form textarea {
  width: 100%; box-sizing: border-box; padding: 8px 0; font: inherit; background: transparent;
  border: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.42); border-radius: 0;
}
.era-2016 .gb-form :is(input[type="text"], textarea):focus { outline: 0; border-bottom: 2px solid #3f51b5; }
.era-2016 .gb-form label { font-size: 12px; color: rgba(0, 0, 0, 0.54); }
.era-2016 .btn98, .era-2016 .view-source {
  min-width: 64px; padding: 0 16px; font: 500 14px/36px Roboto, sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: #3f51b5; border: 0; border-radius: 2px;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.era-2016 input[type="reset"].btn98 { color: #3f51b5; background: none; box-shadow: none; }
.era-2016 .gb-entry { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.era-2016 .gb-entry::before {
  content: ""; grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: #c5cae9;
}
.era-2016 .gb-entry p { margin: 0; }
.era-2016 .gb-meta { order: -1; }
.era-2016 .gb-name { font-weight: 500; }
.era-2016 .gb-date { margin-left: 8px; font-size: 12px; color: rgba(0, 0, 0, 0.54); }
.era-2016 .gb-msg { color: rgba(0, 0, 0, 0.6); }
.era-2016 #footer { padding: 40px 16px 96px; text-align: center; color: rgba(0, 0, 0, 0.54); font-size: 14px; }
.era-2016 #footer::before { content: "\00A9  2016 Uncle Juan \00B7  Privacy \00B7  Terms"; display: block; margin-bottom: 16px; }
@media (max-width: 600px) {
  .era-2016 { padding-top: 56px; }
  .era-2016 #sidebar { height: 56px; padding: 0 16px; }
  .era-2016 #masthead { padding: 24px 16px 64px; }
  .era-2016 #title { font-size: 32px; }
}

/* 2004 on a phone: the fixed-width era never planned for this */
@media (max-width: 700px) {
  .era-2004 #layout > tbody > tr:nth-child(2) { display: block; }
  .era-2004 #sidebar { border-right: 0; border-bottom: 1px solid #cfe0ee; }
  .era-2004 #nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .era-2004 #nav a { margin: 0; }
  .era-2004 #masthead { padding-right: 96px; }
  .era-2004 #title { font-size: 24px; }
  .era-2004 .construction::before { width: 60px; height: 60px; font-size: 16px; }
}

/* no clicking mid-warp: the page is busy being rebuilt */
body.warping #layout { pointer-events: none; }
