/*
 * 90s Retro Easter Egg stylesheet (1996 Edition).
 * Served from /public so it never enters the Tailwind/PostCSS build
 * and has zero impact on the modern site when retro mode is OFF.
 * Loaded only by /retro and /pl/retro routes.
 */


* {
  border-radius: 0 !important;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #c0c0c0;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4'><rect width='1' height='1' fill='%23a8a8a8'/><rect x='2' y='2' width='1' height='1' fill='%23d8d8d8'/></svg>");
  background-repeat: repeat;
}

code, pre, kbd, samp, .mono {
  font-family: "Courier New", Courier, monospace;
}

/* Higher specificity to override Tailwind preflight (color:inherit,text-decoration:inherit)
   which Vite injects globally even on standalone non-Tailwind pages. */
body a {
  color: #0000EE;
  text-decoration: underline;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body a:visited { color: #551A8B; }
body a:active  { color: #FF0000; }

a:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 2px solid #ffff00;
  outline-offset: 1px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #000080;
  color: #ffff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  padding: 4px 10px;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

h1, h2, h3, h4 {
  font-family: "VT323", "Times New Roman", Times, serif;
  margin: 0;
  line-height: 1.1;
}
h1 { font-size: 56px !important; }
h2 { font-size: 38px !important; }
h3 { font-size: 26px !important; }
.retro-subtitle { font-family: "VT323", "Times New Roman", Times, serif; font-size: 26px; margin: 0; line-height: 1.1; }

hr {
  border: none;
  border-top: 2px groove #888;
  margin: 24px 0 !important;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
}
th {
  background: #000080;
  color: #fff;
  padding: 6px 10px;
  text-align: left;
  font-family: "VT323", "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.5px;
}
td {
  padding: 6px 10px;
  vertical-align: top;
  border-bottom: 1px solid #aaa;
  background: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
}
td small { font-size: inherit; }
tr:last-child td { border-bottom: none; }

table.zebra tr:nth-child(even) td { background: #f0f0f0; }
table.zebra tr.row-current td { background: #ffffcc; }
table.zebra tr.row-current td.period-cell b,
table.zebra tr.row-current td b { color: #000080; }

td.period-cell { white-space: nowrap; min-width: 140px; line-height: 1.5; }
td.period-cell div { margin: 1px 0; }

/* beveled buttons + bars */
.bevel-out, button, input[type="submit"], input[type="button"] {
  border: 2px outset #fff;
  background: #c0c0c0;
  color: #000;
  font-family: "VT323", "Times New Roman", Times, serif;
  font-size: 14px;
  padding: 4px 12px;
  cursor: pointer;
  touch-action: manipulation;
}
.bevel-out:active, button:active {
  border-style: inset;
}
.bevel-in {
  border: 2px inset #888;
  background: #c0c0c0;
  display: inline-block;
  padding: 2px 8px;
}

/* form inputs: browser-default look */
label {
  font-family: "Courier New", Courier, monospace;
}
label small { font-size: inherit; }
input[type="text"], input[type="email"], textarea {
  border: 2px inset #888;
  background: #fff;
  font-family: "Courier New", Courier, monospace;
  padding: 2px 4px;
}

/* blink */
@keyframes blink-anim {
  50% { visibility: hidden; }
}
.blink, blink {
  animation: blink-anim 1s steps(2, start) infinite;
}

/* NEW! badge */
@keyframes new-badge-anim {
  0%, 49%   { background: #ffff00; color: #ff0000; }
  50%, 100% { background: #ff0000; color: #ffff00; }
}
.new-badge {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid #000;
  animation: new-badge-anim 0.8s steps(2) infinite;
  margin-left: 6px;
  letter-spacing: 1px;
}

/* dial-up loading bar */
@keyframes dialup-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.dialup {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 14px;
  background: #808080;
  border-bottom: 2px outset #fff;
  z-index: 999;
  overflow: hidden;
}
.dialup-bar {
  height: 100%;
  background: repeating-linear-gradient(
    90deg, #000080 0 8px, #4040c0 8px 16px
  );
  transform-origin: left center;
  animation: dialup-fill 3s linear forwards;
}

/* hit counter LCD */
.hits {
  display: inline-block;
  background: #000;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  border: 2px inset #444;
  padding: 1px 6px;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

/* nav pipes */
.retro-nav {
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  margin: 8px 0;
  line-height: 1;
}
.retro-nav a {
  display: inline-block;
  margin: 0 4px;
  min-height: 44px;
  line-height: 44px;
  padding: 0 4px;
}

/* badge bar */
.badges {
  display: block;
  text-align: center;
  margin: 8px 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
}
.badges .bevel-in { margin: 0 4px; background: #ffffcc; }
#midi-toggle {
  font-size: 13px;
  font-family: "Courier New", Courier, monospace;
  padding: 2px 10px;
  margin: 0 4px;
  background: #000080;
  color: #ffff00;
  border: 2px outset #4040c0;
}

/* exit link in nav */
.exit-retro {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

/* retro button (link or button styled as beveled Win95 button) */
.retro-btn {
  display: inline-block;
  border: 2px outset #fff;
  background: #c0c0c0;
  color: #000 !important;
  text-decoration: none !important;
  font-family: "VT323", "Times New Roman", serif;
  font-size: 18px;
  padding: 4px 20px;
  margin: 4px 2px;
  touch-action: manipulation;
  min-height: 32px;
  line-height: 24px;
  cursor: pointer;
  letter-spacing: 1px;
}
.retro-btn:visited { color: #000 !important; }
.retro-btn:active  { border-style: inset; color: #000 !important; }
.retro-btn:disabled, .retro-btn[disabled] { color: #808080 !important; cursor: default; }

#guestbook-load-more-wrap {
  display: none;
  text-align: center;
  padding: 6px 0 2px;
  border-top: 1px dotted #999;
  margin-top: 4px;
}

/* container + Windows 95 window chrome */
.page {
  max-width: 1100px;
  margin: 16px auto;
  padding: 0;
  position: relative;
  border: 2px outset #fff;
  overflow: hidden;
}

.page-titlebar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  font-family: "VT323", "Times New Roman", serif;
  font-size: 20px;
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
}
.page-titlebar > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.page-titlebar-controls {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.page-titlebar-btn {
  width: 28px;
  height: 26px;
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  font-size: 11px;
  font-family: "Times New Roman", serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  line-height: 1;
}
.page-titlebar-close {
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none !important;
}
.page-titlebar-close:active {
  border-style: inset;
}
.page-titlebar-close:focus-visible {
  outline: 2px solid #ffff00;
  outline-offset: 1px;
}

.page-inner {
  padding: 20px 24px 56px;
}

/* broken-image fallback */
img {
  border: 2px solid #000;
  background: #fff;
}
img.broken::before {
  content: "[IMG]";
}

/* misc */
.center { text-align: center; }

/* override aggressive normalize/preflight that may strip list bullets */
ul, ol {
  list-style: revert !important;
  padding-left: 28px !important;
  margin: 6px 0 !important;
}
ul li, ol li { display: list-item !important; }
ul.tags { padding-left: 22px !important; margin: 4px 0 !important; }
ul.tags li {
  font-family: "Courier New", Courier, monospace;
  font-size: inherit;
  list-style: square !important;
  margin-bottom: 4px;
}

/* contact columns (float layout — period authentic; sidesteps an Astro
   compiler quirk where <a> in a <ul><table> reconstructs after </table>) */
.contact-cols {
  background: #fff;
  border: 1px solid #000;
  padding: 4px;
  margin: 8px 0;
  font-family: "Courier New", Courier, monospace;
}
.contact-cols::after { content: ""; display: block; clear: both; }
.contact-col {
  float: left;
  width: 50%;
  padding: 8px 12px;
  box-sizing: border-box;
}

/* contact form */
.retro-form {
  background: #fff;
  border: 2px inset #888;
  padding: 12px 16px;
  margin: 8px 0;
}
.retro-form textarea, .retro-form input[type="text"], .retro-form input[type="email"] {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

/* Guestbook inline form states */
.guestbook-status {
  border: 2px inset #808080;
  padding: 16px;
  margin: 12px 0;
  text-align: center;
  font-family: "Courier New", monospace;
}
.guestbook-status--success {
  background: #000080;
  color: #ffff00;
  border-color: #4040c0;
}
.guestbook-status--error {
  background: #800000;
  color: #ffffff;
  border-color: #c04040;
}
.guestbook-status button {
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: #808080;
  color: #ffffff;
  border: 2px outset #c0c0c0;
  padding: 2px 12px;
  cursor: pointer;
}
.guestbook-status button:active {
  border-style: inset;
}

footer.retro-footer {
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  margin-top: 24px;
  padding: 8px;
  border-top: 2px groove #888;
}

marquee {
  background: #000080;
  color: #ffff00;
  font-family: "Courier New", Courier, monospace;
  padding: 4px 0;
  border: 2px inset #888;
  margin: 8px 0;
}

/* Horizontal scroll for wide tables — always enabled so overflow: hidden
   on .page doesn't clip table content at any viewport width. */
.table-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0;
}
.table-scroll > table { margin: 0; width: 100%; }
@media (max-width: 900px) {
  .table-scroll {
    border: 2px inset #888;
  }
  .table-scroll > table { min-width: 640px; }
}

/* Desktop/mobile component visibility toggle */
.retro-desktop { display: block; }
.retro-mobile  { display: none !important; }

/* Retro card styles (used by mobile card components) */
.retro-cards { display: flex; flex-direction: column; gap: 14px; margin: 8px 0; }

.retro-card {
  border: 2px outset #ccc;
  background: #fff;
}
.retro-card.row-current { background: #ffffcc; }

.retro-card .card-head {
  background: #000080;
  color: #fff;
  font-family: "VT323", "Times New Roman", serif;
  font-size: 21px;
  padding: 5px 10px;
  border-bottom: 2px solid #000040;
}
.retro-card .card-head a,
.retro-card .card-head b,
.retro-card .card-head small { color: #fff; }
.retro-card .card-head small { font-size: inherit; }

.retro-card .card-field {
  display: flex;
  gap: 8px;
  padding: 4px 10px;
  border-bottom: 1px dotted #bbb;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  align-items: baseline;
}
.retro-card .card-field:last-child { border-bottom: none; }
.retro-card .card-field small { font-size: inherit; }
.retro-card .card-doi { word-break: break-all; }

.retro-card .card-field::before {
  content: attr(data-label);
  font-family: "VT323", "Times New Roman", serif;
  font-size: 18px;
  color: #000080;
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 1px;
}

/* Tablet — contact columns stack earlier */
@media (max-width: 640px) {
  .contact-col {
    float: none;
    width: 100%;
    padding: 8px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .retro-desktop { display: none !important; }
  .retro-mobile  { display: block !important; }
  .retro-cards.retro-mobile { display: flex !important; }

  body { font-size: 15px; }
  h1 { font-size: 46px !important; }
  h2 { font-size: 32px !important; }
  h3 { font-size: 22px !important; }
  .page-inner { padding: 12px 10px 32px; }
  .badges { font-size: 10px; }
  .badges .bevel-in { display: inline-block; margin: 2px; }
  .retro-nav a { margin: 2px 4px; }
}

/* Mobile */
@media (max-width: 500px) {
  body { font-size: 15px; }
  h1 { font-size: 38px !important; }
  h2 { font-size: 28px !important; }
  h3 { font-size: 20px !important; }
  .page-inner { padding: 10px 8px 24px; }
  .page { margin: 8px auto; }

  /* Stack hero table photo above bio */
  table.hero-card,
  table.hero-card tbody,
  table.hero-card tr,
  table.hero-card td {
    display: block;
    width: 100%;
  }
  table.hero-card td {
    border-bottom: 1px solid #888;
  }
  table.hero-card td:first-child { text-align: center; padding: 12px; }
  table.hero-card td:last-child { border-bottom: 0; }

  /* Form inputs go full width */
  .retro-form input[type="text"],
  .retro-form input[type="email"],
  .retro-form textarea {
    max-width: 100%;
    width: 100%;
  }

  /* Marquee a touch shorter */
  marquee { font-size: 12px; }

  /* Topbar exit + nav size */
  .exit-retro { font-size: 11px; }
  .retro-nav { font-size: 14px; }

  /* Footer pipes wrap nicer */
  footer.retro-footer p { line-height: 1.6; }
}

/* Small phones (375–430px) */
@media (max-width: 430px) {
  h1 { font-size: 32px !important; }
  h2 { font-size: 24px !important; }
  .page-titlebar { font-size: 15px; }
  .badges .bevel-in { display: block; margin: 2px auto; text-align: center; max-width: 260px; }
  .retro-nav a { padding: 0 3px; font-size: 13px; }
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  .blink, blink { animation: none; visibility: visible; }
  .new-badge { animation: none; background: #ffff00; color: #ff0000; }
  .dialup-bar { animation: none; transform: scaleX(1); }
}
