/* Jonathan Rich — jonathanri.ch */

:root {
  --bg: #faf7f1;
  --bg-raised: #f4efe6;
  --panel: #ffffff;
  --line: #eae1d2;
  --line-strong: #d9ccb8;
  --bone: #2b2620;
  --ink: #211d17;
  --muted: #7c7264;
  --faint: #9a8f7d;
  --accent: #c07d34;
  --accent-dim: #a06a2d;
  --sans: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--bone);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- minimal brand banner (name → home) ---------- */

.site-banner {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(6px);
}

.site-banner .container a {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-banner .container a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  padding: 84px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-avatar img {
  width: 256px;
  height: 256px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  filter: grayscale(35%);
  flex-shrink: 0;
}

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  padding: 6px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--sans);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.hero-bio {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-about {
  margin-top: 24px;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.98rem;
}
.hero-about p { margin: 0; }
.hero-about p + p { margin-top: 0.85em; }

.hero-about strong { color: var(--bone); font-weight: 600; }

/* ---------- recent writing (home) ---------- */

.recent {
  border-top: 1px solid var(--line);
  padding-bottom: 56px;
}

/* ---------- projects ---------- */

.projects { padding-bottom: 56px; }

.section-head h2 {
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-head .sub {
  color: var(--faint);
  font-size: 0.92rem;
  margin-top: 6px;
  margin-bottom: 24px;
}

.project-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  background: var(--panel);
  transition: border-color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.project-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project-card h3 a:hover { color: var(--accent); }

/* whole card is the click target */
.project-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-card p {
  color: var(--muted);
  font-size: 0.88rem;
}

.lang {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line-strong);
  padding: 2px 8px;
  border-radius: 3px;
}

.projects-more {
  margin-top: 26px;
  color: var(--faint);
  font-size: 0.9rem;
}

.projects-more a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.projects-more a:hover { text-decoration: underline; }

/* ---------- blog ---------- */

.page-head {
  padding: 72px 0 32px;
}

.page-head h1 {
  font-family: var(--sans);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.blog-index {
  padding: 0 0 64px;
}

.blog-index .empty {
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 48px 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.post-entry {
  display: block;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.post-entry:first-of-type { border-top: 1px solid var(--line); }

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

.post-entry-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-entry-title {
  font-family: var(--sans);
  font-size: 1.38rem;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.post-entry-desc {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 720px;
}

/* ---------- single post ---------- */

.post {
  padding: 72px 0 80px;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.post-meta a {
  color: var(--muted);
  text-decoration: none;
}

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

.post-title {
  font-family: var(--sans);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 24px;
}

.prose {
  font-size: 1.02rem;
  color: var(--bone);
  max-width: 720px;
}

.prose h2 {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 14px;
}

.prose h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 10px;
}

.prose p { margin: 0 0 18px; }

.prose a {
  color: var(--accent-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.prose strong { color: var(--ink); font-weight: 600; }

.prose ul {
  margin: 0 0 18px;
  padding-left: 24px;
}

.prose li { margin: 6px 0; }

.prose blockquote {
  background: var(--bg-raised);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 26px 0;
  color: var(--ink);
  font-style: normal;
}

.prose blockquote p {
  margin: 0 0 10px;
  color: var(--ink);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}

.prose pre {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--faint);
  font-size: 0.86rem;
}

.site-footer .footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.site-footer .footer-links a {
  display: inline-flex;
}

.site-footer .footer-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-footer .footer-note {
  color: var(--faint);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .project-list { grid-template-columns: 1fr; }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-top: 56px;
  }
  .hero-avatar img { width: 224px; height: 224px; }
  .hero h1 { font-size: 2.3rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
}