/*
 * blog.css — Blog list and single post styles
 */

/* ── Blog list page ──────────────────────────────────────── */

.blog-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-header {
  margin-bottom: 2.5rem;
}

.blog-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #1c1f26;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.blog-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #6b7a8a;
}

.blog-empty {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: #9ca3af;
  letter-spacing: 0.1em;
  padding: 3rem 0;
  text-align: center;
}

/* ── Blog post cards ─────────────────────────────────────── */

.blog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.blog-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(60, 70, 90, 0.10);
  border-radius: 2px;
  padding: 1.6rem 1.8rem;
  position: relative;
  box-shadow: 0 1px 4px rgba(28, 31, 38, 0.06);
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: 0 2px 12px rgba(28, 31, 38, 0.10);
}

/* Left accent bar */
.blog-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #3d6b8f;
  opacity: 0.4;
  border-radius: 2px 0 0 2px;
  transition: opacity 0.2s;
}

.blog-card:hover::before {
  opacity: 0.8;
}

/* ── Card meta: date + category ──────────────────────────── */

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.blog-card__category {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: #3d6b8f;
  padding: 0.15em 0.6em;
  border-radius: 2px;
  opacity: 0.85;
}

.blog-card__date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

/* ── Title ───────────────────────────────────────────────── */

.blog-card__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.blog-card__title-link {
  color: #1c1f26;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card__title-link:hover {
  color: #3d6b8f;
}

/* ── Excerpt and full content ────────────────────────────── */

.blog-card__excerpt,
.blog-card__full {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.75;
}

.blog-card__full p + p { margin-top: 1em; }
.blog-card__full h2    { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.05em; color: #1c1f26; margin: 1.8em 0 0.6em; }
.blog-card__full h3    { font-family: 'Share Tech Mono', monospace; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6b7a8a; margin: 1.4em 0 0.5em; }
.blog-card__full pre   { background: rgba(28,31,38,0.05); border: 1px solid rgba(60,70,90,0.12); border-radius: 2px; padding: 1rem 1.2rem; overflow-x: auto; margin: 1em 0; }
.blog-card__full code  { font-family: 'Share Tech Mono', monospace; font-size: 0.82rem; }
.blog-card__full pre code { font-size: 0.78rem; }
.blog-card__full ul,
.blog-card__full ol   { padding-left: 1.5em; margin: 0.8em 0; }
.blog-card__full li    { margin-bottom: 0.3em; }
.blog-card__full a     { color: #3d6b8f; }
.blog-card__full blockquote {
  border-left: 3px solid #3d6b8f;
  padding-left: 1rem;
  color: #6b7a8a;
  font-style: italic;
  margin: 1em 0;
}

/* ── Actions: expand button + permalink ──────────────────── */

.blog-card__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.btn-expand {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3d6b8f;
  background: transparent;
  border: 1px solid rgba(61,107,143,0.35);
  padding: 0.45em 1em;
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.2s;
}

.btn-expand:hover {
  background: #3d6b8f;
  color: #fff;
  border-color: #3d6b8f;
}

.btn-expand__arrow {
  font-size: 0.9em;
  transition: transform 0.2s;
}

.btn-expand[aria-expanded="true"] .btn-expand__arrow {
  transform: rotate(180deg);
}

.blog-card__permalink {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.70rem;
  letter-spacing: 0.1em;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card__permalink:hover { color: #3d6b8f; }

/* ── Single post page ────────────────────────────────────── */

.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-post__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(60,70,90,0.08);
}

.blog-post__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  letter-spacing: 0.04em;
  color: #1c1f26;
  line-height: 1.25;
  margin-top: 0.8rem;
}

.blog-post__content {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.1rem;
  color: #334155;
  line-height: 1.8;
}

.blog-post__content p + p      { margin-top: 1em; }
.blog-post__content h2         { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.05em; color: #1c1f26; margin: 2em 0 0.6em; }
.blog-post__content h3         { font-family: 'Share Tech Mono', monospace; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6b7a8a; margin: 1.6em 0 0.5em; }
.blog-post__content pre        { background: rgba(28,31,38,0.05); border: 1px solid rgba(60,70,90,0.12); border-radius: 2px; padding: 1.2rem 1.4rem; overflow-x: auto; margin: 1.2em 0; }
.blog-post__content code       { font-family: 'Share Tech Mono', monospace; font-size: 0.82rem; }
.blog-post__content pre code   { font-size: 0.78rem; line-height: 1.6; }
.blog-post__content ul,
.blog-post__content ol         { padding-left: 1.5em; margin: 0.8em 0; }
.blog-post__content li         { margin-bottom: 0.35em; }
.blog-post__content a          { color: #3d6b8f; }
.blog-post__content blockquote { border-left: 3px solid #3d6b8f; padding-left: 1rem; color: #6b7a8a; font-style: italic; margin: 1.2em 0; }

.blog-post__footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(60,70,90,0.08);
}

.blog-post__back {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7a8a;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-post__back:hover { color: #3d6b8f; }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 480px) {
  .blog-card__actions { flex-wrap: wrap; gap: 0.8rem; }
}

/* ── Post images and figures ─────────────────────────────── */

.post-figure {
  margin: 1.8em 0;
}

.post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(28,31,38,0.12);
}

.post-caption {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.70rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* ── YouTube / video embed ───────────────────────────────── */
/* 16:9 responsive wrapper — maintains aspect ratio at any width */

.post-figure--video {
  margin: 1.8em 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;  /* 16:9 ratio: 9/16 = 0.5625 */
  height: 0;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(28,31,38,0.12);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
