@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg: #FAF9F6;
  --fg: #1B1E23;
  --fg-soft: #3A3F47;
  --muted: #5B6169;
  --muted-2: #8A8F97;
  --border: #E8E5DF;
  --card: #ffffff;
  --pill-bg: #F3F1EC;
  --ad-bg: #F5F3EE;
  --ad-border: #D9D5CC;
  --ad-text: #B0ADA4;
  --accent: #3E8FD8;
  --accent-dark: #2B3A8F;
  --accent-tint: #EAF3FC;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,249,246,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--fg); }
.brand img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.brand span { font-family: var(--font-heading); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand .dot { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: center; flex-wrap: wrap; }
.main-nav a { font-size: 14.5px; font-weight: 500; color: var(--fg-soft); white-space: nowrap; }
.main-nav a.active { font-weight: 700; color: var(--fg); }
.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-subscribe { background: var(--fg); color: #fff; font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: 9px; }

/* Hero */
.hero { display: block; position: relative; height: 440px; overflow: hidden; color: #fff; }
.hero img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75); }
.hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,rgba(18,20,30,1) 0%,rgba(18,20,30,1) 30%,rgba(27,30,35,0.4) 45%,rgba(43,58,143,0.1) 55%,rgba(15,18,30,1) 78%,rgba(15,18,30,1) 100%);
}
.hero .hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 44px; }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.05em; color: var(--fg); background: #fff; padding: 6px 11px; border-radius: 100px; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-heading); font-size: 38px; line-height: 1.14; letter-spacing: -0.02em;
  margin: 0 0 14px; font-weight: 700; color: #fff; max-width: 680px;
}
.hero .byline { font-size: 13.5px; color: rgba(255,255,255,0.8); }

/* Category pills */
.category-strip { display: flex; gap: 12px; padding: 32px 0; flex-wrap: wrap; }
.pill {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 100px;
  border: 1px solid var(--border); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--fg);
}

/* Content layout */
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding: 24px 0 64px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-heading h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.section-heading a { font-size: 13.5px; font-weight: 600; color: var(--fg); }

.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
@media (max-width: 720px) { .content-grid, .article-grid { grid-template-columns: 1fr; } }

.card-thumb { border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; margin-bottom: 14px; position: relative; background: var(--accent-tint); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75); }
.card-thumb .thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,rgba(15,18,30,1) 0%,rgba(15,18,30,1) 26%,rgba(43,58,143,0.12) 42%,rgba(43,58,143,0.12) 62%,rgba(15,18,30,1) 80%,rgba(15,18,30,1) 100%);
}
.card-eyebrow { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--accent-dark); margin-bottom: 8px; }
.card-title { font-family: var(--font-heading); font-size: 17px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; color: var(--fg); letter-spacing: -0.01em; }
.card-excerpt { font-size: 13.5px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.card-meta { font-size: 12.5px; color: var(--muted-2); }

.load-more-wrap { display: flex; justify-content: center; padding-top: 40px; }
.btn-outline { border: 1px solid var(--border); background: #fff; padding: 13px 26px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--fg); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.newsletter-box {
  background: linear-gradient(160deg,#2B3A8F,#3E8FD8); border-radius: 16px; padding: 26px; color: #fff;
}
.newsletter-box .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; opacity: 0.8; margin-bottom: 10px; }
.newsletter-box h3 { font-family: var(--font-heading); font-size: 19px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.newsletter-box p { font-size: 13.5px; line-height: 1.55; opacity: 0.9; margin: 0 0 18px; }
.newsletter-box form { display: flex; flex-direction: column; gap: 9px; }
.newsletter-box input {
  width: 100%; padding: 11px 13px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12); color: #fff; font-size: 13.5px; outline: none;
}
.newsletter-box button {
  background: #fff; color: var(--accent-dark); border: none; padding: 11px; border-radius: 9px;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
}

.box { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 24px; }
.box .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted-2); margin-bottom: 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12.5px; font-weight: 500; color: var(--fg-soft); background: var(--pill-bg); padding: 7px 12px; border-radius: 100px; display: inline-block; }
a.tag:hover { color: var(--fg-soft); }

.ad-box {
  border: 1px dashed var(--ad-border); border-radius: 16px; padding: 24px; text-align: center; background: var(--ad-bg);
}
.ad-box .label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: #9A9A93; margin-bottom: 6px; }
.ad-box .size { font-size: 12px; color: var(--ad-text); }

/* Footer */
.site-footer-outer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-grid { max-width: 1240px; margin: 0 auto; padding: 48px 32px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.footer-brand span { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--fg); }
.footer-grid p { font-size: 13.5px; color: var(--muted); line-height: 1.6; max-width: 280px; margin: 0; }
.footer-col .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted-2); margin-bottom: 14px; }
.footer-col-links { display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a { font-size: 13.5px; color: var(--fg-soft); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 32px; text-align: center; font-size: 12.5px; color: var(--muted-2); }

/* Breadcrumb */
.breadcrumb { padding: 24px 0 0; font-size: 13px; color: var(--muted-2); }
.breadcrumb a { color: var(--muted-2); }
.breadcrumb .current { color: var(--fg); }

/* Article page */
.article-eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--accent-dark); background: var(--accent-tint); padding: 6px 11px; border-radius: 100px; margin-bottom: 18px;
}
.article-title { font-family: var(--font-heading); font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 20px; font-weight: 700; }
.article-byline {
  display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted);
  padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px;
}
.avatar { width: 36px; height: 36px; border-radius: 100px; background: var(--border); flex: none; }
.article-byline .name { font-weight: 600; color: var(--fg); }
.cover { border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; margin-bottom: 36px; background: var(--accent-tint); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 17px; line-height: 1.75; color: #2A2D33; max-width: 100%; overflow-wrap: break-word; }
.prose img { max-width: 100%; height: auto; display: block; border-radius: 12px; margin: 24px auto; }
.prose iframe, .prose video, .prose table { max-width: 100%; }
.prose p { margin: 0 0 22px; }
.prose h2 { font-family: var(--font-heading); font-size: 23px; font-weight: 700; letter-spacing: -0.01em; margin: 36px 0 16px; }
.prose blockquote {
  margin: 28px 0; padding: 20px 24px; border-left: 3px solid var(--accent); background: #F5F8FC;
  border-radius: 0 12px 12px 0; font-style: italic; color: var(--fg-soft); font-size: 16.5px;
}
.prose ul { margin: 0 0 22px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.step-shot { margin: 24px 0; }
.step-shot img { border: 1px solid var(--border); box-shadow: 0 4px 18px rgba(20,22,30,0.08); }
.step-shot figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }
.callout { border: 1px dashed var(--ad-border); border-radius: 14px; padding: 20px 22px; background: var(--ad-bg); margin: 28px 0; }
.callout .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: #9A9A93; margin-bottom: 6px; }
.callout p { margin: 0; font-size: 14.5px; color: #4A4E55; line-height: 1.6; }

.article-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 32px 0; margin-top: 24px; border-top: 1px solid var(--border); }
.author-box { display: flex; align-items: center; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.author-box .author-avatar { width: 52px; height: 52px; border-radius: 100px; background: var(--border); flex: none; }
.author-box .author-name { font-family: var(--font-heading); font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.author-box .author-bio { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.related { padding-top: 56px; }
.related h2 { font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin: 0 0 22px; letter-spacing: -0.01em; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.related-thumb { border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 12px; background: var(--accent-tint); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Category page */
.category-hero { padding: 24px 0 40px; border-bottom: 1px solid var(--border); }
.category-hero h1 { font-family: var(--font-heading); font-size: 36px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 700; }
.category-hero p { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 620px; }
.article-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); align-items: center;
}
@media (max-width: 600px) { .article-row { grid-template-columns: 1fr; } }
.article-row .card-thumb { margin-bottom: 0; aspect-ratio: 16/11; }

/* Bozze page */
.draft-badge { font-family: var(--font-mono); font-size: 11px; color: var(--accent-dark); background: var(--accent-tint); padding: 4px 10px; border-radius: 100px; }
