/* Shared blog styling — matches homepage palette */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #F9F8F4;
  --ink: #0D0C09;
  --accent: oklch(0.78 0.22 143);
  --accent-dark: oklch(0.68 0.22 143);
  --muted: #7A7870;
  --border: rgba(13,12,9,0.12);
  --sans: 'DM Sans', sans-serif;
  --serif: 'Instrument Serif', serif;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.accent-text { color: var(--accent); }

/* Top bar — dark pill */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,9,5,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(249,248,244,0.08);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.topbar-logo { display: inline-flex; align-items: center; line-height: 0; }
.topbar-logo img { height: 30px; width: auto; display: block; }
.topbar-nav { display: flex; gap: 28px; align-items: center; }
.topbar-nav a {
  font-size: 14px;
  color: rgba(249,248,244,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.topbar-nav a:hover, .topbar-nav a.active { color: #fff; }
.topbar-cta {
  display: inline-flex; align-items: center; padding: 10px 20px;
  border-radius: 100px; background: var(--accent); color: var(--ink);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background 0.2s;
}
.topbar-cta:hover { background: #fff; }

@media (max-width: 720px) {
  .topbar-inner { padding: 14px 20px; }
  .topbar-nav { display: none; }
}

/* Generic container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 32px; }
.label {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}

/* ===== Blog index ===== */
.blog-hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 0%, rgba(0,0,0,0.85) 45%, transparent 90%);
          mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 0%, rgba(0,0,0,0.85) 45%, transparent 90%);
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 20px;
}
.blog-hero p {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  text-wrap: balance;
}

/* Featured post */
.featured {
  padding: 40px 0 80px;
}
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(13,12,9,0.10);
}
.featured-cover {
  aspect-ratio: 4/3;
  background: #e5e4e0;
  position: relative;
  overflow: hidden;
}
.featured-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.featured-card:hover .featured-cover img { transform: scale(1.04); }
.featured-body { padding: 48px 56px 48px 0; }
.featured-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 18px;
}
.featured-body h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.featured-body p { color: var(--muted); margin-bottom: 24px; }
.featured-meta { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-body { padding: 32px; }
}

/* Posts grid */
.posts-section { padding: 40px 0 120px; }
.posts-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 36px; }
.posts-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(13,12,9,0.08);
}
.post-cover { aspect-ratio: 16/10; background: #e5e4e0; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-body { padding: 24px 24px 28px; flex-grow: 1; display: flex; flex-direction: column; }
.post-category {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.post-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 10px;
  text-wrap: balance;
}
.post-excerpt { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; flex-grow: 1; }
.post-meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* ===== Article page ===== */
.article-hero {
  padding: 88px 0 48px;
  position: relative;
}
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted); text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s;
}
.article-back:hover { color: var(--ink); }

.article-category {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 18px;
}
.article-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  margin-bottom: 20px;
}
.article-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 28px;
  text-wrap: balance;
}
.article-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 13.5px; color: var(--muted);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.article-cover {
  aspect-ratio: 21/9;
  border-radius: 20px;
  overflow: hidden;
  background: #e5e4e0;
  margin-bottom: 48px;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: #2a2925;
}
.article-body p { margin-bottom: 22px; }
.article-body h2 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 52px;
  margin-bottom: 16px;
  text-wrap: balance;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 12px;
}
.article-body ul, .article-body ol {
  margin: 0 0 22px 22px;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 10px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--accent-dark); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 28px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}

/* CTA inside articles */
.article-cta {
  margin: 56px 0;
  padding: 40px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 20px;
  text-align: center;
}
.article-cta h3 {
  color: var(--bg);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.article-cta p { color: rgba(249,248,244,0.7); margin-bottom: 22px; }
.article-cta a {
  display: inline-flex; align-items: center;
  padding: 12px 26px;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  border-radius: 100px;
  font-weight: 500;
  transition: background 0.2s;
}
.article-cta a:hover { background: #fff; }

/* Related */
.related {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.related h3 {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card .cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.related-card h4 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

/* Footer */
footer.page-footer {
  background: var(--ink);
  color: rgba(249,248,244,0.6);
  padding: 48px 32px;
  text-align: center;
  font-size: 13px;
  margin-top: 60px;
}
footer.page-footer a { color: rgba(249,248,244,0.85); text-decoration: none; margin: 0 10px; }
footer.page-footer a:hover { color: #fff; }
footer.page-footer .copy { margin-top: 18px; opacity: 0.6; }
