@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500&display=swap');

:root {
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;

  --text-base: 18px;
  --line-height: 1.65;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --content-width: 44rem;

  /* Solarized-inspired light mode */
  --bg: #fdf6e3;
  --bg-soft: #eee8d5;
  --text: #073642;
  --text-muted: #586e75;
  --accent: #b58900;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #002b36;
    --bg-soft: #073642;
    --text: #eee8d5;
    --text-muted: #93a1a1;
    --link: #cb4b16;
    --accent: #859900;
    --card: #073642;
    --border: #586e75;
  }
}

html {
  font-size: var(--text-base);
}

body {
  margin: 0;
  font-family: var(--font-serif);
  line-height: var(--line-height);
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
}

body > main {
  min-height: 70vh;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: 2.4rem;
  margin-top: 0;
}

h2 { font-size: 1.6rem; }

h3 { font-size: 1.2rem; }

p { margin: var(--space-3) 0; }

img {
  border-radius: 4px;
}

.meta {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.hr {
  border: none;
  height: 1px;
  max-width: var(--content-width);
  background: var(--accent);
  opacity: 0.3;
  margin: var(--space-4) auto;
}

.stack > * + * { margin-top: var(--space-3); }

.stack-lg > * + * { margin-top: var(--space-5); }

.preview { margin-top: var(--space-4); }

.preview:first-of-type { margin-top: var(--space-6); }

.preview-content {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.preview img {
  width: 180px;
  height: auto;
  margin-top: var(--space-2);
  flex-shrink: 0;
  object-fit: cover;
}

.preview-text {
  flex: 1;
}

.preview-text h3 {
  margin-top: 0;
}

section { margin-top: var(--space-6); }

footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);

  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .preview-content {
    flex-direction: column;
  }

  .preview img {
    width: 100%;
    height: auto;
  }
}
