/* ccarballo.com — one file, no preprocessor, keep it that way. */

:root {
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --link: #0f4c81;
  --rule: #e5e5e5;
  --bg: #ffffff;
  --max: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #9a9a9a;
    --link: #7ab3e0;
    --rule: #2c2c2c;
    --bg: #121212;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  max-width: var(--max);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.25rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}

.site-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-nav a {
  margin-left: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Index */
.intro {
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  margin-bottom: 1.75rem;
}

.post-list time {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-list a {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
}

.post-list a:hover { color: var(--link); }

.post-excerpt {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Post */
.post-header h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

.tag {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.8rem;
}

.post-content h2 { font-size: 1.4rem; margin: 2.25rem 0 0.75rem; }
.post-content h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

.post-content pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.post-content :not(pre) > code {
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer p { margin: 0; }

/* Segments wrap as units, never mid-phrase */
.site-footer span { white-space: nowrap; }

.footer-links svg {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
}

.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--link); }
