/* Article-specific styles. Layers on /css/home.css (tokens, header, footer, hero, card, links). */

/* Listing: Font Awesome glyph inside the round card icon */
.card-icon i { font-size: 1.4rem; color: var(--accent-deep); }

.empty { text-align: center; color: var(--ink-soft); padding: 2rem 0; }

/* Header logo (article detail only - other pages show it in the hero).
   Three-column grid centres the logo against the full header width. */
.article-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.article-header > div:first-child { grid-column: 1; justify-self: start; }
.article-header .header-logo { grid-column: 2; justify-self: center; }
.article-header > div:last-child { grid-column: 3; justify-self: end; }
.header-logo {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.header-logo img { height: 1.4rem; width: auto; display: block; }
.header-logo:hover { color: var(--accent-deep); }

/* Article page shell */
.article-main { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.back-link-icon {
  width: 0.85em;
  height: 0.85em;
  fill: currentColor;
}
.back-link:hover { color: var(--accent); }

.article-date {
  color: var(--ink-faint);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* Prose typography */
.prose { color: var(--ink); line-height: 1.7; }
.prose h1 { font-weight: 300; font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.01em; margin: 0.2rem 0 1.5rem; }
.prose h2 { font-weight: 500; font-size: 1.4rem; margin: 2.5rem 0 0.8rem; }
.prose h3 { font-weight: 500; font-size: 1.1rem; margin: 2rem 0 0.6rem; }
.prose p { margin: 0 0 1.1rem; }
.prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose blockquote { margin: 0 0 1.1rem; padding-left: 1rem; border-left: 3px solid var(--accent-ring); color: var(--ink-soft); }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }

/* Inline code */
.prose :not(pre) > code {
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
}

/* Code blocks (kept light to match Prism's default theme) */
.prose pre {
  background: #f6f8fa;
  color: #24292e;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.prose pre code { background: none; border: none; padding: 0; }

/* Task-list checklist */
.prose li.task-item {
  list-style: none;
  margin-left: -1.2rem;
  margin-bottom: 0.7rem;
}
.prose li.task-item label {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  cursor: pointer;
}
.prose li.task-item .task-checkbox {
  flex: 0 0 auto;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 1.45em;
  height: 1.45em;
  margin: 0;
  border: 2px solid var(--accent-ring);
  border-radius: 0.35em;
  background: var(--bg);
  cursor: pointer;
  transform: translateY(0.2em);
  transition: border-color var(--transition), background var(--transition);
}
.prose li.task-item .task-checkbox:hover { border-color: var(--accent); }
.prose li.task-item .task-checkbox:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}
.prose li.task-item .task-checkbox:checked {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.prose li.task-item .task-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 0.13em;
  left: 0.42em;
  width: 0.34em;
  height: 0.66em;
  border: solid #fff;
  border-width: 0 0.14em 0.14em 0;
  transform: rotate(45deg);
}
/* TL;DR sub-bullets under a checklist item */
.prose li.task-item ul {
  margin: 0.35rem 0 0;
  padding-left: 2.1em;
  list-style: disc;
}
.prose li.task-item ul li {
  list-style: disc;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
/* Tags */
.article-tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-tags .tag {
  font-size: 0.72rem;
  color: var(--accent-deep);
  background: var(--accent-ring);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

@media (max-width: 600px) {
  .article-main { padding: 1.5rem 1rem 3rem; }
}
