/* ============================================
   808 BLOG THEME — Inspired by tecnologia.808.mx
   Palette: Cream bg, black text, yellow accent
   ============================================ */

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

:root {
  --bg:        #E8E3D9;
  --bg-dark:   #1A1A1A;
  --text:      #0F0F0F;
  --text-muted:#5A5550;
  --accent:    #F0E040;
  --accent-hover: #E8D800;
  --border:    rgba(15,15,15,0.12);
  --radius:    4px;
  --max-w:     1160px;
  --max-content: 720px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.logo-image {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-badge-UNUSED {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-label { color: var(--text-muted); font-size: 0.75rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.6; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent); color: var(--text); }

/* ---- HERO ---- */
.home-hero {
  border-bottom: 1px solid var(--border);
  padding: 6rem 2rem 5rem;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 14ch;
}

.hero-title em {
  font-style: italic;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--text);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--text); color: var(--bg); }

/* ---- POSTS SECTION ---- */
.posts-section { padding: 4rem 2rem 6rem; }

.posts-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
  margin-bottom: 3rem;
}

/* ---- POST CARD ---- */
.post-card {
  background: transparent;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }

.card-image-wrap { display: block; overflow: hidden; aspect-ratio: 16/9; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .card-image { transform: scale(1.04); }

.card-content { padding: 1.5rem; }

.card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--text);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.card-title a { transition: opacity 0.2s; }
.card-title a:hover { opacity: 0.65; }

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.read-time::before { content: "· "; }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ---- POST FULL ---- */
.post-full { max-width: 100%; }

.post-header {
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
}

.post-header-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.post-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--text);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.post-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.post-excerpt {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 54ch;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-feature-image {
  max-height: 520px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.post-feature-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---- POST CONTENT ---- */
.post-content { padding: 3.5rem 2rem 4rem; }

.post-body {
  max-width: var(--max-content);
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.85;
}

.post-body h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
}

.post-body p { margin-bottom: 1.5rem; }

.post-body strong { font-weight: 600; }

.post-body em { font-style: italic; }

.post-body a {
  color: var(--text);
  border-bottom: 1.5px solid var(--accent);
  transition: border-color 0.2s;
}
.post-body a:hover { border-color: var(--text); }

.post-body ul, .post-body ol {
  padding-left: 1.75rem;
  margin-bottom: 1.5rem;
}
.post-body li { margin-bottom: 0.5rem; }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.5rem 1.5rem;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.post-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(0,0,0,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.875em;
}

.post-body pre {
  background: var(--bg-dark);
  color: #e8e8e8;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; color: inherit; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.post-body figure { margin: 2rem 0; }
.post-body figcaption {
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---- POST FOOTER ---- */
.post-footer { padding: 0 2rem 4rem; border-top: 1px solid var(--border); }

.post-footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
}

.post-tags-list { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tag-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  transition: background 0.2s;
}
.tag-pill:hover { background: var(--accent); color: var(--text); }

.post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.share-link {
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}
.share-link:hover { border-color: var(--text); }

.back-to-blog {
  max-width: var(--max-content);
  margin: 1.5rem auto 0;
}

/* ---- RELATED POSTS ---- */
.related-posts {
  background: rgba(0,0,0,0.03);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 4rem;
}

.related-inner { max-width: var(--max-w); margin: 0 auto; }

/* ---- TAG/CATEGORY HERO ---- */
.tag-hero {
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
}
.tag-hero-inner { max-width: var(--max-w); margin: 0 auto; }

/* ---- ERROR PAGE ---- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
}
.error-inner { text-align: center; }
.error-code {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 8rem;
  line-height: 1;
  color: var(--border);
  margin-bottom: 1rem;
}
.error-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.error-desc { color: var(--text-muted); margin-bottom: 2rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-dark);
  color: #e8e8e8;
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #fff;
}
.footer-desc { font-size: 0.85rem; color: rgba(255,255,255,0.5); max-width: 32ch; }

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.footer-link {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 1.25rem auto 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .site-nav .nav-link { display: none; }
  .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-right { align-items: flex-start; }
  .post-footer-inner { flex-direction: column; }
  .post-share { width: 100%; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; }
  .home-hero, .posts-section, .post-header, .post-content { padding-left: 1rem; padding-right: 1rem; }
  .nav-cta { padding: 0.4rem 0.85rem; font-size: 0.7rem; }
}
