/* Blog: preview & expand/collapse */
.blog-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
  word-break: break-word;
  max-height: 4.8em;
  font-weight: 500;
}

.blog-full[hidden],
.blog-preview[hidden] {
  display: none !important;
}

.blog-meta .blog-date {
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

/* Blog: Markdown content (dark theme) */
.blog-markdown {
  color: #9ca3af;
  line-height: 1.65;
  font-weight: 500;
}

.blog-markdown p {
  margin-bottom: 0.75rem;
}

.blog-markdown p:last-child {
  margin-bottom: 0;
}

.blog-markdown :last-child {
  padding-bottom: 0.125rem;
}

.blog-markdown h1, .blog-markdown h2, .blog-markdown h3 {
  color: #fff;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-markdown h1 { font-size: 1.5rem; }
.blog-markdown h2 { font-size: 1.25rem; }
.blog-markdown h3 { font-size: 1.125rem; }

.blog-markdown ul, .blog-markdown ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.blog-markdown li {
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.blog-markdown a {
  color: #22c55e;
  text-decoration: none;
}

.blog-markdown a:hover {
  text-decoration: underline;
}

.blog-markdown code {
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.blog-markdown pre {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.blog-markdown pre code {
  background: none;
  padding: 0;
}

.blog-markdown blockquote {
  border-left: 4px solid rgba(34, 197, 94, 0.5);
  margin: 1rem 0;
  padding-left: 1rem;
  color: #d1d5db;
  font-weight: 500;
}

.blog-markdown strong {
  color: #fff;
  font-weight: 700;
}

/* Blog post modal */
.blog-post-modal.hidden {
  display: none !important;
}

.blog-post-modal:not(.hidden) {
  display: flex !important;
}

.blog-post-modal-panel {
  z-index: 1;
}

.blog-post-modal-content {
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.blog-post-modal-close {
  font-size: 1.5rem;
  line-height: 1;
}

.blog-full-modal .blog-meta {
  margin-bottom: 1rem;
}

/* Blog: card header — avatar right of title */
.blog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

/* Blog: card footer — Read more left, tag+date right */
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.blog-preview-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Blog: team photo in modal — profile card */
.blog-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-modal-photo {
  width: 180px;
  min-height: 220px;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.blog-modal-header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
}

.blog-modal-header h1 {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  font-size: 1.75rem !important;
}

.blog-modal-header h2 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  color: #9ca3af !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

@media (max-width: 640px) {
  .blog-modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  .blog-modal-photo {
    width: 140px;
    min-height: 170px;
  }
  .blog-modal-header-text {
    min-height: auto;
  }
}
