/* Retro Web circa 1993–1996 — responsive edition */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #000;
  background-color: #c0c0c0;
  background-image:
    linear-gradient(45deg, #b8b8b8 25%, transparent 25%),
    linear-gradient(-45deg, #b8b8b8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #b8b8b8 75%),
    linear-gradient(-45deg, transparent 75%, #b8b8b8 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
}

.page-frame {
  width: min(52rem, 100%);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  background: #ffffcc;
  border: 4px ridge #dfdfdf;
  box-shadow: 6px 6px 0 #808080;
  min-height: 100vh;
}

/* Header */

.site-header {
  text-align: center;
}

.welcome-line {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #000080;
  font-weight: bold;
}

.site-title {
  margin: 0.25rem 0;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  color: #800000;
  letter-spacing: 0.08em;
  text-shadow: 2px 2px 0 #ffcccc;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #333;
  font-style: italic;
}

.rule-double {
  border: none;
  height: 4px;
  margin: 1rem 0;
  background: linear-gradient(
    to bottom,
    #000 0,
    #000 1px,
    transparent 1px,
    transparent 2px,
    #000 2px,
    #000 3px
  );
}

/* Blink — classic but respects prefers-reduced-motion */

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blink {
    animation: none;
  }
}

/* Language bar */

.lang-bar {
  text-align: center;
  margin: 0 0 1.25rem;
  padding: 0.5rem;
  background: #e8e8d0;
  border: 2px inset #dfdfdf;
  font-size: 0.95rem;
}

.lang-label {
  font-weight: bold;
  margin-right: 0.35rem;
}

.lang-link {
  color: #0000ee;
  text-decoration: underline;
  font-weight: bold;
  padding: 0.15rem 0.35rem;
}

.lang-link:visited {
  color: #551a8b;
}

.lang-link:hover,
.lang-link:focus {
  background: #ffff00;
  outline: 2px dotted #000080;
}

.lang-link.is-active {
  color: #800000;
  background: #fff;
  border: 2px outset #ccc;
  text-decoration: none;
  cursor: default;
}

.lang-sep {
  margin: 0 0.25rem;
  color: #666;
}

/* Main content */

.content {
  padding: 0 0.25rem;
}

.content .loading {
  text-align: center;
  color: #666;
  font-style: italic;
}

.content h1 {
  font-size: 1.35rem;
  color: #800000;
  border-bottom: 2px solid #800000;
  padding-bottom: 0.25rem;
}

.content h2,
.content h3 {
  color: #000080;
  margin-top: 1.5rem;
}

.content h3 {
  font-size: 1.1rem;
  background: #e0e0ff;
  padding: 0.2rem 0.4rem;
  border-left: 4px solid #000080;
}

.content p {
  margin: 0.75rem 0;
  text-align: left;
}

.content a {
  color: #0000ee;
  word-break: break-word;
}

.content a:visited {
  color: #551a8b;
}

.content a:hover,
.content a:focus {
  background: #ffff00;
}

.content hr {
  border: none;
  height: 2px;
  background: #808080;
  margin: 1.5rem 0;
}

.content strong {
  color: #800000;
}

.content em {
  color: #006400;
}

.content ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

/* Footer */

.site-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-line {
  margin: 0.5rem 0;
}

.hr-gif {
  vertical-align: middle;
  margin: 0 0.25rem;
  image-rendering: pixelated;
}

.footer-copy {
  color: #333;
}

.construction {
  color: #cc6600;
  font-weight: bold;
  margin-top: 0.75rem;
}

/* Responsive */

@media (max-width: 600px) {
  .page-frame {
    padding: 0.75rem 0.85rem 1.5rem;
    border-width: 3px;
    box-shadow: 4px 4px 0 #808080;
  }

  .lang-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
  }

  .lang-label {
    width: 100%;
    margin-right: 0;
  }

  .lang-sep {
    display: none;
  }

  .lang-link {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
  }

  .content a {
    display: inline-block;
    padding: 0.1rem 0;
    min-height: 1.5em;
  }
}

@media (min-width: 601px) {
  body {
    padding: 1rem 0;
  }
}
