:root {
  color-scheme: light;
  --ink: #2c241c;
  --ink-soft: #55493c;
  --paper: #faf5eb;
  --paper-alt: #f1e8d8;
  --card: #fffdf8;
  --clay: #b1602f;
  --clay-deep: #8f4a22;
  --sage: #6f7d5c;
  --sage-deep: #566148;
  --line: #e5dac2;
  --shadow: 0 18px 40px -20px rgba(60, 42, 20, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Karla", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.site {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

header.site .bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

a.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}

a.brand svg { flex: none; }
a.brand em { font-style: normal; color: var(--clay); }

nav.site { display: flex; gap: 26px; }
nav.site a {
  font-family: "Karla", sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
nav.site a:hover { color: var(--clay); border-color: var(--clay); }

.breadcrumb {
  font-family: "Karla", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 18px 0 0;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--clay); }
.breadcrumb span.sep { margin: 0 6px; opacity: 0.5; }

/* ---------- hero (homepage) ---------- */
.hero {
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -160px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(177,96,47,0.14), transparent 70%);
  z-index: 0;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
.hero .kicker {
  font-family: "Karla", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.12;
  margin: 0 0 18px;
  font-weight: 600;
}
.hero p.lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0;
}
.hero .art {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}
.hero .art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- post list ---------- */
.list-heading {
  font-size: 0.85rem;
  font-family: "Karla", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--sage-deep);
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 40px 0 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 28px 0 60px;
}
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; }
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .date {
  font-family: "Karla", sans-serif;
  font-size: 0.78rem;
  color: var(--sage-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-card h2 {
  font-size: 1.22rem;
  line-height: 1.32;
  margin: 0;
  font-weight: 600;
}
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--clay); }
.post-card .excerpt { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- article page ---------- */
.article-hero {
  width: 100%;
  height: clamp(220px, 32vw, 420px);
  overflow: hidden;
  margin: 22px 0 0;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

article.post { padding: 40px 0 20px; }

.post-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.18; margin: 0 0 14px; font-weight: 600; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Karla", sans-serif;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.post-meta img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

article.post p, article.post ul, article.post ol { max-width: 68ch; }
article.post h2 { font-size: 1.5rem; margin: 2em 0 0.6em; font-weight: 600; }
article.post p { margin: 0 0 1.15em; color: #322a20; }
article.post ul, article.post ol { margin: 0 0 1.3em; padding-left: 1.35em; }
article.post li { margin-bottom: 0.5em; }
article.post strong { color: var(--clay-deep); }
article.post a { color: var(--clay); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
article.post a:hover { color: var(--clay-deep); }

.callout {
  background: var(--paper-alt);
  border-left: 3px solid var(--sage);
  border-radius: 4px;
  padding: 16px 20px;
  margin: 0 0 1.6em;
  max-width: 68ch;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

/* ---------- author box ---------- */
.author-box {
  max-width: 68ch;
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 2.4em 0;
}
.author-box img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box .name { font-family: "Fraunces", serif; font-weight: 600; margin: 0 0 3px; }
.author-box p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.author-box a { color: var(--clay); }

/* ---------- related posts ---------- */
.related {
  max-width: 68ch;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 30px;
}
.related h3 {
  font-size: 0.85rem;
  font-family: "Karla", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-deep);
  margin: 0 0 14px;
}
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.related a { font-family: "Fraunces", serif; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.related a:hover { color: var(--clay); }

/* ---------- generic page (o mnie / kontakt) ---------- */
.page { padding: 44px 0 70px; }
.page h1 { font-size: 2.1rem; margin: 0 0 22px; }
.page p { max-width: 62ch; color: #322a20; }
.about-portrait { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 0 24px; box-shadow: var(--shadow); }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 30px 0 44px;
  font-family: "Karla", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { color: var(--ink-soft); }
footer.site a:hover { color: var(--clay); }
