/* ===================================================
   Mi Blog — estilos cyberpunk / terminal
   =================================================== */

:root {
  --bg: #eef2f5;
  --bg-tile: #f7fafc;
  --frame-border: #0f172a;
  --text: #0f1720;
  --text-muted: #4b5a6b;
  --accent: #0066ff;
  --accent-2: #00838f;
  --accent-3: #b45f04;
  --link: #0066ff;
  --link-visited: #29477a;
  --header-bg: #dbe6ee;
  --card-bg: #ffffff;
  --card-border: #0f172a;
  --footer-bg: #0f172a;
  --footer-text: #4be3ff;
  --shadow: 4px 4px 0 rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] {
  --bg: #05070d;
  --bg-tile: #0a0f1a;
  --frame-border: #00e5ff;
  --text: #e6f7ff;
  --text-muted: #7fb8c9;
  --accent: #00b8ff;
  --accent-2: #21e6c1;
  --accent-3: #ffd23f;
  --link: #4be3ff;
  --link-visited: #6b8fb0;
  --header-bg: #0c1622;
  --card-bg: #081019;
  --card-border: #00e5ff;
  --footer-bg: #000000;
  --footer-text: #00e5ff;
  --shadow: 4px 4px 0 rgba(0, 229, 255, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--accent) var(--bg);
}

body {
  margin: 0;
  padding: 24px 12px 60px;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(45deg, var(--bg-tile) 0 12px, var(--bg) 12px 24px);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 4px solid var(--frame-border);
  box-shadow: var(--shadow);
}

/* -------------------- header -------------------- */

.site-header {
  background: var(--header-bg);
  border-bottom: 4px solid var(--frame-border);
  padding: 18px 24px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 2.2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--frame-border);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-tagline {
  margin: 6px 0 0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.marquee-bar {
  margin-top: 10px;
  background: var(--frame-border);
  color: var(--accent-3);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 4px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-bar span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 18s linear infinite;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* -------------------- nav -------------------- */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 24px;
  background: var(--bg-tile);
  border-bottom: 3px dashed var(--frame-border);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-weight: bold;
  color: var(--link);
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--accent);
}

#theme-toggle {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--card-bg);
  border: 3px solid var(--frame-border);
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

#theme-toggle:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

/* -------------------- main content -------------------- */

main {
  padding: 26px 28px 10px;
}

h1, h2, h3 {
  font-family: "Consolas", "Courier New", monospace;
  color: var(--accent-2);
}

hr.retro {
  border: none;
  border-top: 3px double var(--frame-border);
  margin: 24px 0;
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

/* -------------------- post list (index) -------------------- */

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

.post-card {
  border: 3px solid var(--card-border);
  background: var(--bg-tile);
  margin-bottom: 18px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}

.post-card .post-date {
  display: block;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.post-card h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.post-card h2 a {
  text-decoration: none;
}

.post-card h2 a:hover {
  text-decoration: underline;
}

.post-card p {
  margin: 0;
}

.read-more {
  display: inline-block;
  margin-top: 8px;
  font-weight: bold;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
}

/* -------------------- single post -------------------- */

.post-header .post-date {
  display: block;
  font-family: "Consolas", "Courier New", monospace;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.post-header h1 {
  margin-top: 0;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  font-family: "Consolas", "Courier New", monospace;
  font-weight: bold;
}

/* -------------------- badges / footer -------------------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 24px 4px;
}

.badge {
  border: 2px solid var(--frame-border);
  background: var(--card-bg);
  color: var(--text);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.7rem;
  padding: 5px 9px;
  white-space: nowrap;
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 16px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  border-top: 4px solid var(--frame-border);
}

.site-footer .visits {
  margin-top: 8px;
}

.visits-badge {
  vertical-align: middle;
  height: 20px;
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.6rem;
  }

  main {
    padding: 18px 16px 4px;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
