/* NOIA Blog — blog.css */

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

body {
  background: #F5F2ED;
  font-family: 'Inter', sans-serif;
  color: #3a2a1f;
}

/* Nav header */
.blog-header {
  background: #F5F2ED;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Footer */
.blog-footer {
  background: #2C1810;
  color: #C4D4BF;
  padding: 40px 32px;
  text-align: center;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}

/* Back link */
.back-link {
  color: #B5563E;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
}

.back-link:hover {
  opacity: 0.7;
}

/* Article meta */
.article-meta {
  color: #8a7a6a;
  font-size: 0.85rem;
  margin-bottom: 32px;
}

/* Article body */
article,
main {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3a2a1f;
  font-family: 'Inter', sans-serif;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: #2C1810;
  margin-bottom: 8px;
  line-height: 1.3;
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #2C1810;
  margin-top: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}

p {
  margin-bottom: 20px;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid #B5563E;
  padding-left: 20px;
  font-style: italic;
  color: #5a4a3f;
  margin-bottom: 20px;
}

/* Sources section */
.sources {
  font-size: 0.9rem;
  border-top: 1px solid rgba(75, 99, 83, 0.15);
  padding-top: 16px;
  margin-top: 40px;
}

.sources h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #2C1810;
  margin-bottom: 12px;
}

.sources a {
  color: #B5563E;
}

.sources p {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* CTA box */
.cta-box {
  background: rgba(75, 99, 83, 0.08);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-top: 48px;
}

.cta-button {
  background: #B5563E;
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.cta-button:hover {
  opacity: 0.9;
}

/* Category label */
.category-label {
  text-transform: uppercase;
  color: #B5563E;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ===================== */
/* Blog Index            */
/* ===================== */

.blog-index-hero {
  text-align: center;
  padding: 48px 20px 24px;
  max-width: 720px;
  margin: 0 auto;
}

.blog-index-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.blog-index-hero p {
  color: #5a4a3f;
  font-size: 1rem;
  font-family: 'Lora', serif;
  font-style: italic;
}

/* ===================== */
/* Tag Filter Bar        */
/* ===================== */

.tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.tag-pill {
  background: transparent;
  border: 1px solid rgba(44, 24, 16, 0.2);
  color: #5a4a3f;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-pill:hover {
  border-color: #B5563E;
  color: #B5563E;
}

.tag-pill.active {
  background: #B5563E;
  border-color: #B5563E;
  color: #fff;
}

.tag-divider {
  width: 1px;
  height: 20px;
  background: rgba(44, 24, 16, 0.15);
  margin: 0 4px;
}

/* Card grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Card */
.blog-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 28px 28px 24px;
  margin-bottom: 0;
  transition: box-shadow 0.25s ease, opacity 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-card.hidden,
.prereq-card.hidden {
  display: none;
}

.blog-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card .card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: #2C1810;
  margin: 8px 0 12px;
  line-height: 1.35;
}

.blog-card .card-excerpt {
  font-size: 0.88rem;
  color: #5a4a3f;
  line-height: 1.65;
  margin-bottom: 16px;
}

.blog-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.blog-card .card-date {
  font-size: 0.78rem;
  color: #8a7a6a;
}

.blog-card .card-read-time {
  font-size: 0.78rem;
  color: #8a7a6a;
  margin: 0;
}

.blog-card .card-sources {
  font-size: 0.72rem;
  color: #a09080;
  font-style: italic;
  letter-spacing: 0.01em;
  border-top: 1px solid rgba(75, 99, 83, 0.1);
  padding-top: 10px;
}

/* ===================== */
/* Prerequisite Reading  */
/* ===================== */

.prereq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.prereq-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.prereq-header .noia-n {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.prereq-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: #2C1810;
  margin: 0;
  font-weight: 600;
}

.prereq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.prereq-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 20px 20px 16px;
  border-top: 3px solid #B5563E;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  position: relative;
}

.prereq-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.prereq-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.prereq-card .prereq-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(181, 86, 62, 0.08);
  color: #B5563E;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.prereq-card .prereq-badge .noia-n-inline {
  width: 12px;
  height: 12px;
}

.prereq-card .card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #2C1810;
  margin: 0 0 8px;
  line-height: 1.3;
}

.prereq-card .card-excerpt {
  font-size: 0.82rem;
  color: #5a4a3f;
  line-height: 1.55;
  margin-bottom: 10px;
}

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

.prereq-card .card-date,
.prereq-card .card-read-time {
  font-size: 0.72rem;
  color: #8a7a6a;
}

.prereq-divider {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 24px;
}

.prereq-divider hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44, 24, 16, 0.12), transparent);
}

/* ===================== */
/* Article Tags          */
/* ===================== */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 24px;
}

.article-tags .tag-link {
  background: transparent;
  border: 1px solid rgba(44, 24, 16, 0.18);
  color: #5a4a3f;
  padding: 4px 12px;
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-tags .tag-link:hover {
  border-color: #B5563E;
  color: #B5563E;
}

/* Card tag pills (inline in cards) */
.blog-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.blog-card .card-tags .mini-tag {
  background: rgba(75, 99, 83, 0.08);
  color: #4B6353;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* ===================== */
/* Related Posts          */
/* ===================== */

.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(75, 99, 83, 0.15);
}

.related-posts h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: #2C1810;
  margin-bottom: 16px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-post-card {
  background: rgba(75, 99, 83, 0.04);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
  display: block;
}

.related-post-card:hover {
  background: rgba(75, 99, 83, 0.08);
}

.related-post-card .rp-category {
  text-transform: uppercase;
  color: #B5563E;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.related-post-card .rp-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #2C1810;
  margin: 4px 0 6px;
  line-height: 1.3;
}

.related-post-card .rp-excerpt {
  font-size: 0.78rem;
  color: #5a4a3f;
  line-height: 1.5;
}

/* ===================== */
/* Mobile responsive     */
/* ===================== */

@media (max-width: 640px) {
  main {
    max-width: 100%;
    padding: 32px 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .blog-header {
    padding: 12px 16px;
  }

  .blog-footer {
    padding: 32px 16px;
  }

  .cta-box {
    padding: 24px 16px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }

  .blog-card {
    max-width: 100%;
  }

  .blog-index-hero {
    padding: 32px 16px 20px;
  }

  .blog-index-hero h1 {
    font-size: 1.8rem;
  }

  .tag-filter-bar {
    padding: 0 16px 24px;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tag-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .tag-pill {
    font-size: 0.75rem;
    padding: 5px 12px;
    flex-shrink: 0;
  }

  .tag-divider {
    display: none;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .prereq-grid {
    grid-template-columns: 1fr;
  }

  .prereq-card .card-title {
    font-size: 1rem;
  }
}
