/* ================================================================
 * opseq style.css — GeoCities-inspired retro theme
 * Zero JavaScript. Pure CSS. Old-school vibes with modern readability.
 * ================================================================ */

:root {
  --bg: #000020;
  --surface: #000040;
  --surface-raised: #000060;
  --text: #00ff00;
  --muted: #c0c0c0;
  --line: #00ff00;
  --accent: #ffff00;
  --link: #00ffff;
  --link-visited: #ff00ff;
  --warn: #ff0000;
  --font: "Courier New", Courier, monospace;
  --font-heading: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Links — classic web colors */
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--accent); }
a:active { color: var(--warn); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--accent);
  font-family: var(--font-heading);
  text-shadow: 1px 1px 0 var(--link-visited);
  margin: 1em 0 0.5em;
}
h1 { font-size: 1.8em; }
h2 { font-size: 1.4em; }
h3 { font-size: 1.2em; }

/* Tables — GeoCities classic bordered */
table { border-collapse: collapse; }
td, th { vertical-align: top; }

/* Images */
img { max-width: 100%; height: auto; }

/* Blink — yes we're doing this */
blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* Retro body class for GeoCities pages */
.retro-body {
  background: #000020;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,64,0.3) 2px, rgba(0,0,64,0.3) 4px);
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
}
.retro-body h1, .retro-body h2, .retro-body h3 {
  color: #ffff00;
  text-shadow: 1px 1px 0 #ff00ff;
}
.retro-body a { color: #00ffff; }
.retro-body a:visited { color: #ff00ff; }

/* Marquee replacement using CSS animation */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  animation: marquee 15s linear infinite;
  display: inline-block;
  padding-left: 100%;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* HR — retro style */
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1em 0;
}

/* Blockquote — old-school indent */
blockquote {
  border-left: 3px solid var(--accent);
  margin: 1em 0;
  padding: 0.5em 1em;
  background: var(--surface);
  color: var(--muted);
  font-style: italic;
}

/* Code blocks */
code, pre {
  font-family: var(--font);
  background: #000;
  color: #00ff00;
  border: 1px solid var(--line);
  padding: 2px 4px;
}
pre {
  padding: 1em;
  overflow-x: auto;
  display: block;
}

/* Lists */
ul, ol { margin: 1em 0; padding-left: 2em; }
li { margin: 0.3em 0; }

/* Forms */
input, textarea, select, button {
  font-family: var(--font);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 4px 8px;
}
input[type="submit"], input[type="button"], button {
  background: var(--surface-raised);
  color: var(--accent);
  cursor: pointer;
  border: 1px outset var(--line);
}
input[type="submit"]:hover, button:hover {
  background: var(--accent);
  color: var(--bg);
}
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  background: #000;
  color: var(--text);
  border: 1px inset var(--line);
}

/* Theme switcher — styled to match retro theme */
.opseq-theme-switcher { margin: 1em auto; text-align: center; }
.opseq-theme-popup summary {
  cursor: pointer;
  display: inline-block;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
}
.opseq-theme-popup-panel {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 2px outset var(--line);
  padding: 1em;
  min-width: 300px;
  z-index: 100;
}
.opseq-theme-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
}
.opseq-theme-popup-col h4 {
  color: var(--accent);
  font-size: 12px;
  margin: 0 0 0.5em;
}
.opseq-theme-popup-list a {
  display: block;
  padding: 2px 8px;
  color: var(--link);
  text-decoration: none;
  font-size: 12px;
}
.opseq-theme-popup-list a:hover { background: var(--surface-raised); color: var(--accent); }
.opseq-theme-popup-list a.active { color: var(--accent); font-weight: bold; }
.opseq-theme-popup-legal {
  margin-top: 1em;
  padding-top: 0.5em;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 1em;
}
.opseq-theme-popup-legal a { font-size: 11px; color: var(--muted); }

/* Mobile responsive */
@media (max-width: 600px) {
  body { font-size: 13px; }
  .opseq-theme-popup-grid { grid-template-columns: 1fr; }
  .opseq-theme-popup-panel { min-width: 250px; max-width: 90vw; }
}

/* Blog-specific retro styling */
.blog-index, .post-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 1em;
}

.blog-listing {
  border: 1px solid var(--line);
  margin: 1em 0;
  background: var(--surface);
}
.blog-listing-link {
  display: block;
  padding: 1em;
  text-decoration: none;
  color: var(--text);
}
.blog-listing-link:hover {
  background: var(--surface-raised);
}
.blog-listing-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0.5em;
}
.blog-listing-content h2 {
  color: var(--accent);
  text-shadow: 1px 1px 0 var(--link-visited);
}
.blog-listing-content p {
  color: var(--muted);
  margin: 0.5em 0;
}
.blog-listing-footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 0.5em;
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

/* Post page */
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2em;
  margin: 1em 0;
}
.post h1 {
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--link-visited);
  font-size: 1.6em;
}
.post-kicker {
  color: var(--link);
  font-size: 12px;
  margin-bottom: 0.5em;
}
.post-dek {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1em;
}

/* Search results */
.search-results {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1em;
  margin: 1em 0;
}
.search-result {
  border-bottom: 1px dashed var(--line);
  padding: 0.5em 0;
}

/* Comments */
.comment {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1em;
  margin: 1em 0;
}
.comment-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0.5em;
}
.comment-body {
  color: var(--text);
}
.comment-actions {
  margin-top: 0.5em;
  font-size: 12px;
}

/* Tag filter */
.tag-filter {
  background: var(--surface);
  border: 1px solid var(--accent);
  padding: 0.5em 1em;
  margin: 1em 0;
  display: inline-block;
}
.no-posts {
  text-align: center;
  color: var(--muted);
  padding: 2em;
}

/* Back link */
.back-link {
  display: inline-block;
  margin: 1em 0;
  color: var(--link);
  text-decoration: underline;
}
