/* The retro layer deliberately lives mostly in HTML attributes. This file owns enhancements. */

html,
body {
  min-height: 100%;
}

body {
  margin: 8px;
  overflow-x: hidden;
  font-size: 18px;
  line-height: 1.4;
}

#sky-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

#page-column {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  margin: 0 auto;
}

.archive-banner {
  display: block;
  box-sizing: border-box;
  width: min(468px, 100%);
  min-height: 54px;
  margin: 4px auto 12px;
  padding: 5px 12px;
  border: 2px outset #c0c0c0;
  background: #000080;
  color: #ffff00 !important;
  font: bold 15px/1.25 Arial, sans-serif;
  text-align: center;
}

.archive-banner small {
  display: block;
  color: #fff;
  font-size: 10px;
  letter-spacing: 1px;
}

.header-table,
.footer-table {
  width: 100%;
  max-width: 820px;
}

.site-title {
  font: bold 38px/1.1 "Times New Roman", serif;
  text-shadow: 1px 1px #fff;
}

.header-clipart {
  display: block;
  width: 76px;
  height: 120px;
  object-fit: contain;
  image-rendering: pixelated;
}

.spark-divider {
  display: block;
  width: 100%;
  max-width: 820px;
  height: 20px;
  margin: 6px 0;
  image-rendering: pixelated;
}

.intro-section {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  color: #000;
}

.intro-section h1,
.section-heading {
  margin: 0 0 12px;
  color: #800080;
  font: bold 30px/1.08 "Times New Roman", serif;
}

.intro-section p,
.work-item p,
#writing-heading + p,
.chronicle-articles,
.footer-debris {
  color: #000;
  font: 19px/1.4 "Times New Roman", serif;
}

.intro-portrait {
  order: 2;
  flex: 0 0 240px;
  width: 240px;
  height: 360px;
}

.intro-portrait img {
  width: 240px;
  height: 360px;
}

.welcome {
  color: #800080 !important;
  font-weight: bold !important;
  text-align: center;
}

.welcome img,
.heading-icon,
.footer-debris img {
  vertical-align: middle;
  image-rendering: pixelated;
}

.work-item {
  padding: 5px 10px 8px;
  color: #000;
}

.work-item h3,
.work-item h4,
.latest-heading {
  margin: 3px 0 5px;
  color: #000080;
  font: bold 24px/1.15 "Times New Roman", serif;
}

.work-item h4,
.latest-heading {
  color: #800080;
  font-size: 21px;
}

.role {
  margin: 0 0 5px;
  color: #008000 !important;
  font-weight: bold !important;
}

.crt-callout { display:grid; grid-template-columns:80px 1fr; align-items:center; gap:5px 10px; min-height:112px; padding:10px; border:4px outset #d7d7d7; background:#191970; color:#ffff00; font:bold 16px/1.05 Arial,sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px #000; }
.crt-screen-art { grid-row:span 2; position:relative; width:66px; height:50px; border:7px solid #222; border-radius:7px; background:repeating-linear-gradient(0deg,#39e4d4 0 3px,#163d74 3px 6px); box-shadow:inset 0 0 0 3px #8ef; animation:crt-flicker 1s steps(2,end) infinite; }
.crt-screen-art::after { content:""; position:absolute; left:21px; bottom:-14px; width:20px; height:7px; border:4px solid #222; border-top:0; }
.crt-callout b { grid-column:2; color:#ff00ff; font-size:14px; animation:callout-flash .8s steps(2,end) infinite; }
.crt-callout.compact { display:inline-grid; min-height:88px; margin-left:12px; vertical-align:middle; font-size:14px; }
@keyframes crt-flicker { 50% { background:repeating-linear-gradient(0deg,#fff 0 3px,#258a87 3px 6px); } }
@keyframes callout-flash { 50% { visibility:hidden; } }
.crt-callout:focus-visible,
.work-item a:focus-visible,
.chronicle-articles a:focus-visible {
  outline: 2px solid #ff00ff;
  outline-offset: 2px;
}

.experiment-item {
  border: 2px dashed #008000;
  background: rgba(255,255,255,.3);
}

.work-table { width:100%; border:4px ridge #000080; border-collapse:collapse; color:#000; font:19px/1.4 "Times New Roman",serif; }
.work-table th,.work-table td { padding:17px; border:2px solid #4d6f93; text-align:left; vertical-align:top; }
.work-table th { width:24%; color:#000080; font-size:22px; }
.work-table tr:nth-child(odd) { background:rgba(255,255,255,.5); }
.work-table tr:nth-child(even) { background:rgba(160,205,232,.45); }
.work-table .role { display:block; margin-top:8px; font-size:17px; }
.work-action { width:188px; vertical-align:middle !important; }

.chronicle-articles {
  margin: 6px 0 10px;
  padding-left: 26px;
}

.chronicle-articles li {
  margin: 7px 0;
}

.chronicle-articles img {
  width: 22px;
  height: 18px;
  margin-right: 3px;
  vertical-align: middle;
}

.read-all {
  font-weight: bold;
}

.hit-counter {
  display: inline-block;
  padding: 1px 4px;
  border: 2px inset #bbb;
  background: #111;
  color: #00ff00;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

.updated-paste {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 5px;
  color: #ff0000;
  background: #ffff00;
  font-family: "Comic Sans MS", cursive;
  transform: rotate(-1deg);
}

.footer-debris {
  margin: 12px 0;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 520px) {
  .header-table,
  .footer-table {
    table-layout: fixed;
  }

  .header-table {
    width: 100% !important;
  }

  .header-table th {
    width: auto !important;
  }

  .header-table td {
    width: 92px !important;
  }

  .header-clipart {
    max-width: 100%;
    height: auto;
  }

  .site-title {
    font-size: clamp(23px, 7.5vw, 29px);
  }

  .intro-section {
    flex-direction: column;
  }

  .intro-portrait {
    order: 0;
    align-self: center;
    flex: 0 0 auto;
    width:min(70vw,250px);
    height:auto;
    aspect-ratio:2 / 3;
  }

  .intro-portrait img { width:100%; height:100%; }
  .intro-section p,.work-table { font-size:18px; }
  .work-table,.work-table tbody,.work-table tr,.work-table th,.work-table td { display:block; width:100%; box-sizing:border-box; }.work-table th { padding-bottom:4px; }.work-table td { border-top:0; }.work-action { padding-top:0 !important; }

}

.guestbook-links img {
  vertical-align: middle;
  image-rendering: pixelated;
}

.avatar-stack {
  display: inline-block;
  position: relative;
  width: 82px;
  height: 123px;
  overflow: hidden;
  image-rendering: pixelated;
}

.avatar-stack img {
  position: absolute;
  inset: 0;
  display: block;
  width: 82px;
  height: 123px;
  border: 0;
  object-fit: cover;
}

.avatar-stack.intro-portrait,
.avatar-stack.intro-portrait img {
  width: 240px;
  height: 360px;
}

.avatar-scare {
  visibility: hidden;
}

.avatar-stack.is-flickering .avatar-base {
  visibility: hidden;
}

.avatar-stack.is-flickering .avatar-scare {
  visibility: visible;
}

.hidden-select {
  color: transparent;
  font-size: 1px;
  user-select: text;
}

.hidden-select::selection {
  color: #000;
  background: #ffff00;
}

.experiment-note {
  margin: 4px 0 12px;
  color: #000;
  font: 11px/1.2 Arial, sans-serif;
  text-align: right;
}

#basement {
  height: 600px;
  background: transparent;
}

blink {
  animation: old-blink 1s steps(1, end) infinite;
}

@keyframes old-blink {
  50% { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  blink { animation: none; }
  .avatar-scare { display: none; }
  .crt-screen-art,.crt-callout b { animation:none; }
}

@media (max-width: 520px) {
  .avatar-stack.intro-portrait,
  .avatar-stack.intro-portrait img { width:min(70vw,250px); height:min(105vw,375px); }
}

@media print {
  #sky-canvas,
  .archive-banner { display: none !important; }
  .hidden-select { color: #000; font-size: 9pt; }
  body { color: #000 !important; background: #fff !important; }
}
