:root {
  --border: #c9bfa8;
}

@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Pirata+One&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 40px 16px 60px;
  background-color: #ede6d6;
  background-image: url("images/author-tile.jpg");
  background-repeat: repeat;
  background-size: 150px 150px;
  background-attachment: fixed;
  color: #000000;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.pubs-page {
  background-image: url("images/pubs-tile.jpg");
  background-size: 260px 260px;
}

body.pubs-page header .name {
  font-family: "Pirata One", "Times New Roman", serif;
  font-style: normal;
  font-weight: 400;
  text-transform: uppercase;
  color: #000000;
  font-size: clamp(2.6rem, 13vw, 7.5em);
  -webkit-text-stroke: 2px #000000;
  paint-order: stroke fill;
  text-shadow: none;
  animation: none;
  letter-spacing: 0.06em;
}

body.pubs-page {
  justify-content: flex-start;
}

body.pubs-page header {
  position: static;
  width: 100%;
  margin: 20px 0 24px;
}

body.pubs-page .sticky-wrap {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 auto;
}

.sticky-wrap {
  position: fixed;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 440px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 100%;
  background: #ffd9e6;
  border: 6px ridge #808080;
  padding: 18px 20px 18px;
  position: relative;
}

header {
  position: fixed;
  top: 8%;
  left: 0;
  width: 100vw;
  text-align: center;
  padding: 0 8px;
}

header .name {
  font-family: "Luckiest Guy", "Comic Sans MS", cursive;
  font-weight: normal;
  font-size: clamp(1.6rem, 9vw, 5.2em);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0;
  white-space: nowrap;
  -webkit-text-stroke: 8px #000000;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.35);
  animation: rainbow-flash 1.2s steps(1) infinite;
}

@keyframes rainbow-flash {
  0%   { color: #ff0000; }
  17%  { color: #ff8800; }
  34%  { color: #ffee00; }
  51%  { color: #22cc22; }
  68%  { color: #0066ff; }
  85%  { color: #aa00ff; }
  100% { color: #ff0000; }
}

.rule {
  border: none;
  border-top: 3px groove #808080;
  margin: 16px 0;
}

.rule.thick {
  border-top: 4px ridge #808080;
}

p {
  margin: 0 0 14px;
}

.card p:last-child {
  margin-bottom: 0;
}

a {
  color: #0000ee;
  text-decoration: underline;
}

a:visited {
  color: #551a8b;
}

a:hover {
  color: #ff0000;
  background: #ffff00;
}

/* nav / contact / catalog / footer rules kept in case those
   sections come back later */

nav {
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  margin: 16px 0 6px;
}

nav a {
  padding: 0 4px;
  text-decoration: none;
  color: #0000ee;
}

nav .current {
  color: #ff0000;
}

h2.section-label {
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333333;
  margin: 0 0 10px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95em;
}

.contact-list li {
  margin-bottom: 5px;
}

.contact-list .label {
  display: inline-block;
  width: 68px;
  color: #333333;
  font-family: "Courier New", monospace;
  font-size: 0.82em;
}

.catalog {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog li {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #808080;
}

.catalog li:last-child {
  border-bottom: none;
}

.catalog .entry-title {
  font-weight: bold;
  font-size: 1.03em;
}

.catalog .entry-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #333333;
  font-size: 0.88em;
  margin-top: 3px;
}

.catalog .entry-note {
  font-size: 0.8em;
  font-style: italic;
  color: #555555;
  margin-top: 3px;
}

.catalog .dots {
  flex: 1;
  border-bottom: 1px dotted #808080;
  height: 0;
  transform: translateY(-4px);
}

.catalog .entry-link {
  display: inline-block;
  margin-top: 5px;
  font-family: "Courier New", monospace;
  font-size: 0.8em;
}

footer {
  text-align: center;
  margin-top: 20px;
  font-family: "Courier New", monospace;
  font-size: 0.75em;
  color: #333333;
}

@media (max-width: 480px) {
  .card { padding: 18px 16px 18px; }
  header .name { font-size: 1.4em; }
}
