:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --ink: #0f1720;
  --ink-soft: #445;
  --muted: #6b7684;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e4e8ee;
  --code-bg: #0f1720;
  --code-ink: #e6edf3;
  --maxw: 1080px;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 760px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }

.center { text-align: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.brand-name { font-size: 1.1rem; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle, .nav-toggle-label { display: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg-alt), #fff);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 96px 24px 88px; max-width: 820px; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 20px; }
.hero-subtitle { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
section { padding: 72px 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 40px;
  text-align: center;
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.service-card:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 32, 0.07);
  transform: translateY(-3px);
}
.service-card h3 { margin: 0 0 12px; font-size: 1.25rem; }
.service-card p { margin: 0; color: var(--ink-soft); }

/* Approach */
.approach { background: var(--bg-alt); }
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.approach-item { padding: 0 4px; }
.approach-num {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}
.approach-item h3 { margin: 8px 0 6px; }
.approach-item p { margin: 0; color: var(--ink-soft); }

/* Blog cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: #fff;
}
.post-card h3 { margin: 6px 0 10px; font-size: 1.25rem; }
.post-card p { color: var(--ink-soft); margin: 0 0 14px; }
.post-card-date { font-size: 0.85rem; color: var(--muted); margin: 0; }
.post-card-link { font-weight: 600; font-size: 0.92rem; }

/* Page head */
.page-head {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
}
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; }
.page-head p { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* Blog list */
.blog-list { padding-top: 56px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.post-list-item:first-child { padding-top: 0; }
.post-list-item h2 { margin: 6px 0 10px; font-size: 1.5rem; }
.post-list-item p { color: var(--ink-soft); margin: 0 0 14px; }

/* Tags */
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}
.tag {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Post */
.post { padding: 56px 0 72px; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 6px; }
.post-header { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.post-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 14px; }
.post-meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 16px; }

/* Post body typography */
.post-body { font-size: 1.06rem; color: #1c2733; }
.post-body h2 { font-size: 1.6rem; margin: 44px 0 16px; padding-top: 8px; }
.post-body h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 24px; }
.post-body li { margin-bottom: 6px; }
.post-body a { text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: var(--radius); }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

.post-body blockquote {
  margin: 24px 0;
  padding: 4px 20px;
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

/* Inline + block code */
.post-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.post-body pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 22px;
  font-size: 0.86rem;
  line-height: 1.5;
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 0.95rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.post-body th { background: var(--bg-alt); }

/* Screenshot placeholders */
.screenshot-placeholder {
  display: block;
  margin: 24px 0;
  padding: 28px 22px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.screenshot-placeholder::before {
  content: "\1F4F7  Screenshot";
  display: block;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.post-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }

/* CTA */
.cta { background: var(--ink); color: #fff; text-align: center; }
.cta-inner { max-width: 620px; margin: 0 auto; }
.cta h2 { font-size: 2rem; margin: 0 0 12px; }
.cta p { color: #b8c2cf; margin: 0 0 28px; font-size: 1.1rem; }

.home-blog { background: var(--bg-alt); }

/* Footer */
.site-footer { background: #0b1119; color: #c3ccd6; padding: 60px 0 28px; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .brand-name { color: #fff; }
.footer-tagline { color: #8b97a4; margin: 14px 0 0; font-size: 0.95rem; }
.footer-col h3 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.footer-col p { margin: 0 0 8px; }
.footer-col a { color: #c3ccd6; }
.footer-col a:hover { color: #fff; }
.footer-social, .footer-links { list-style: none; margin: 0; padding: 0; }
.footer-social li, .footer-links li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid #1c2733;
  font-size: 0.85rem;
  color: #8b97a4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }
.footer-legal a { color: #8b97a4; }
.footer-legal a:hover { color: #fff; }

/* Responsive nav */
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
  }
  .nav-toggle-label span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(15, 23, 32, 0.16);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text {
  margin: 0;
  flex: 1 1 260px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.cookie-btn { padding: 9px 18px; font-size: 0.9rem; }

@media (max-width: 480px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
}
