/* Bart Dabrowski — one stylesheet, no framework.
   Layout: home page is an intro band + featured article + 3-up grid.
   Article pages use a single measure: text and images share one width. */

:root {
  --ink: #1b1b1a;
  --ink-soft: #3a3835;
  --ink-faint: #8a8580;
  --rule: #ece8e2;
  --paper: #fdfcfa;
  --card: #ffffff;
  --accent: #4a7dbf;
  --measure: 36rem;
  --measure-wide: 52rem;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece9e4;
    --ink-soft: #c3bfb8;
    --ink-faint: #8a8580;
    --rule: #33312e;
    --paper: #161514;
    --card: #1e1d1b;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.measure { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.measure-wide { max-width: var(--measure-wide); margin: 0 auto; padding: 0 1.25rem; }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.site-header > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-name { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.site-header nav a { color: var(--ink-faint); text-decoration: none; margin-left: 1.25rem; }
.site-header nav a:hover { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.site-footer a { margin-right: 1rem; }

/* --- shared ------------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 600;
  color: var(--ink-faint);
  margin: 3rem 0 0.75rem;
}
.meta { font-family: var(--sans); font-size: 0.7rem; color: var(--ink-faint); margin: 0; }
.card-title { font-size: 1rem; line-height: 1.3; margin: 0 0 0.2rem; }

figure { margin: 0; }
figure img, .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
figcaption {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: 0.45rem;
}

/* --- home --------------------------------------------------------------- */

.intro { padding: 2.5rem 0 0.5rem; }
.intro h1 { font-family: var(--sans); font-size: 1.75rem; letter-spacing: -0.02em; margin: 0 0 0.15rem; }
.intro .role { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); margin: 0 0 1rem; }
.intro .prose { max-width: var(--measure); }

.lead-article { margin-top: 1.5rem; display: block; text-decoration: none; }
.lead-article .frame { height: 15rem; border-radius: 6px; overflow: hidden; background: var(--rule); }
.lead-article h2 { font-family: var(--sans); font-size: 1.4rem; line-height: 1.25; margin: 0.8rem 0 0.2rem; }
.lead-article p { max-width: var(--measure); margin: 0.4rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.grid a { text-decoration: none; }
.grid .frame { height: 7rem; border-radius: 6px; overflow: hidden; background: var(--rule); margin-bottom: 0.55rem; }

.project-featured {
  display: grid;
  grid-template-columns: 16rem 1fr;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  margin-bottom: 0.9rem;
}
.project-featured .frame { min-height: 10rem; background: var(--rule); }
/* A featured project with no image gets no empty grey column. */
.project-featured--textonly { grid-template-columns: 1fr; }
.project-featured .body { padding: 1.1rem 1.25rem; }
.project-featured h3 { font-family: var(--sans); font-size: 1.15rem; margin: 0.25rem 0 0.4rem; }
.project-featured p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.status {
  font-family: var(--sans); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.12em; font-weight: 700; color: var(--accent);
}

.project-cards { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, 1fr); }
.project-cards article {
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 0.9rem 1.05rem; background: var(--card);
}
.project-cards h3 { font-family: var(--sans); font-size: 0.95rem; margin: 0.25rem 0 0.35rem; }
.project-cards p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }

.more-link { font-family: var(--sans); font-size: 0.78rem; color: var(--accent); display: inline-block; margin-top: 0.9rem; }

/* --- article index ------------------------------------------------------ */

.article-row { display: block; padding: 1rem 0; border-top: 1px solid var(--rule); text-decoration: none; }
.article-row:first-of-type { border-top: none; }
.article-row p.summary { margin: 0.3rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }

/* --- article ------------------------------------------------------------ */

.article { padding: 2.5rem 0 0; }
.article h1 { font-family: var(--sans); font-size: 1.85rem; line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.article > .meta { margin-bottom: 1.25rem; }
.article .hero { border-radius: 6px; overflow: hidden; background: var(--rule); }
.article .hero img { max-height: 24rem; }

.block { margin: 1.5rem 0; }
.block-rich_text > :first-child { margin-top: 0; }
.block-rich_text h2, .block-rich_text h3 { font-family: var(--sans); line-height: 1.3; margin-top: 2rem; }
.block-rich_text img { max-width: 100%; height: auto; border-radius: 6px; }
.block-quote blockquote {
  margin: 0; padding-left: 1.1rem; border-left: 3px solid var(--rule);
  font-size: 1.1rem; line-height: 1.6;
}
.block-quote cite { display: block; font-family: var(--sans); font-size: 0.75rem; color: var(--ink-faint); font-style: normal; margin-top: 0.5rem; }
.block-image_pair .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.block-image_pair .pair > * { height: 11rem; border-radius: 6px; overflow: hidden; background: var(--rule); }
.block-code pre { margin: 0; padding: 0.9rem 1.05rem; border-radius: 6px; overflow-x: auto; font-size: 0.8rem; line-height: 1.6; }
.block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 6px; }

.article-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 1rem; font-family: var(--sans); font-size: 0.78rem; }
.article-nav a { color: var(--ink-faint); text-decoration: none; }
.article-nav a:hover { color: var(--ink); }

/* --- narrow screens ----------------------------------------------------- */

@media (max-width: 40rem) {
  .grid { grid-template-columns: 1fr; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured .frame { height: 10rem; }
  .project-cards { grid-template-columns: 1fr; }
  .block-image_pair .pair { grid-template-columns: 1fr; }
}
