/* Blog-specific layer on top of the Arlo AI design system.
   Every value below resolves to a token from design/tokens/ — no new colors,
   no new radii, no new easing. Two things the system does not define are
   authored here because a blog needs them: long-form article prose and code
   blocks (the system uses mono in pills only). Both stay inside the contract:
   sunken surface, hairline border, and the one accent. */

/* ------------------------------------------------------------------ layout */

main { padding-top: 64px; } /* clears the fixed nav */

.page-head { padding: 96px 0 48px; }
.page-head h1 {
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
  margin-bottom: 20px;
}
.page-sub {
  font-size: var(--fs-subtitle);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  max-width: 620px;
}

/* --------------------------------------------------------------- lang switch */

/* Same pill as .lang-switch upstream, but links rather than buttons — each
   language is a real URL here, not client state. */
.lang-links a,
.lang-links .lang-current {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}
.lang-links a:hover { color: var(--text-body); }
.lang-links .lang-current {
  background: var(--color-bg);
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------- post list */

.post-list-section { padding: 0 0 100px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.post-list { list-style: none; }
.post-item + .post-item { margin-top: 16px; }

.post-item > a {
  display: block;
  padding: 28px;
  background: var(--surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
.post-item > a:hover {
  border-color: var(--color-accent-glow);
  box-shadow: var(--shadow-md), var(--ring-accent);
  transform: translateY(-2px);
}
.post-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.post-item time {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-faint);
}
.post-item h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-title);
  margin-bottom: 8px;
}
.post-item p {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--text-muted);
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.empty {
  padding: 48px 0;
  color: var(--text-faint);
  font-size: var(--fs-small);
}

/* ------------------------------------------------------------------ article */

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 0 100px;
}
.post-header { margin-bottom: 48px; }
.post-header h1 {
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
  margin-bottom: 20px;
}
.post-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.post-byline a { color: var(--text-muted); transition: color var(--transition-fast); }
.post-byline a:hover { color: var(--color-accent); }
.post-byline .sep { color: var(--color-border-strong); }

/* ponytail: long-form prose runs at body-lg (1.125/1.7) rather than the 1rem
   default — same token, chosen for reading length, not a new scale step. */
.post-body { font-size: var(--fs-subtitle); line-height: var(--lh-relaxed); }
.post-body > * + * { margin-top: 24px; }
.post-body h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
  margin-top: 64px;
}
.post-body h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-title);
  margin-top: 40px;
}
.post-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-glow);
  text-underline-offset: 3px;
  transition: opacity var(--transition-fast);
}
.post-body a:hover { opacity: 0.7; }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li + li { margin-top: 8px; }
.post-body blockquote {
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--color-accent-glow);
  color: var(--text-muted);
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 48px 0;
}
.post-body figcaption,
.post-body small {
  font-size: var(--fs-small);
  color: var(--text-faint);
}
.post-body .table-wrap { overflow-x: auto; }

/* --------------------------------------------------------------------- code */

/* Inline code borrows the pill treatment the system reserves for mono. */
.post-body :not(pre) > code {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.8125em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-radius: var(--radius-pill);
}

.post-body pre.code,
.post-body pre {
  overflow-x: auto;
  padding: 20px 24px;
  background: var(--surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.post-body pre code {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--text-body);
}

/* Three colors, not eight. Highlighting is applied at build time by
   highlight.js; this maps its classes onto the indigo ramp. */
.hljs-comment, .hljs-quote { color: var(--text-faint); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in,
.hljs-name, .hljs-doctag, .hljs-meta { color: var(--color-accent); }
.hljs-string, .hljs-regexp, .hljs-symbol, .hljs-number,
.hljs-addition, .hljs-attr, .hljs-attribute { color: var(--color-success); }
.hljs-title, .hljs-section, .hljs-type, .hljs-variable, .hljs-template-variable,
.hljs-params, .hljs-tag, .hljs-punctuation, .hljs-operator { color: var(--text-body); }
.hljs-deletion { color: var(--color-danger); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: var(--fw-semibold); }

/* ------------------------------------------------------------------- about */

.prose-page { max-width: 720px; margin: 0 auto; padding: 96px 0 100px; }

/* ---------------------------------------------------------------- not found */

.notfound { padding: 200px 0 160px; text-align: center; }
.notfound svg { margin: 0 auto 32px; }
.notfound h1 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
  margin-bottom: 12px;
}
.notfound .page-sub { margin: 0 auto 32px; }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 640px) {
  .page-head { padding: 64px 0 32px; }
  .page-head h1, .post-header h1 { font-size: 2.5rem; }
  .post, .prose-page { padding: 64px 0; }
  .post-item > a { padding: 20px; }
  .post-body { font-size: var(--fs-body); }
  .lang-links { align-self: center; }
}
