/* Long-form writing, using the personal site's colors and typefaces. */

.post-page {
  max-width: 48rem;
  padding-top: 3rem;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.post-nav a { color: var(--muted); }

.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.post-header h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.post-subtitle {
  margin: 1.15rem 0 1.5rem;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.5;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.post-author { display: flex; align-items: center; gap: 0.6rem; }
.post-author a { color: inherit; }
.post-author img { width: 2rem; height: 2rem; border-radius: 3px; object-fit: cover; }

.post-body {
  max-width: 68ch;
  font-size: 1.125rem;
  line-height: 1.8;
}

.post-body p { margin: 0 0 1.35rem; }
.post-body a { overflow-wrap: anywhere; }

.post-body h2 {
  margin: 2.75rem 0 1.25rem;
  padding-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink);
  scroll-margin-top: 2rem;
  text-wrap: balance;
}

.post-body .thought {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  font-size: 1.3rem;
  line-height: 1.6;
}

.post-body hr {
  width: 3rem;
  margin: 2.75rem 0;
  border: 0;
  border-top: 1px solid var(--accent);
}

.reasoning-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.reasoning-steps li {
  display: flex;
  gap: 0.85rem;
  padding: 1.25rem 1rem 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.55;
  font-size: 1rem;
}

.reasoning-steps li:nth-child(even) { padding-left: 1rem; }
.step-number { color: var(--accent); font-family: var(--mono); font-size: 0.75rem; padding-top: 0.22rem; }
.step-title { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.step-description { display: block; color: var(--muted); }

.post-footer { color: var(--muted); }
.post-footer a { color: var(--muted); }

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

@media (max-width: 480px) {
  .post-page { padding-top: 1.75rem; }
  .post-nav { margin-bottom: 2.5rem; }
  .post-body { font-size: 1.0625rem; }
  .post-body h2 { font-size: 1.45rem; }
  .post-subtitle { font-size: 1.125rem; }
  .reasoning-steps { grid-template-columns: 1fr; }
  .reasoning-steps li:nth-child(even) { padding-left: 0; }
  .post-body .thought { font-size: 1.2rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .post-page { max-width: none; padding: 0; }
  .post-nav, .post-footer { display: none; }
  .post-body { max-width: none; font-size: 11pt; }
  .post-header h1 { font-size: 26pt; }
  .post-body h2 { break-after: avoid; }
  .post-body a { color: inherit; border-bottom-color: #999; }
  .reasoning-steps, .thought { break-inside: avoid; }
}
