/*-----------------------------------*\
  #BLOG
\*-----------------------------------*/

.blog-posts { margin-bottom: 10px; }

.blog-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.blog-post-item > a {
  background: var(--border-gradient-onyx);
  height: 100%;
  box-shadow: var(--shadow-4);
  border-radius: 16px;
}

.blog-post-item > a::before { background: var(--eerie-black-1); }

.blog-content { padding: 15px; }

.blog-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.blog-meta :is(.blog-category, time) {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.blog-meta .dot {
  background: var(--light-gray-70);
  width: 4px;
  height: 4px;
  border-radius: 4px;
}

.blog-item-title {
  margin-bottom: 10px;
  line-height: 1.3;
  transition: var(--transition-1);
}

.blog-post-item > a:hover .blog-item-title { color: var(--orange-yellow-crayola); }

.blog-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}



/*-----------------------------------*\
  #BLOG POST
\*-----------------------------------*/

.post-page {
  min-height: 100vh;
  padding: 24px 16px 48px;
}

.post-shell {
  max-width: 920px;
  margin: 0 auto;
}

.post-article {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow-1);
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
}

.post-header {
  margin-bottom: 30px;
}

.post-kicker {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.post-title {
  color: var(--white-2);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--light-gray-70);
  font-size: var(--fs-6);
}

.post-summary {
  color: var(--light-gray);
  font-size: var(--fs-5);
  font-weight: var(--fw-300);
  line-height: 1.7;
  max-width: 70ch;
}

.post-content {
  display: grid;
  gap: 22px;
}

.post-content h2,
.post-content h3 {
  color: var(--white-2);
  line-height: 1.3;
}

.post-content p,
.post-content li {
  color: var(--light-gray);
  font-size: var(--fs-5);
  font-weight: var(--fw-300);
  line-height: 1.8;
}

.post-content ul,
.post-content ol {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.post-content ul li {
  list-style: disc;
}

.post-content ol li {
  list-style: decimal;
}

.post-content a {
  display: inline;
  color: var(--orange-yellow-crayola);
}

.post-content a:hover,
.post-content a:focus {
  color: var(--white-2);
}

.post-content code {
  display: inline;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--onyx);
  color: var(--orange-yellow-crayola);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
}

.post-content pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--jet);
  border-radius: 16px;
  background: var(--smoky-black);
  box-shadow: var(--shadow-1);
}

.post-content pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: var(--light-gray);
  line-height: 1.7;
}

.post-content blockquote {
  padding-left: 18px;
  border-left: 3px solid var(--orange-yellow-crayola);
}

.post-content blockquote p {
  color: var(--light-gray-70);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-6);
  overflow-x: auto;
  display: block;
}

.post-content th,
.post-content td {
  padding: 8px 14px;
  border: 1px solid var(--jet);
  text-align: left;
  line-height: 1.5;
  white-space: nowrap;
}

.post-content th {
  background: var(--onyx);
  color: var(--white-2);
  font-weight: var(--fw-500);
}

.post-content td {
  color: var(--light-gray);
}


/*-----------------------------------*\
  #READING PROGRESS BAR
\*-----------------------------------*/

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--orange-yellow-crayola);
  z-index: 999;
  transition: width 0.1s linear;
}


/*-----------------------------------*\
  #COPY CODE BUTTON
\*-----------------------------------*/

.post-content pre {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  background: var(--jet);
  color: var(--light-gray);
  font-size: var(--fs-8);
  font-family: var(--ff-poppins);
  font-weight: var(--fw-500);
  border-radius: 6px;
  border: 1px solid var(--onyx);
  cursor: pointer;
  transition: color var(--transition-1), background var(--transition-1);
  opacity: 0.7;
}

.copy-btn:hover,
.copy-btn:focus {
  opacity: 1;
  color: var(--orange-yellow-crayola);
}

.copy-btn.copied {
  color: hsl(140, 60%, 55%);
  opacity: 1;
}


/*-----------------------------------*\
  #POST NAV ROW
\*-----------------------------------*/

.post-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}



/*-----------------------------------*\
  #BLOG SEARCH & FILTER
\*-----------------------------------*/

.blog-filter {
  margin-bottom: 30px;
  display: grid;
  gap: 20px;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  background: var(--eerie-black-1);
  color: var(--white-2);
  font-size: var(--fs-6);
  padding: 12px 15px;
  padding-left: 45px;
  border: 1px solid var(--jet);
  border-radius: 12px;
  transition: var(--transition-1);
}

.search-input:focus {
  outline: none;
  border-color: var(--orange-yellow-crayola);
}

.search-wrapper ion-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--light-gray-70);
  font-size: 18px;
}

.filter-collapsible {
  background: var(--border-gradient-onyx);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
}

.filter-summary {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  list-style: none;
  user-select: none;
}

.filter-summary::-webkit-details-marker {
  display: none;
}

.filter-summary span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-summary ion-icon {
  font-size: 16px;
  color: var(--orange-yellow-crayola);
  transition: transform var(--transition-1);
}

.filter-collapsible[open] .filter-summary ion-icon {
  transform: rotate(180deg);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
}

.filter-item button {
  color: var(--light-gray);
  font-size: var(--fs-6);
  background: var(--onyx);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--jet);
  transition: var(--transition-1);
}

.filter-item button:hover,
.filter-item button:focus {
  background: var(--jet);
  color: var(--white-2);
}

.filter-item button.active {
  color: var(--orange-yellow-crayola);
  border-color: var(--orange-yellow-crayola);
  background: var(--bg-gradient-jet);
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.post-tag {
  background: var(--onyx);
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--jet);
}
