/* Blog pages — matches darb-web dark theme */
.blog-page {
  min-height: 100vh;
  background: var(--bg-dark);
  padding-top: clamp(96px, 14vw, 120px);
  padding-bottom: clamp(48px, 8vw, 80px);
}

.blog-page .page-header {
  padding: 0 20px 48px;
  text-align: center;
}

.blog-page .page-header .section-subtitle {
  margin-bottom: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 4vw, 28px);
  padding: 0 var(--container-pad);
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.blog-card:hover {
  border-color: rgba(218, 81, 40, 0.5);
  transform: translateY(-2px);
}

.blog-card-thumb {
  aspect-ratio: 16 / 10;
  background: #111;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fafafa;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.blog-empty,
.blog-loading,
.blog-error {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.blog-error {
  color: #f87171;
}

/* Homepage preview */
.blog-preview-section {
  padding: clamp(48px, 8vw, 80px) var(--container-pad);
  background: #0a0a0a;
}

.blog-preview-section .section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 4px;
}

@media (max-width: 600px) {
  .blog-preview-section .section-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-preview-section .section-title,
  .blog-preview-section .section-subtitle {
    text-align: left !important;
  }
}

.blog-preview-section .view-all {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
}

/* Single article */
.article-page {
  min-height: 100vh;
  background: var(--bg-dark);
  padding: clamp(96px, 14vw, 120px) var(--container-pad) clamp(48px, 8vw, 80px);
}

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.article-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.article-back:hover {
  text-decoration: underline;
}

.article-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.article-cover {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.article-body h2,
.article-body h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  color: #fff;
}

.article-body h2 {
  font-size: 1.5rem;
}

.article-body h3 {
  font-size: 1.25rem;
}

.article-body p {
  margin-bottom: 1em;
}

.article-body a {
  color: var(--primary-color);
  text-decoration: underline;
}

.article-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5em 0;
}

.article-body ul,
.article-body ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

/* Compact header on inner pages */
.page-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px var(--container-pad);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 900px) {
  body.nav-open .page-header-bar {
    background: rgba(10, 10, 10, 0.98);
    z-index: 203;
  }
}

.page-header-bar .header-inner {
  max-width: 1054px;
}

.page-header-bar .hero-section {
  min-height: auto;
  padding: 0;
}

.page-header-bar .header {
  padding: 0;
}

.page-header-bar .hero-bg,
.page-header-bar .hero-content {
  display: none;
}

.page-header-bar .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(32, 34, 36, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 500px;
  padding: 10px clamp(14px, 3vw, 30px);
  margin: 0 auto;
  max-width: 1054px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header-bar .logo img {
  height: 40px;
}

.page-header-bar .nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.page-header-bar .nav-links a {
  color: #fafafa;
  font-size: 14px;
  font-weight: 500;
}

.page-header-bar .nav-links a:hover,
.page-header-bar .nav-links a.active {
  color: var(--primary-color);
}

@media (max-width: 900px) {
  .page-header-bar .header-inner {
    border-radius: 20px;
  }
}
