/* Zawsze Mam Rację — old-school newspaper theme.
   Shared by the static front page (index.html) and the rendered article pages. */

:root {
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --paper: #f4f1e8;
  --paper-edge: #e8e3d4;
  --rule: #1a1a1a;
  --accent: #7a1f1f;
  --max: 1100px;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.012) 0 2px, transparent 2px 4px);
  color: var(--ink);
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  padding: 28px 0 10px;
  border-bottom: 3px double var(--rule);
}

.masthead .title {
  font-family: "Playfair Display", "Old Standard TT", serif;
  font-weight: 900;
  font-size: clamp(40px, 9vw, 88px);
  line-height: 0.95;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}

.masthead .title a { text-decoration: none; }

.masthead .subtitle {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  font-size: clamp(14px, 2.4vw, 20px);
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.masthead-editor {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
  font-family: "Old Standard TT", serif;
  color: var(--ink-soft);
}

.masthead-editor-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.masthead-editor-link:hover { color: var(--accent); }

.masthead-editor-photo {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--rule);
  flex-shrink: 0;
  display: block;
}

.dateline-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-family: "Old Standard TT", serif;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}

/* ---------- Front page: headline list ---------- */
.front {
  column-gap: 36px;
}
@media (min-width: 760px) { .front { columns: 2; } }
@media (min-width: 1040px) { .front { columns: 3; } }

.headline-card {
  break-inside: avoid;
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--paper-edge);
}

.headline-card .thumb {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.05);
  margin-bottom: 12px;
  border: 1px solid var(--paper-edge);
}

.headline-card h2 {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 6px;
}
.headline-card h2 a { text-decoration: none; }
.headline-card h2 a:hover { color: var(--accent); }

.headline-card .kicker {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 8px;
  font-size: 17px;
}

.headline-card .meta {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.headline-card .excerpt { margin: 0; font-size: 16px; }

.empty, .error {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  padding: 60px 0;
}

/* ---------- Article page ---------- */
.article { max-width: 760px; margin: 0 auto; }

.article .headline {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.02;
  margin: 8px 0 6px;
  text-align: center;
}

.article .deck {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  font-size: clamp(18px, 3vw, 24px);
  text-align: center;
  color: var(--ink-soft);
  margin: 0 auto 16px;
  max-width: 620px;
}

.article .byline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--ink-soft);
}

.article .byline-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.article .byline-author:hover { color: var(--accent); }

.article .byline-avatar {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--paper-edge);
  flex-shrink: 0;
  display: block;
}

.article .byline-sep { opacity: 0.6; }

figure { margin: 24px 0; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.04);
  border: 1px solid var(--paper-edge);
}
figcaption {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 6px 2px 0;
  border-bottom: 1px solid var(--paper-edge);
}

figure.hero { margin-top: 0; }

figure.align-left,
figure.align-right { max-width: 48%; }
@media (min-width: 720px) {
  figure.align-left { float: left; margin: 6px 28px 12px 0; }
  figure.align-right { float: right; margin: 6px 0 12px 28px; }
}
@media (max-width: 719px) {
  figure.align-left, figure.align-right { max-width: 100%; float: none; }
}

.author-note {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}

.author-note-photo {
  flex: 0 0 210px;
  margin: 0;
}

.author-note-photo img {
  width: 210px;
  height: 210px;
  border-radius: 8px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--paper-edge);
  display: block;
}

.author-note-photo figcaption {
  font-size: 12px;
  text-align: center;
  border-bottom: none;
  padding: 6px 0 0;
}

.author-note-text { flex: 1; min-width: 0; }
.article .author-note-text .section-heading { margin-top: 0; }
.author-note-text p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .author-note { flex-direction: column; align-items: center; text-align: center; }
  .author-note-photo { flex: 0 0 auto; }
}

.article .section-heading {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 26px;
  margin: 28px 0 8px;
}

.article p { margin: 0 0 16px; text-align: justify; hyphens: auto; }

/* Drop cap on the very first paragraph of the article body */
.article .body > p:first-of-type::first-letter {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  float: left;
  font-size: 4.2em;
  line-height: 0.78;
  padding: 6px 10px 0 0;
}

.backlink {
  display: inline-block;
  margin: 8px 0 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

/* ---------- Author page ---------- */
.author-page {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 20px;
}

.author-page .author-photo {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--paper-edge);
}

.author-page h1 {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 4px;
}

.author-page .kicker {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.author-page .bio-placeholder {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
}

.bio-section {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-edge);
  text-align: left;
}

.bio-section--reverse { flex-direction: row-reverse; }

.bio-photo {
  flex: 0 0 180px;
  margin: 0;
}

.bio-photo img {
  width: 180px !important;
  height: 180px !important;
  max-width: 180px;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--paper-edge);
  display: block;
}

.bio-photo--tall img {
  height: 320px !important;
  max-height: 320px;
}

.bio-text {
  flex: 1;
  min-width: 0;
  text-align: justify;
  hyphens: auto;
}

.bio-text p { margin: 0; }

.bio-text--manifesto {
  font-family: "Old Standard TT", serif;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

.bio-text--manifesto p { margin: 0 0 6px; }
.bio-text--manifesto p:last-child { margin-bottom: 0; }

.bio-punchline {
  margin-top: 10px !important;
  font-family: "Playfair Display", serif;
  font-style: normal;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 640px) {
  .bio-section,
  .bio-section--reverse {
    flex-direction: column;
    text-align: center;
  }
  .bio-text { text-align: center; }
  .bio-text--manifesto { text-align: center; }
}

/* ---------- Footer ---------- */
.paper-footer {
  margin-top: 40px;
  padding: 18px 0 40px;
  border-top: 3px double var(--rule);
  text-align: center;
  font-family: "Old Standard TT", serif;
  font-size: 13px;
  color: var(--ink-soft);
}

.clear { clear: both; }
