/* === FONTS === */

/* Inter - Regular */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-regular.woff2') format('woff2');
}

/* Inter - Medium */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-medium.woff2') format('woff2');
}

/* DM Sans - Regular */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans - Italic */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans - Medium */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-sans-medium-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-sans-medium-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans - SemiBold */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/dm-sans-semibold-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/dm-sans-semibold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans - Bold */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/dm-sans-bold-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/dm-sans-bold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === MOTYWY === */

/* Jasny (domyślny) */
:root,
html.theme-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f3;
  --bg-input: #f5f5f3;
  --bg-newsletter: #1a1a18;

  --text-primary: #1a1a1a;
  --text-body: #333333;
  --text-heading: #1a1a1a;
  --text-meta: #999999;
  --text-subtitle: #666666;

  --accent: #8b7355;
  --accent-hover: #6b5535;
  --accent-muted: #b8a88a;

  --border: #e0e0e0;
  --border-light: #eeeeee;

  --highlight: rgba(139, 115, 85, 0.06);

  --progress-bar: #8b7355;

  --shadow-card: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.1);

  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Ciemny — „Księga" */
html.theme-dark {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a18;
  --bg-card: #161614;
  --bg-card-hover: #1e1e1c;
  --bg-input: #1a1a18;
  --bg-newsletter: #161614;

  --text-primary: #d4cfc4;
  --text-body: #c8c0b4;
  --text-heading: #e8e0d0;
  --text-meta: #5a5550;
  --text-subtitle: #7a7568;

  --accent: #c4b99a;
  --accent-hover: #d4c9aa;
  --accent-muted: #8b7355;

  --border: #2a2520;
  --border-light: #1e1e1c;

  --highlight: rgba(196, 185, 154, 0.08);

  --progress-bar: #8b7355;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-card-hover: 0 4px 24px rgba(0,0,0,0.4);
}

/* Beżowy */
html.theme-beige {
  --bg-primary: #f5f0e8;
  --bg-secondary: #ede8df;
  --bg-card: #faf7f2;
  --bg-card-hover: #f0ebe2;
  --bg-input: #ede8df;
  --bg-newsletter: #2a2420;

  --text-primary: #2a2420;
  --text-body: #3a3430;
  --text-heading: #2a2420;
  --text-meta: #a09888;
  --text-subtitle: #6b6058;

  --accent: #8b6b3a;
  --accent-hover: #6b4b1a;
  --accent-muted: #c4b08a;

  --border: #d8d0c4;
  --border-light: #e0d8cc;

  --highlight: rgba(139, 107, 58, 0.06);

  --progress-bar: #8b6b3a;

  --shadow-card: 0 1px 8px rgba(0,0,0,0.05);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.08);
}

/* === RESET & BASE === */

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

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

body {
  background: var(--bg-primary);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === GLOBAL TRANSITIONS === */

body,
.site-header,
.article-card,
.newsletter,
.site-footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* === LAYOUT === */

.content-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .content-wrap {
    padding: 0 2rem;
  }
}

/* === HEADER === */

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-name-logo {
  height: 24px;
  width: auto;
}

/* Inwersja logo w ciemnym motywie */
html.theme-dark .site-name-logo {
  filter: invert(0.85) sepia(0.1) saturate(0.5);
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.25rem;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.site-nav.open {
  display: block;
}

.site-nav a {
  display: block;
  color: var(--text-meta);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--accent);
}

/* === THEME SWITCHER === */

.theme-switcher {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-meta);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.theme-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--highlight);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    border-bottom: none;
    padding: 0;
    gap: 0;
  }

  .site-nav a {
    display: inline;
    padding: 0;
    margin-left: 28px;
  }
}

/* === FOOTER === */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-meta);
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
}

.footer-inner a {
  color: var(--text-meta);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* === HERO === */

.hero {
  max-width: 700px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-title {
  margin-bottom: 1rem;
}

.hero-logo {
  max-width: 480px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

/* Inwersja hero logo w ciemnym motywie */
html.theme-dark .hero-logo {
  filter: invert(0.85) sepia(0.1) saturate(0.5);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-subtitle);
  font-style: italic;
  line-height: 1.7;
}

/* === SECTION LABEL === */

.section-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-meta);
  margin-bottom: 32px;
}

/* === LATEST ARTICLES === */

.latest-articles {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* === ARTICLE CARD === */

.article-card {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

.article-card:first-child {
  padding-top: 0;
}

.article-card-link {
  text-decoration: none;
  display: block;
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.article-card-link:hover .article-card-title {
  color: var(--accent);
}

.article-card-subtitle {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-subtitle);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 12px;
}

.article-card-meta {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--text-meta);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.meta-author {
  color: var(--text-meta);
  text-decoration: none;
}

.meta-author:hover {
  color: var(--accent);
}

.meta-sep {
  margin: 0 0.5em;
}

.article-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-subtitle);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === NEWSLETTER === */

.newsletter {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-meta);
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-body);
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  border-radius: 0;
  transition: border-color 0.2s;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-btn {
  background: var(--accent-muted);
  border: none;
  color: var(--bg-primary);
  padding: 10px 20px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-btn:hover {
  background: var(--accent);
}

/* === NEWSLETTER FEEDBACK === */

.newsletter-feedback {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  min-height: 1.25em;
}

.feedback-ok {
  color: #5a9a5c;
}

.feedback-exists {
  color: var(--text-meta);
}

.feedback-error {
  color: #c45555;
}

/* === ABOUT MINI === */

.about-mini {
  padding: 2rem 0;
}

.about-mini p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-subtitle);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about-link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
}

.about-link:hover {
  text-decoration: underline;
}

/* === PAGE TITLE === */

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
}

/* === ARTICLE (single) === */

.article {
  padding-top: 2rem;
}

.article-header {
  text-align: left;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}

.article-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-subtitle);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 16px;
}

.article-meta {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-meta);
}

/* === ARTICLE BODY === */

.article-body {
  max-width: 600px;
  margin: 0 auto;
  font-family: var(--font-body);
}

.article-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 1.4em;
}

.article-body > p:first-of-type {
  font-size: 1.05rem;
}

/* Drop cap */
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 0.08em;
  margin-top: 0.05em;
  color: var(--accent);
  font-weight: 700;
}

/* Em — czysty italic, BEZ background */
.article-body em {
  font-style: italic;
  color: var(--accent-muted);
}

.article-body strong {
  color: var(--text-heading);
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-muted);
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.article-body a:hover {
  color: var(--accent-hover);
}

/* H2, H3 */
.article-body h2 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-muted);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* HR — ornament hr2.png */
.article-body hr {
  border: none;
  height: 20px;
  margin: 3rem auto;
  background: url('/gfx/hr2.png') no-repeat center / contain;
  max-width: 150px;
  opacity: 0.5;
}

.article-body hr + p {
  margin-top: 0.5rem;
}

/* Blockquote */
.article-body blockquote {
  position: relative;
  border-left: 3px solid var(--accent-muted);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--highlight);
  border-radius: 0 4px 4px 0;
}

.article-body blockquote p {
  color: var(--text-subtitle);
  font-style: italic;
}

/* Listy z pkt.png */
.article-body ul {
  list-style: none;
  padding-left: 1.8em;
  margin-bottom: 1.4em;
}

.article-body ul li {
  position: relative;
  margin-bottom: 0.5em;
  color: var(--text-body);
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: -1.8em;
  top: 0.5em;
  width: 12px;
  height: 11px;
  background: url('/gfx/pkt.png') no-repeat center / contain;
  opacity: 0.6;
}

.article-body ul li em {
  color: var(--accent-muted);
}

.article-body ol {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.article-body ol li {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: var(--text-body);
}

/* === ARTICLE TABLE === */

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-body thead {
  border-bottom: 2px solid var(--text-primary);
}

.article-body th {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-heading);
  text-align: left;
  padding: 0.75rem 1rem;
}

.article-body td {
  font-family: var(--font-body);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-body);
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background-color: var(--highlight);
}

@media (max-width: 767px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.85rem;
  }

  .article-body th,
  .article-body td {
    padding: 0.5rem 0.75rem;
    min-width: 150px;
  }
}

/* === BLOCKQUOTE WITH LIST === */

.article-body blockquote ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.article-body blockquote ul li {
  padding-left: 0;
  text-indent: 0;
}

.article-body blockquote ul li::before {
  content: none;
}

/* === ARTICLE NAV === */

.article-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-nav a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.article-nav a:hover {
  text-decoration: underline;
}

/* === AUTHOR CARD === */

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.author-card-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-card-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-card-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-heading);
}

.author-card-info a {
  text-decoration: none;
}

.author-card-info a:hover .author-card-name {
  color: var(--accent);
}

.author-card-bio {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-subtitle);
  margin-top: 0.25rem;
}

.author-card-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-meta);
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .author-card {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
}

/* === AUTHOR PROFILE === */

.author-profile {
  padding-top: 2rem;
}

.author-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.author-profile-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.author-profile-avatar .author-card-avatar-placeholder {
  width: 100px;
  height: 100px;
  font-size: 2rem;
}

.author-profile-name {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text-heading);
}

.author-profile-meta {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-meta);
  margin-top: 0.25rem;
}

.author-profile-links {
  margin-top: 0.5rem;
}

.author-profile-links a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.author-profile-links a:hover {
  text-decoration: underline;
}

.author-profile-bio {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  margin: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.author-profile-bio p {
  margin-bottom: 1.5rem;
}

.author-profile-bio p:last-child {
  margin-bottom: 0;
}

.author-profile-articles {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .author-profile-header {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 2rem;
  }

  .author-profile-avatar img {
    width: 120px;
    height: 120px;
  }

  .author-profile-avatar .author-card-avatar-placeholder {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  .author-profile-name {
    font-size: 2rem;
  }
}

/* === O NAS === */

.o-nas-content {
  padding-top: 0;
}

.o-nas-content p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  color: var(--text-body);
}

/* === O NAS — ilustracja === */
.o-nas-illustration {
  text-align: center;
  margin: 2rem 0 3rem;
}

.o-nas-logo {
  max-width: min(90%, 480px);
  height: auto;
  border-radius: 4px;
}

/* Inwersja logo ornamentalne w dark mode */
html.theme-dark .o-nas-logo {
  filter: invert(0.85) sepia(0.1) saturate(0.5);
}

/* === 404 === */

.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.error-page p {
  color: var(--text-subtitle);
  margin-bottom: 1rem;
}

.error-page a {
  color: var(--accent);
}

.error-page a:hover {
  text-decoration: underline;
}

/* === SPLASH SCREEN === */

/* Splash — zawsze czarne tło niezależnie od motywu */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  animation: splashFadeIn 1.2s ease-in forwards;
}

.splash-overlay.fade-out {
  animation: splashFadeOut 1s ease-out forwards;
}

.splash-overlay.hidden {
  display: none;
}

.splash-logo {
  max-width: min(80vw, 600px);
  max-height: 50vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Podczas splasha: ukryj resztę strony */
body.splash-active .site-header,
body.splash-active .content-wrap,
body.splash-active .site-footer {
  opacity: 0;
}

/* Po splashu: pokaż stronę z fade-in */
body.splash-done .site-header,
body.splash-done .content-wrap,
body.splash-done .site-footer {
  animation: contentFadeIn 0.8s ease-in forwards;
}

@keyframes splashFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes splashFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes contentFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* === READING PROGRESS BAR === */

.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1001;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--progress-bar);
  transition: width 50ms linear;
}

/* === DARK MODE — inwersja grafik === */

html.theme-dark .article-body hr {
  filter: invert(0.8);
  opacity: 0.4;
}

html.theme-dark .article-body ul li::before {
  filter: invert(0.8);
  opacity: 0.5;
}

/* === RESPONSIVE === */

@media (max-width: 600px) {
  .hero { padding: 60px 20px 40px; }
  .hero-logo { max-width: 300px; }
  .article-title { font-size: 1.7rem; }
  .article-body { max-width: 100%; padding: 0 4px; }
  .article-body p { font-size: 1rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input, .newsletter-btn { width: 100%; }
  .article-card-title { font-size: 1.3rem; }

  .splash-logo {
    max-height: 40vh;
    max-width: 85vw;
  }

  .o-nas-logo {
    max-width: 95%;
  }

  .o-nas-illustration {
    margin: 1.5rem 0 2rem;
  }

  .theme-switcher {
    position: absolute;
    top: 12px;
    right: 56px;
  }

  .theme-btn {
    width: 28px;
    height: 28px;
  }
}
