/* Szuflada z kartami - "teacher's drawer" theme: kraft paper, crayon red, pencil yellow, navy ink */
:root {
  --bg: #f3ead8;
  --card: #fffaf0;
  --ink: #26324a;
  --ink-soft: #5d6577;
  --red: #c8432f;
  --red-soft: #f3d3c8;
  --yellow: #e8b33a;
  --yellow-soft: #f7e3b0;
  --line: #dccfb4;
  --display: "Fraunces", Georgia, serif;
  --sans: "Nunito Sans", "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.72;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(38, 50, 74, 0.06) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
a { color: var(--red); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 26px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 22px; }

header.site { padding: 16px 0 14px; background: var(--card); border-bottom: 3px solid var(--yellow); }
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; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; }
a.brand em { font-style: italic; font-weight: 600; color: var(--red); }
nav.site { display: flex; gap: 18px; }
nav.site a { font-family: var(--hand); font-size: 1.35rem; font-weight: 700; color: var(--ink); text-decoration: none; }
nav.site a:hover { color: var(--red); text-decoration: underline wavy var(--yellow); }
.breadcrumb { font-size: 0.8rem; color: var(--ink-soft); margin: 8px 0 0; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb .sep { margin: 0 8px; color: var(--yellow); font-weight: 700; }

.hero { padding: 58px 0 50px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.kicker { font-family: var(--hand); font-size: 1.6rem; color: var(--red); margin: 0 0 6px; transform: rotate(-2deg); display: inline-block; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 4.8vw, 3.5rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 20px; }
.hero .lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 42ch; margin: 0; }
.hero-img { margin: 0; background: var(--card); padding: 12px 12px 42px; box-shadow: 0 10px 24px rgba(38, 50, 74, 0.15); transform: rotate(1.5deg); position: relative; }
.hero-img::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; margin-left: -55px; background: rgba(232, 179, 58, 0.75); transform: rotate(-3deg); }
.hero-img img { width: 100%; height: auto; display: block; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } .hero-img { transform: none; } }

.list-heading { font-family: var(--hand); font-weight: 700; font-size: 1.9rem; color: var(--ink); margin: 6px 0 22px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-bottom: 80px; }
@media (max-width: 920px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { background: var(--card); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; border-top: 6px solid var(--red); box-shadow: 0 3px 0 var(--line); transition: transform .2s ease; }
.post-card:nth-child(2n) { border-top-color: var(--yellow); }
.post-card:nth-child(3n) { border-top-color: var(--ink); }
.post-card:hover { transform: translateY(-3px); }
.post-card .thumb { overflow: hidden; }
.post-card .thumb img { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-card .body { padding: 16px 20px 24px; }
.post-card .date { font-size: 0.78rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.post-card h2 { font-family: var(--display); font-weight: 800; font-size: 1.22rem; line-height: 1.2; margin: 0 0 10px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card .excerpt { font-size: 0.92rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }

.article-hero { max-width: 1000px; margin: 30px auto 0; padding: 0 26px; }
.article-hero img { width: 100%; max-height: 460px; object-fit: cover; display: block; border: 10px solid var(--card); box-shadow: 0 8px 20px rgba(38, 50, 74, 0.12); }
.post { padding: 34px 0 80px; }
.post-meta { font-size: 0.82rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1rem; flex: none; }
.post-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 26px; }
.post h2 { font-family: var(--display); font-weight: 800; font-size: 1.4rem; margin: 40px 0 10px; line-height: 1.22; }
.post h2::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--red); margin-right: 10px; transform: rotate(8deg); }
.post ul, .post ol { padding-left: 1.3em; }
.post li { margin-bottom: 6px; }
.post li::marker { color: var(--red); }
.post strong { font-weight: 700; background: linear-gradient(transparent 60%, var(--yellow-soft) 60%); }
.post table { border-collapse: collapse; width: 100%; font-size: 0.94rem; margin: 18px 0; display: block; overflow-x: auto; }
.post th, .post td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.post th { color: var(--red); }
.author-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 50px; padding: 20px; background: var(--card); border: 2px dashed var(--line); }
.author-box .avatar { width: 46px; height: 46px; font-size: 1.25rem; }
.author-box p { margin: 0; font-size: 0.95rem; }
.author-box .name { font-family: var(--hand); font-size: 1.5rem; font-weight: 700; }
.related { margin-top: 34px; }
.related h3 { font-family: var(--hand); font-weight: 700; font-size: 1.6rem; margin: 0 0 6px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 11px 0; border-top: 1px dashed var(--line); }
.related a { color: var(--ink); text-decoration: none; font-weight: 700; }
.related a:hover { color: var(--red); }

.page { padding: 48px 22px 90px; }
.page h1 { font-family: var(--display); font-weight: 800; font-size: 2.5rem; margin: 0 0 20px; }

footer.site { background: var(--ink); color: #d8dce6; padding: 24px 0 32px; font-size: 0.82rem; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer.site a { color: var(--yellow); }

@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: drop .7s ease both; }
  .hero-text > * { animation: rise .6s ease both; }
  .hero-text > *:nth-child(2) { animation-delay: .1s; }
  .hero-text > *:nth-child(3) { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  @keyframes drop { from { opacity: 0; transform: rotate(4deg) translateY(-10px); } }
}
