/* ardops.dev — reusable components (buttons, sections, cards, links) */

/* ── Section primitives ─────────────────────────── */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-content);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-short) var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Talk card ──────────────────────────────────── */
.talk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.talk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
}

.talk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.talk-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.talk-event {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.talk-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.talk-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: all var(--dur-short) var(--ease-out);
}

.resource-link:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.resource-link.is-coming {
  cursor: not-allowed;
  color: var(--text-muted);
  opacity: 0.55;
  font-style: italic;
}

.resource-link.is-coming:hover {
  border-color: var(--border);
  background: var(--bg-secondary);
  transform: none;
}

.resource-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Talk badge: "Próximamente" variant (spec 002) ── */
/* Contraste: text var(--accent) #22d3ee sobre composición
   var(--accent-dim) (alpha 0.15) + var(--bg-card) #1a2235 ≈ #22323e.
   Ratio aprox 8.05:1 (≥ 4.5:1 AA, ≥ 7:1 AAA). Verificado contra
   contracts/a11y-badge.md. */
.talk-badge--coming {
  border: 1px dashed var(--accent);
  animation: pulse-glow 3s var(--ease-out) infinite alternate;
  /* prefers-reduced-motion handled globally en motion.css */
}

.talk-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.talk-meta-key {
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.talk-cta-info {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border);
}

.talk-cta-info > span[aria-hidden="true"] {
  color: var(--accent);
  margin-right: 0.4rem;
}

/* ── Pipeline step card ─────────────────────────── */
.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all var(--dur-short) var(--ease-out);
  position: relative;
}

.pipeline-step:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.step-tool {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Stat cards ─────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

/* ── Contact link pill ──────────────────────────── */
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--dur-short) var(--ease-out);
}

.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Blog placeholder ───────────────────────────── */
.blog-coming {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.blog-coming p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ── Terminal cursor ────────────────────────────── */
.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s steps(1) infinite;
  vertical-align: text-bottom;
}

/* ── Pipeline section (spec 005) ────────────────── */
.pipeline-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 60ch;
}

.pipeline-empty {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.pipeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .pipeline-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.pipeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color var(--dur-short) var(--ease-out),
    background var(--dur-short) var(--ease-out);
}

.pipeline-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.25);
}

.pipeline-item--coming-soon {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-dim), var(--bg-card));
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.pipeline-item--coming-soon:hover {
  background: linear-gradient(180deg, var(--accent-dim), var(--bg-card-hover));
}

.pipeline-stage,
.pipeline-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: fit-content;
}

.pipeline-stage[data-stage="coming-soon"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.pipeline-stage[data-stage="review"] {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--green-dim);
}

.pipeline-stage[data-stage="in-progress"] {
  color: var(--orange);
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.12);
}

.pipeline-stage[data-stage="backlog"] {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
}

.pipeline-type {
  color: var(--text-secondary);
  background: transparent;
}

.pipeline-stage-icon,
.pipeline-type-icon {
  flex-shrink: 0;
  fill: currentColor;
}

.pipeline-stage-label,
.pipeline-type-label {
  line-height: 1;
}

.pipeline-item-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.25rem 0 0;
  line-height: 1.35;
}

.pipeline-item-estimated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.pipeline-estimated-label {
  color: var(--text-secondary);
}

.pipeline-item-description {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.pipeline-item-link {
  margin: 0.25rem 0 0;
}

.pipeline-item-link a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-short) var(--ease-out);
}

.pipeline-item-link a:hover,
.pipeline-item-link a:focus-visible {
  border-bottom-color: var(--accent);
}

/* Group separation: when coming-soon items are followed by other stages,
   add a subtle divider only on the FIRST item of each subsequent stage.
   Achieved with sibling selectors. */
.pipeline-item--coming-soon + .pipeline-item:not(.pipeline-item--coming-soon),
.pipeline-item--review + .pipeline-item:not(.pipeline-item--coming-soon):not(.pipeline-item--review),
.pipeline-item--in-progress + .pipeline-item--backlog {
  position: relative;
}

/* ── Blog (spec 006) ────────────────────────────── */

.blog-intro {
  color: var(--text-secondary);
  margin: 0.5rem 0 1.5rem 0;
}

.post-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.post-list--index {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .post-list--landing,
  .post-list--index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1rem;
  transition: border-color var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-card:hover,
.post-card:focus-within {
  border-color: var(--accent);
}

.post-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-card-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus-visible {
  color: var(--accent);
}

.post-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.post-meta-sep {
  color: var(--border);
}

.post-date,
.post-reading-time {
  display: inline-block;
}

.post-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.post-tags {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.post-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
}

.blog-see-all {
  margin-top: 1.5rem;
  text-align: center;
}

.blog-see-all-link {
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  display: inline-block;
  transition: background var(--dur-short) var(--ease-out);
}

.blog-see-all-link:hover,
.blog-see-all-link:focus-visible {
  background: rgba(34, 211, 238, 0.08);
}

/* Post article (individual page) ----------------- */

.post-article {
  max-width: 720px;
  margin: 0 auto;
}

.post-article-header {
  margin-bottom: 2rem;
}

.post-article-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  margin: 0.5rem 0 1rem 0;
}

.post-article-body {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.post-article-body h2,
.post-article-body h3,
.post-article-body h4 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-article-body h2 { font-size: 1.4rem; }
.post-article-body h3 { font-size: 1.15rem; }
.post-article-body h4 { font-size: 1rem; }

.post-article-body p,
.post-article-body ul,
.post-article-body ol,
.post-article-body blockquote,
.post-article-body pre,
.post-article-body table {
  margin: 1rem 0;
}

.post-article-body ul,
.post-article-body ol {
  padding-left: 1.5rem;
}

.post-article-body li {
  margin: 0.35rem 0;
}

.post-article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-article-body a:hover,
.post-article-body a:focus-visible {
  text-decoration: none;
}

.post-article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

.post-article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-article-body pre code {
  background: transparent;
  padding: 0;
}

.post-article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.post-article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: var(--radius-sm);
}

.post-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.post-article-body th,
.post-article-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.post-article-body th {
  background: var(--bg-card);
  font-weight: 600;
}

.post-article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-back-link {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
}

.post-back-link:hover,
.post-back-link:focus-visible {
  color: var(--accent);
}

/* Post inline stat cards (reuses .stat-card from #about) */
.post-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .post-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.post-stats .stat-card {
  text-align: center;
}

/* About portrait (spec 006 — #about modification) */
.about-portrait {
  display: block;
  width: 256px;
  height: 256px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin: 0 auto 1.5rem auto;
}

@media (min-width: 768px) {
  .about-portrait {
    margin: 0 1.5rem 0 0;
    float: left;
    shape-outside: circle();
  }
}

/* ── Blog UX polish (spec 007) ──────────────────── */

/* Post layout: aside TOC + article column */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 5rem 2rem;
}

@media (min-width: 1024px) {
  .post-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    max-width: 1100px;
    margin: 0 auto;
  }
}

/* Override .post-article max-width inside layout (already 720px) */
.post-layout .post-article {
  margin: 0;
}

@media (min-width: 1024px) {
  .post-layout .post-article {
    max-width: 760px;
  }
}

/* Refined typography for body */
.post-article-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-article-body p {
  line-height: 1.75;
}

.post-article-body h2 {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-top: 2.5rem;
  font-size: 1.4rem;
  scroll-margin-top: 6rem;
}

.post-article-body h3 {
  font-family: var(--font-mono);
  color: var(--text-primary);
  scroll-margin-top: 6rem;
}

.post-article-body h4,
.post-article-body h5,
.post-article-body h6 {
  scroll-margin-top: 6rem;
}

/* Inline code differentiated */
.post-article-body code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  color: var(--accent);
  font-size: 0.88em;
}

/* Fenced code block: keep dark, add accent rail */
.post-article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
}

.post-article-body pre code {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Blockquote with accent rail */
.post-article-body blockquote {
  border-left: 3px solid var(--blockquote-border);
  background: rgba(34, 211, 238, 0.04);
  padding: 0.75rem 1rem;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: normal;
}

/* Responsive table */
.post-article-body table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .post-article-body table {
    display: table;
    white-space: normal;
  }
}

/* TOC */
.post-toc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--toc-text);
}

.post-toc--aside {
  display: none;
}

@media (min-width: 1024px) {
  .post-toc--aside {
    display: block;
    position: sticky;
    top: 6rem;
    background: var(--toc-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
  .post-toc--mobile {
    display: none;
  }
}

.post-toc-label {
  margin: 0 0 0.5rem 0;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.post-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-toc-item--h3 {
  padding-left: 1rem;
  font-size: 0.8rem;
}

.post-toc-list a {
  color: var(--toc-text);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  display: inline-block;
  line-height: 1.4;
}

.post-toc-list a:hover,
.post-toc-list a:focus-visible {
  color: var(--accent);
  border-left-color: var(--accent);
}

.post-toc--mobile {
  background: var(--toc-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.post-toc--mobile summary {
  cursor: pointer;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
}

.post-toc--mobile .post-toc-list {
  margin-top: 0.75rem;
}

/* Post footer: tags + back + share */
.post-article-footer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-article-footer .post-tags {
  margin: 0;
}

.post-share {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.post-share-label {
  margin: 0 0 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-share-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-share-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: background var(--dur-short) var(--ease-out);
}

.post-share-link:hover,
.post-share-link:focus-visible {
  background: var(--code-bg);
}

/* ── Blog index (spec 007 — US2) ─────────────────── */

.blog-index {
  /* uses .section spacing */
}

.section-lead {
  color: var(--text-secondary);
  margin: 0.5rem 0 2rem 0;
  max-width: 60ch;
}

.blog-filters-radios {
  border: 0;
  padding: 0;
  margin: 0;
}

/* Focus ring on chip when the linked hidden radio receives focus */
.blog-filters-radios input:focus-visible + .chip--filter,
.blog-index input[name="blog-tag"]:focus-visible ~ .blog-filters .chip--filter {
  /* generic fallback; chip-specific rules below */
}

.blog-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .blog-filters {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.blog-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip--filter {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-short) var(--ease-out),
              background var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
  user-select: none;
}

.chip--filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* When the chip's label is active, count inherits the active text color. */
.chip--filter:hover .chip-count,
.blog-index:has(input[name="blog-tag"]:checked) .chip--filter[for] .chip-count {
  /* generic — overridden below by per-tag rule via :has() */
}

/* Focus ring for hidden radios reflected on the label */
.blog-filters-radios input:focus-visible + * ~ .blog-filters .chip--filter,
.blog-filters-radios input:focus-visible ~ .blog-filters .chip--filter {
  /* no-op fallback; specific chip rule is injected per-tag from build */
}

.blog-search {
  flex: 1;
  max-width: 320px;
}

.blog-search input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  transition: border-color var(--dur-short) var(--ease-out);
}

.blog-search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.blog-results-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.blog-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.blog-clear-filters {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: background var(--dur-short) var(--ease-out);
}

.blog-clear-filters:hover,
.blog-clear-filters:focus-visible {
  background: var(--code-bg);
}

/* Refined post card layout */
.post-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: -1.25rem -1.25rem 0.75rem -1.25rem;
  width: calc(100% + 2.5rem);
  display: block;
  border-bottom: 1px solid var(--border);
}

.post-card-cta {
  margin: 0.5rem 0 0 0;
}

.post-card-cta a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.post-card-cta a:hover,
.post-card-cta a:focus-visible {
  text-decoration: underline;
}

@media (min-width: 1200px) {
  .post-list--index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================
   Uses page — spec 010
   ============================================================ */
.uses-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.uses-list dt {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.75rem;
}

.uses-list dt:first-of-type {
  margin-top: 0;
}

.uses-list dd {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.uses-updated {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* ── Speaking page (spec 012) ────────────────────── */
.speaking-cta-row {
  margin-top: 2rem;
}

.speaking-cta-fallback {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.speaking-cta-fallback a {
  color: var(--accent);
}

.speaking-bio {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.speaking-bio[open] {
  border-color: var(--accent);
}

.speaking-bio > summary {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  outline-offset: 4px;
}

.speaking-bio > summary::-webkit-details-marker {
  display: none;
}

.speaking-bio > summary::before {
  content: "▸ ";
  color: var(--text-muted);
  display: inline-block;
  transition: transform var(--dur-short) var(--ease-out);
}

.speaking-bio[open] > summary::before {
  content: "▾ ";
  color: var(--accent);
}

.speaking-bio-body {
  margin-top: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.speaking-bio-body p + p {
  margin-top: 0.85rem;
}

.speaking-bio-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.speaking-copy-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green, var(--accent));
  min-height: 1em;
}

.speaking-headshot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 0;
}

.speaking-headshot img {
  width: min(320px, 60vw);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.speaking-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.speaking-topic {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
}

.speaking-topic h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--text-primary);
}

.speaking-topic p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.speaking-topic-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 0.85rem;
}

.speaking-topic-meta dt {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.speaking-topic-meta dd {
  margin: 0;
}

.speaking-formats {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.5rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
}

.speaking-formats dt {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
}

.speaking-formats dd {
  margin: 0;
  color: var(--text-secondary);
}

.speaking-highlights {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.speaking-highlights li + li {
  margin-top: 0.5rem;
}

.speaking-highlights a {
  color: var(--accent);
}

/* Now page (spec 013) */
.now-hero {
  padding-bottom: 1.5rem;
}

.now-banner {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.now-banner time {
  color: var(--accent);
}

.now-section {
  padding-block: 2rem;
}

.now-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.now-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.now-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.now-list a {
  color: var(--accent);
}

.now-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.now-credit p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 60ch;
}

.contact-now {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-now a {
  color: var(--accent);
  font-family: var(--font-mono);
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

/* ── Talks system (spec 019) ──────────────────────── */

/* talk-card--published: variante "publicada" del card base.
   Reusa .talk-card como estructura; solo cambia acentos y CTA. */
.talk-card--published {
  border-color: var(--accent);
}

.talk-badge--published {
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.talk-title-link {
  color: var(--text-primary);
  text-decoration: none;
}

.talk-title-link:hover,
.talk-title-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.talk-cta {
  margin-top: 1.5rem;
}

.talk-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.talk-tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.talk-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 2rem;
}

/* Page layouts: padding-top to clear fixed .site-header (FR-026) */
.talks-page,
.talk-page {
  padding: 5rem 2rem;
}

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

.talk-article-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0.5rem 0 1rem;
}

.talk-article-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.talk-article-body p {
  line-height: 1.75;
  margin: 1rem 0;
}

.talk-article-body h2 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.talk-article-body h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.talk-article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.talk-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.talk-article-body th,
.talk-article-body td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
}

.talk-article-body th {
  background: var(--bg-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.talk-article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.talk-article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.talk-article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.talk-hero {
  margin: 1.5rem 0 0;
}

.talk-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.talk-resources-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.talk-resources-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.talk-resources-list .resource-link .resource-type {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
}

.talk-article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0.5rem 0 0;
}
