@import '@fontsource/pt-serif/400.css';
@import '@fontsource/pt-serif/400-italic.css';
@import '@fontsource/pt-serif/700.css';
@import '@fontsource/ibm-plex-sans/400.css';
@import '@fontsource/ibm-plex-sans/500.css';
@import '@fontsource/ibm-plex-sans/600.css';

:root {
  --paper: #f4ecdb;
  --paper-deep: #ead9b9;
  --ink: #1f1a15;
  --ink-soft: #3a342c;
  --muted: #5b554b;
  --accent: #8a3a14;
  --accent-soft: #b56b3a;
  --rule: #c9be9b;
  --rule-strong: #8c7e57;

  --c-today: #4a6a35;
  --c-tech: #6e5a30;

  --font-serif: "PT Serif", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  --content-max: 1200px;
  --reading-max: 740px;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(184, 145, 80, 0.06), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(138, 58, 20, 0.04), transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-soft); }

img, svg { max-width: 100%; height: auto; }

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

/* Container/layout */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  margin-top: 2rem;
}
@media (max-width: 920px) {
  .layout-grid { grid-template-columns: 1fr; }
}

/* Article body styles */
.prose {
  font-family: var(--font-serif);
  font-size: 1.07rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: var(--reading-max);
}
.prose p { margin: 1rem 0; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-serif); font-weight: 700; margin: 1.8rem 0 0.6rem; }
.prose h1 { font-size: 1.7rem; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.2rem; }
.prose img {
  margin: 1.2rem auto;
  display: block;
  border: 1px solid var(--rule);
  padding: 6px;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.2rem 0;
  color: var(--muted);
  font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.5rem; margin: 1rem 0; }
.prose li { margin: 0.4rem 0; }
.prose a { color: var(--accent); }
.prose [align="center"] { text-align: center; }
.prose [align="justify"] { text-align: justify; hyphens: auto; }

/* Sidebar boxes */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.92rem;
}
.box {
  background: rgba(255, 252, 244, 0.5);
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem;
}
.box h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.01em;
}
.box ul { list-style: none; margin: 0; padding: 0; }
.box li { padding: 0.25rem 0; }
.box li + li { border-top: 1px dotted var(--rule); }

/* Visually hidden */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
