/* Parchment & Ink — rockcampbell.com */

/* ── Design tokens ──────────────────────────────────────────── */

:root {
  --color-primary:   #2C2416;
  --color-secondary: #6B5C45;
  --color-tertiary:  #9E8C6E;
  --color-neutral:   #F4F0E8;
  --color-surface:   #FAF8F3;
  --color-border:    #DDD5C4;
  --color-accent:    #A63E28;
}

/* ── Reset & base ───────────────────────────────────────────── */

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

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

body {
  background-color: var(--color-neutral);
  color: var(--color-primary);
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Layout wrapper ─────────────────────────────────────────── */

.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  width: 100%;
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  background-color: var(--color-neutral);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-primary);
}

/* ── Content area ───────────────────────────────────────────── */

.site-content {
  flex: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.site-content__inner {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.site-main {
  flex: 1;
  min-width: 0;
}

/* ── Post list ──────────────────────────────────────────────── */

.post-list {
  list-style: none;
}

.post-list__entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list__entry:first-child {
  border-top: 1px solid var(--color-border);
}

.post-list__date {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--color-tertiary);
  line-height: 1.4;
  display: block;
  padding-top: 0.15rem;
}

.post-list__category {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-tertiary);
  display: block;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.post-list__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
  text-decoration: none;
  display: block;
  transition: color 150ms ease;
}

.post-list__title:hover {
  color: var(--color-accent);
}

.post-list__excerpt {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-secondary);
  line-height: 1.7;
  margin-top: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Page heading (list/taxonomy pages) ─────────────────────── */

.page-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* ── Single post ────────────────────────────────────────────── */

.post-header {
  margin-bottom: 2.5rem;
}

.post-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-primary);
}

.post-meta {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  margin-top: 0.875rem;
}

.post-meta__sep {
  margin: 0 0.4em;
  color: var(--color-tertiary);
}

/* ── Post body ──────────────────────────────────────────────── */

.post-content {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-primary);
}

.post-content > p:first-of-type::first-letter {
  font-family: 'Lora', Georgia, serif;
  font-size: 3.25rem;
  font-weight: 700;
  color: var(--color-accent);
  float: left;
  line-height: 1;
  margin-top: 0.05em;
  margin-right: 0.1em;
}

.post-content h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
}

.post-content h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content h4 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.post-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-border);
  transition: color 150ms ease;
}

.post-content a:hover {
  color: var(--color-accent);
}

.post-content blockquote {
  border-left: 3px solid var(--color-border);
  font-style: italic;
  color: var(--color-secondary);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.75rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

.post-content li:last-child {
  margin-bottom: 0;
}

.post-content strong {
  font-weight: 700;
  color: var(--color-primary);
}

.post-content em {
  font-style: italic;
}

.post-content code {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.post-content pre {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--color-primary);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.post-content th {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-tertiary);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.post-content td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-secondary);
  vertical-align: top;
}

.post-content img {
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

/* ── Post footer (tags & category) ──────────────────────────── */

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

.post-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-footer__row:last-child {
  margin-bottom: 0;
}

.post-footer__label {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--color-tertiary);
  text-transform: uppercase;
  white-space: nowrap;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Tag pill ────────────────────────────────────────────────── */

.tag-pill {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-secondary);
  background-color: var(--color-neutral);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 3px 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}

.tag-pill:hover {
  color: var(--color-primary);
  border-color: var(--color-secondary);
}

/* ── Sidebar ─────────────────────────────────────────────────── */

.site-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.sidebar-block {
  margin-bottom: 2.5rem;
}

.sidebar-block:last-child {
  margin-bottom: 0;
}

.sidebar-heading {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-tertiary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-about {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9375rem;
  color: var(--color-secondary);
  line-height: 1.7;
}

.sidebar-recent-list {
  list-style: none;
}

.sidebar-recent-list li {
  margin-bottom: 1rem;
}

.sidebar-recent-list li:last-child {
  margin-bottom: 0;
}

.sidebar-post-link {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  display: block;
  line-height: 1.45;
  transition: color 150ms ease;
}

.sidebar-post-link:hover {
  color: var(--color-accent);
}

.sidebar-post-date {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-tertiary);
  display: block;
  margin-top: 0.25rem;
}

.sidebar-category-list {
  list-style: none;
}

.sidebar-category-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.sidebar-category-list li:last-child {
  margin-bottom: 0;
}

.sidebar-category-link {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}

.sidebar-category-link:hover {
  color: var(--color-primary);
}

.sidebar-category-count {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-tertiary);
  flex-shrink: 0;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer__copy {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-tertiary);
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
}

.site-footer__links a {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.6875rem;
  color: var(--color-tertiary);
  text-decoration: none;
  transition: color 150ms ease;
}

.site-footer__links a:hover {
  color: var(--color-secondary);
}

/* ── 404 ─────────────────────────────────────────────────────── */

.not-found {
  padding: 4rem 0;
}

.not-found__code {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-tertiary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.not-found h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.not-found p {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-surface);
  background-color: var(--color-primary);
  border-radius: 2px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.btn-primary:hover {
  background-color: var(--color-secondary);
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 860px) {
  .site-content__inner {
    flex-direction: column;
    gap: 3rem;
  }

  .site-sidebar {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .post-list__entry {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .post-list__meta {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
  }

  .post-title {
    font-size: 1.75rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
