/* ============================================
   Blog styles
   Index page is standalone; post pages load
   ../projects/project.css first, then this file.
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: opacity 0.3s ease; }
a:hover { opacity: 0.7; }

/* ============================================
   Navigation (index page — mirrors homepage)
   ============================================ */
.blog-index .navigation {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 0;
}
.blog-index .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.blog-index .nav-logo { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 0.9375rem; text-transform: lowercase; font-weight: 400; }
.nav-links a.is-active { font-weight: 600; }
.nav-cta {
  background-color: #000; color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-weight: 500;
}
.nav-cta:hover { opacity: 1; background-color: #333; }
.nav-menu-toggle {
  display: none;
  background: none;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  text-transform: lowercase;
}
.nav-mobile-panel {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 1.5rem 1.5rem;
  z-index: 999;
}
.nav-mobile-panel a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  border-bottom: 1px solid #f0f0f0;
  text-transform: lowercase;
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel.is-open { display: block; }

@media (max-width: 768px) {
  .blog-index .navigation { padding: 1rem 0; }
  .blog-index .nav-container { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-menu-toggle { display: inline-block; }
}

/* ============================================
   Blog hero
   ============================================ */
.blog-hero { padding: 9rem 2rem 3rem; max-width: 1400px; margin: 0 auto; }
.blog-label {
  font-size: 0.875rem; color: #999;
  text-transform: lowercase;
  margin-bottom: 1.5rem; font-weight: 500;
}
.blog-heading {
  font-size: clamp(2.75rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.blog-intro {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #666;
  max-width: 640px;
  margin-top: 1.5rem;
}


/* ============================================
   Post list
   ============================================ */
.blog-section { padding: 2rem 2rem 6rem; max-width: 1400px; margin: 0 auto; }
.blog-section-title {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  color: #000;
  padding: 2rem 0;
  letter-spacing: -0.02em;
  position: relative;
}
.blog-section-title::before, .blog-section-title::after {
  content: ''; position: absolute; left: 0; right: 0;
  height: 1px; background-color: #e5e5e5;
}
.blog-section-title::before { top: 0; }
.blog-section-title::after { bottom: 0; }

.post-list { list-style: none; }
.post-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid #e5e5e5;
}
.post-date { font-size: 0.875rem; font-weight: 500; color: #666; padding-top: 0.5rem; }
.post-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.post-excerpt { font-size: 0.9375rem; color: #333; max-width: 640px; margin-bottom: 1rem; }
.post-read-time { font-size: 0.8125rem; color: #999; }

/* Chunky button — same as the project pages (From Uiverse.io by arthur_6104) */
.blog-index .box-button {
  cursor: pointer;
  border: 4px solid black;
  background-color: gray;
  padding-bottom: 10px;
  transition: 0.1s ease-in-out;
  user-select: none;
  display: inline-block;
}
.blog-index .button {
  background-color: #dddddd;
  border: 4px solid #fff;
  padding: 3px 8px;
}
.blog-index .button span { font-size: 1.1em; letter-spacing: 1px; white-space: nowrap; }
.blog-index .box-button:active {
  padding: 0;
  margin-bottom: 10px;
  transform: translateY(10px);
}
.blog-index .box-button:hover { opacity: 1; }
.post-more { justify-self: start; margin-top: 0.25rem; }

/* Project tags on each post in the list */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.post-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  cursor: pointer;
  font-family: inherit;
}
.post-tag:hover { color: #000; border-color: #000; }

/* ============================================
   Project filter
   ============================================ */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e5e5;
}
.filter-chip {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.filter-chip:hover { border-color: #000; }
.filter-chip.is-active { background: #000; border-color: #000; color: #fff; }
.filter-chip .chip-count { opacity: 0.5; margin-left: 0.35rem; font-weight: 400; }
.blog-filter-status { font-size: 0.875rem; color: #666; padding-top: 1.25rem; }
.blog-filter-status button {
  background: none; border: none; padding: 0;
  font: inherit; color: #000; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.post-empty { padding: 3rem 0; color: #666; font-size: 1rem; }
.post-empty a { color: #000; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .blog-hero { padding: 6.5rem 1.25rem 2rem; }
  .blog-section { padding: 1rem 1.25rem 4rem; }
  .post-item { grid-template-columns: 1fr; gap: 0.75rem; padding: 2rem 0; }
  .post-date { padding-top: 0; }
}

/* ============================================
   Footer (index page)
   ============================================ */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid #e5e5e5;
  max-width: 1400px;
  margin: 0 auto;
}
.footer-container {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 2rem;
}
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.9375rem; text-transform: lowercase; }
@media (max-width: 768px) {
  .footer { padding: 2.5rem 1.25rem; }
}

/* ============================================
   Article extras (post pages, on top of project.css)
   ============================================ */
.post-byline { margin-top: 1.5rem; font-size: 0.9375rem; color: #999; }
.content-text h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  margin: 2.5rem 0 1rem;
}
.content-text blockquote {
  border-left: 3px solid #000;
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #1a1a1a;
}
.content-text a { text-decoration: underline; text-underline-offset: 3px; }
.post-project-tag { color: #1a1a1a; }
.post-project-tag:hover { background-color: #e5e5e5; opacity: 1; }
.content-text .content-list { margin-bottom: 1.5rem; }
.content-list--ordered { counter-reset: post-ol; }
.content-list--ordered li { counter-increment: post-ol; }
.content-list--ordered li::before { content: counter(post-ol) '.'; }
.post-figure { margin: 2rem 0; }
.post-figure img { width: 100%; height: auto; display: block; border: 1px solid #e5e5e5; }
.post-figure figcaption { font-size: 0.875rem; color: #999; margin-top: 0.5rem; }
.content-text img { max-width: 100%; height: auto; }
.content-text pre {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.content-text pre code { background: none; border: none; padding: 0; }
.content-text hr { border: none; border-top: 1px solid #e5e5e5; margin: 2.5rem 0; }
.content-text code {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
