/* doctor.eco — branding panek.phd (te same tokeny), logotyp doctor.eco.
   Arkusz wspólny strony głównej i artykułów. */

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 10%;
  --muted: 40 9% 91%;
  --muted-foreground: 40 3% 42%;
  --border: 40 9% 91%;
  --off-white: 40 9% 97%;
  --charcoal: 220 25% 10%;
  --sage: 220 55% 28%;
  --sage-light: 220 50% 38%;
  --sage-glow: 220 60% 50%;
  --navy: 220 60% 22%;
  --gradient-from: 38 72% 58%;
  --gradient-to: 28 85% 45%;
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --shadow-glass: 0 8px 32px 0 rgba(0,0,0,.06);
  --shadow-glass-lg: 0 16px 48px 0 rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground));
  font-family: var(--font-sans); font-weight: 300; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.18; letter-spacing: -0.01em; margin: 0 0 1rem; }
img { max-width: 100%; height: auto; }
::selection { background: hsl(var(--sage) / .2); }

.container { max-width: 1100px; margin-inline: auto; padding-inline: 1.5rem; }
.container-narrow { max-width: 760px; margin-inline: auto; padding-inline: 1.5rem; }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 3px; color: hsl(var(--sage)); margin-bottom: 1.25rem;
}
.gradient-text {
  background: linear-gradient(135deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- nagłówek / logotyp doctor.eco ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(0 0% 100% / .82);
  backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid hsl(var(--border) / .6);
}
.header-inner { max-width: 1100px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.5rem; }
.wordmark { font-family: var(--font-serif); font-size: 1.45rem; letter-spacing: -0.01em; text-decoration: none; color: hsl(var(--navy)); }
.wordmark .tld {
  background: linear-gradient(135deg, hsl(var(--gradient-from)), hsl(var(--gradient-to)));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.wordmark-sub { display: block; font-family: var(--font-mono); font-size: .55rem; letter-spacing: 2.5px; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-top: .1rem; }
.site-nav { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; }
.site-nav a {
  font-size: .78rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; color: hsl(var(--foreground) / .6); position: relative; padding-bottom: 3px;
}
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0; background: linear-gradient(90deg, hsl(var(--sage)), hsl(var(--sage-glow))); transition: width .3s ease; }
.site-nav a:hover { color: hsl(var(--foreground)); }
.site-nav a:hover::after { width: 100%; }

/* ---------- hero strony głównej ---------- */
.blog-hero { padding: 5rem 0 3.5rem; background: linear-gradient(180deg, hsl(var(--off-white)), hsl(var(--background))); }
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 800px; }
.blog-hero .lede { max-width: 620px; color: hsl(var(--muted-foreground)); font-size: 1.05rem; }
.author-strip { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.author-strip .monogram {
  width: 44px; height: 44px; border-radius: 12px; background: hsl(var(--navy)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.1rem; flex: none;
}
.author-strip p { margin: 0; font-size: .9rem; color: hsl(var(--muted-foreground)); max-width: 560px; }
.author-strip a { color: hsl(var(--sage)); text-decoration: none; border-bottom: 1px solid hsl(var(--sage) / .35); }
.author-strip a:hover { border-color: currentColor; }

/* ---------- filtr kategorii ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2.5rem 0 2rem; }
.filter-bar button {
  border: 1px solid hsl(var(--border)); background: transparent; cursor: pointer;
  border-radius: 999px; padding: .55rem 1.2rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: 2px; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); transition: all .25s ease;
}
.filter-bar button:hover { border-color: hsl(var(--sage)); color: hsl(var(--sage)); }
.filter-bar button[aria-pressed="true"] { background: hsl(var(--navy)); border-color: hsl(var(--navy)); color: #fff; }

/* ---------- lista artykułów ---------- */
.post-list { display: grid; gap: 1rem; padding-bottom: 5rem; }
@media (min-width: 700px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-list { grid-template-columns: repeat(3, 1fr); } }
.post-card {
  display: flex; flex-direction: column;
  background: hsl(0 0% 100% / .6); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid hsl(var(--border) / .8); border-radius: 1.5rem; padding: 2rem;
  box-shadow: var(--shadow-glass); transition: box-shadow .5s ease, transform .3s ease;
}
.post-card:hover { box-shadow: var(--shadow-glass-lg); transform: translateY(-6px); }
.post-card[hidden] { display: none; }
.post-cat {
  align-self: flex-start; margin-bottom: 1rem; padding: .35rem .8rem; border-radius: 999px;
  background: hsl(var(--sage) / .08); color: hsl(var(--sage));
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: 2px; text-transform: uppercase;
}
.post-card h2 { font-size: 1.18rem; line-height: 1.35; margin-bottom: .4rem; }
.post-card h2 a { text-decoration: none; color: inherit; }
.post-card h2 a:hover { color: hsl(var(--sage)); }
.post-date { font-family: var(--font-mono); font-size: .62rem; color: hsl(var(--muted-foreground) / .6); margin-bottom: .9rem; }
.post-card p { color: hsl(var(--muted-foreground)); font-size: .88rem; margin: 0 0 1.25rem; flex-grow: 1; }
.read-more { font-size: .85rem; font-weight: 500; color: hsl(var(--sage)); text-decoration: none; }
.read-more .arrow { display: inline-block; transition: transform .3s ease; }
.post-card:hover .read-more .arrow { transform: translateX(4px); }

/* ---------- artykuł ---------- */
.article-header { padding: 4.5rem 0 2.5rem; background: linear-gradient(180deg, hsl(var(--off-white)), hsl(var(--background))); }
.article-header h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.article-meta .post-cat { margin: 0; }
.article-body { padding: 3rem 0 2rem; font-size: 1.02rem; }
.article-body p { margin: 0 0 1.4rem; color: hsl(var(--foreground) / .85); }
.article-body h2 { font-size: 1.6rem; margin: 2.8rem 0 1rem; }
.article-body h3 { font-size: 1.25rem; margin: 2.2rem 0 .8rem; }
.article-body strong { font-weight: 600; color: hsl(var(--foreground)); }
.article-body ul, .article-body ol { margin: 0 0 1.4rem; padding-left: 1.4rem; color: hsl(var(--foreground) / .85); }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: hsl(var(--sage)); }

.author-box {
  margin: 3rem 0; padding: 1.8rem 2rem; border-radius: 1.25rem;
  background: hsl(var(--off-white)); border: 1px solid hsl(var(--border) / .8);
  display: flex; gap: 1.2rem; align-items: flex-start;
}
.author-box .monogram { width: 48px; height: 48px; border-radius: 12px; background: hsl(var(--navy)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 1.2rem; flex: none; }
.author-box h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.author-box p { margin: 0; font-size: .85rem; color: hsl(var(--muted-foreground)); }
.author-box a { color: hsl(var(--sage)); text-decoration: none; border-bottom: 1px solid hsl(var(--sage) / .35); }

.related { padding: 0 0 4rem; }
.related h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.related a { color: hsl(var(--foreground)); text-decoration: none; border-bottom: 1px solid hsl(var(--border)); padding-bottom: .8rem; display: block; transition: color .25s ease; }
.related a:hover { color: hsl(var(--sage)); }
.related .cat { font-family: var(--font-mono); font-size: .6rem; letter-spacing: 2px; text-transform: uppercase; color: hsl(var(--sage)); display: block; margin-bottom: .2rem; }

/* ---------- stopka ---------- */
.site-footer { background: hsl(var(--foreground)); color: hsl(var(--background)); padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; } }
.footer-brand .wordmark { color: #fff; }
.footer-brand p { font-size: .875rem; color: hsl(0 0% 100% / .4); max-width: 300px; }
.footer-col h4 { font-family: var(--font-mono); font-size: .65rem; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; color: hsl(0 0% 100% / .4); margin-bottom: 1.3rem; }
.footer-col a { display: block; font-size: .875rem; color: hsl(0 0% 100% / .5); text-decoration: none; margin-bottom: .75rem; transition: color .3s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid hsl(0 0% 100% / .1); font-family: var(--font-mono); font-size: .6rem; letter-spacing: 1px; color: hsl(0 0% 100% / .3); }

/* ---------- animacje ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.visible { opacity: 1; transform: none; }
}
