:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #fbfcff;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent-strong: #1d4ed8;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'JetBrains Mono', 'SFMono-Regular', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--border);
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-role {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a,
.site-actions a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.site-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-main {
  flex: 1;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 18px;
}

p {
  margin: 0 0 18px;
  color: var(--text);
}

a {
  color: var(--accent-strong);
}

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

ul, ol {
  margin: 0 0 24px 0;
  padding-left: 22px;
}

/* --- Home page --- */

.home-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.home-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 20px;
}

.home-hero .hero-title {
  font-size: clamp(36px, 6vw, 52px);
  margin-bottom: 20px;
}

.home-hero .hero-copy {
  font-size: 16px;
  color: var(--muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-links a {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.hero-card h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

.hero-card p {
  color: var(--muted);
  margin: 0;
}

.home-section {
  display: grid;
  gap: 32px;
}

.home-section header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.home-section h2 {
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.recent-posts li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-posts a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.recent-posts .post-date {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.recent-posts li p {
  margin: 0;
  color: var(--muted);
}

.info-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.cta-card {
  background: linear-gradient(135deg, var(--accent-soft), #f8fafc);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 36px;
}

.cta-card h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.cta-card p {
  color: var(--muted);
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cta-links a {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

.cta-links a:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Hero block (shared) --- */

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  display: grid;
  gap: 20px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--accent-strong);
}

.hero .hero-title {
  font-size: clamp(34px, 5vw, 46px);
  margin: 0;
}

.hero .hero-copy {
  color: var(--muted);
  margin: 0;
}

/* --- Blog listing --- */

.post-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 150ms ease, box-shadow 150ms ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.post-card .date {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card h2 {
  margin: 0;
  font-size: 22px;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

/* --- Post detail --- */

.post {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 48px;
}

.post-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
}

.post h1 {
  font-size: clamp(34px, 5vw, 48px);
  margin-bottom: 28px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content h2 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
}

.post-content code {
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 18px;
  border-radius: 12px;
  overflow-x: auto;
}

.post-cta {
  max-width: 760px;
  margin: 36px auto 0;
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 32px;
}

.post-cta h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
}

.post-cta p {
  color: var(--muted);
}

.post-cta .cta-links {
  margin-top: 16px;
}

/* --- Generic page --- */

.page {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
}

.page h1 {
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 24px;
}

.page-content p {
  margin-bottom: 18px;
}

.page-content ul,
.page-content ol {
  margin-left: 18px;
}

.site-footer {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
  }

  .site-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 32px;
  }

  .post,
  .page {
    padding: 32px;
  }

  .post-cta {
    padding: 28px;
  }

  .hero-links a,
  .cta-links a {
    width: 100%;
    text-align: center;
  }
}
