*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-line);
  min-height: 100vh;
}

a {
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Skip link */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--page-pad-x-mobile);
  z-index: 100;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-to-content:focus {
  top: 8px;
}

/* ── Prose styles (post body) ───────────────────────────────────── */
.prose {
  max-width: var(--content-max);
}

.prose p {
  margin-bottom: 22px;
  color: #1f1f1f;
}

.prose h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.2px;
  margin-top: 44px;
  margin-bottom: 14px;
}

.prose h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin-top: 32px;
  margin-bottom: 10px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
  margin-bottom: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.prose blockquote {
  border-left: 2px solid var(--color-rule);
  padding-left: 20px;
  color: var(--color-muted);
  font-style: italic;
  margin: 28px 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-rule-soft);
  margin: 40px 0;
}

/* Prose links: terracotta on hover, no background tint */
.prose a {
  text-decoration: underline;
  text-decoration-color: var(--color-rule);
  text-underline-offset: 2px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.prose a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.prose a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 1px;
}

/* @media print */
@media print {
  .site-masthead,
  .site-footer,
  .post-footer {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .prose a {
    text-decoration: none;
    color: inherit;
  }

  .prose a::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #555;
  }
}

/* Reduced-motion: disable animated transitions */
@media (prefers-reduced-motion: reduce) {
  .rc-post-link .rc-post-title::after {
    transition: none !important;
  }
  .rc-project-card,
  .rc-nav-link,
  .rc-post-link {
    transition: none !important;
  }
}
