:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #0e0e11;
  --muted: #6b6b76;
  --faint: #a3a3ad;
  --line: rgba(14, 14, 17, 0.08);
  --chip: rgba(14, 14, 17, 0.04);
  --accent: #6a5ae0;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1080px;
  --read: 700px;
  --radius: 28px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #121216;
    --text: #f4f4f6;
    --muted: #9a9aa6;
    --faint: #5e5e69;
    --line: rgba(255, 255, 255, 0.08);
    --chip: rgba(255, 255, 255, 0.05);
    --accent: #a79cf5;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Breadcrumb */
.crumbs { padding: 28px 0 0; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--text); font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }

/* Blog index */
.blog-head { padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 48px); }
.blog-head h1 { font-size: clamp(40px, 7vw, 68px); font-weight: 500; line-height: 1.05; letter-spacing: -0.04em; }
.blog-head p { margin-top: 14px; max-width: 560px; color: var(--muted); }
.posts { display: grid; gap: 20px; padding-bottom: clamp(56px, 8vw, 96px); }
.post-card {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.post-card:hover { transform: translateY(-3px); }
.post-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.post-card div { padding: clamp(22px, 3.5vw, 36px); align-self: center; }
.post-card h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.post-card p { margin-top: 10px; font-size: 16px; color: var(--muted); }
.post-date { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; display: block; }
@media (max-width: 760px) { .post-card { grid-template-columns: 1fr; } }

/* Post */
.post-head { max-width: var(--read); margin: 0 auto; padding: clamp(40px, 7vw, 72px) 0 clamp(28px, 4vw, 40px); }
.post-head h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 500; line-height: 1.08; letter-spacing: -0.035em; }
.post-head .dek { margin-top: 16px; font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); }
.byline { margin-top: 18px; font-size: 14px; color: var(--muted); }
.byline a { color: var(--text); font-weight: 500; }
.post-hero { margin: 0 auto; max-width: 960px; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); }
.prose { max-width: var(--read); margin: 0 auto; padding: clamp(36px, 5vw, 56px) 0; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 56px; font-size: clamp(27px, 3.4vw, 34px); font-weight: 500; line-height: 1.18; letter-spacing: -0.025em; }
.prose h3 { margin-top: 34px; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.prose h2 + p, .prose h3 + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 10px; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 600; }
.prose .app-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--chip);
}
.prose h2 + .app-row { margin-top: 20px; }
.app-row img { width: 72px; height: 72px; flex: none; border-radius: 16px; }
.app-row h3 { margin-top: 0; font-size: 19px; }
.prose a.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  line-height: 1.15;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.app-row .store { margin-top: 10px; }
.prose a.store:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(106, 90, 224, .7); }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 10px; letter-spacing: .04em; opacity: .75; }
.store strong { display: block; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a:hover { color: var(--text); }
