/* ── Blog Styles ── */
/* Uses same design tokens from style.css */

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 100px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.3s;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb .sep {
  margin: 0 8px;
  color: var(--border-hover);
}

/* ── BLOG ARCHIVE ── */
.blog-header {
  margin-bottom: 56px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s var(--ease-out-expo);
}
.blog-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

.blog-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.03);
}

.blog-card-body {
  padding: 28px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-card-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(110,238,160,0.08);
  border: 1px solid rgba(110,238,160,0.15);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.3s;
}
.blog-card-badge:hover {
  background: rgba(110,238,160,0.15);
}

.blog-card-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.blog-card-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-white);
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.blog-card-title a {
  color: inherit;
  transition: color 0.3s;
}
.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-readtime {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.blog-card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.3s;
}
.blog-card-link:hover {
  opacity: 0.8;
}

/* ── PAGINATION ── */
.blog-pagination {
  margin-top: 56px;
  text-align: center;
}
.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease-out-expo);
}
.blog-pagination .page-numbers:hover {
  border-color: var(--border-hover);
  color: var(--text-bright);
}
.blog-pagination .page-numbers.current {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}

/* ── SINGLE POST ── */
.post-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.post-date,
.post-readtime {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--text-white);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ── POST CONTENT ── */
.post-content {
  max-width: 720px;
  margin: 0 auto;
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-white);
  margin: 56px 0 20px;
  letter-spacing: -0.02em;
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 40px 0 16px;
}

.post-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 32px 0 12px;
}

.post-content p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(110,238,160,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s;
}
.post-content a:hover {
  text-decoration-color: var(--accent);
}

.post-content strong {
  color: var(--text-bright);
  font-weight: 600;
}

.post-content ul,
.post-content ol {
  margin: 0 0 24px 24px;
  color: var(--text);
}
.post-content li {
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--bg-card);
  border-radius: 0 12px 12px 0;
}
.post-content blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid var(--border);
}

/* Code blocks – terminal-style */
.post-content pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-bright);
}

.post-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 5px;
  color: var(--accent);
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
}
.post-content th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.post-content td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.post-content tr:last-child td {
  border-bottom: none;
}

/* ── POST TAGS ── */
.post-tags {
  max-width: 720px;
  margin: 40px auto 0;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.3s;
}
.tag-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── POST CTA ── */
.post-cta {
  max-width: 720px;
  margin: 64px auto 0;
}
.post-cta-inner {
  background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(78,205,196,0.06) 100%);
  border: 1px solid rgba(110,238,160,0.15);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}
.post-cta-inner h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--text-white);
  margin-bottom: 8px;
}
.post-cta-inner p {
  color: var(--text);
  margin-bottom: 24px;
  font-size: 1rem;
}

/* ── POST NAVIGATION ── */
.post-nav {
  max-width: 720px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.35s var(--ease-out-expo);
}
.post-nav-link:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.post-nav-next {
  text-align: right;
}
.post-nav-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.post-nav-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-bright);
  line-height: 1.4;
}

/* ── SEARCH FORM ── */
.search-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
}
.search-field {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.3s;
}
.search-field:focus {
  border-color: var(--accent);
}
.search-field::placeholder {
  color: var(--text-secondary);
}
.search-submit {
  padding: 12px 24px;
  font-size: 0.88rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-cta-inner {
    padding: 28px;
  }
}
