:root {
  --deep: #04342C;
  --lake: #0F6E56;
  --shallows: #1D9E75;
  --foam: #E1F5EE;
  --sunset: #EF9F27;
  --sunset-ink: #412402;

  --bg: #FFFFFF;
  --bg-alt: #F3FAF7;
  --text: #0E1E1B;
  --text-muted: #4A5B57;
  --border: #D6E6E0;
  --heading: var(--deep);
  --accent: var(--lake);
  --roof: var(--deep);
  --wave: var(--shallows);
  --name2: var(--lake);
  --code-bg: #04342C;
  --code-text: #E1F5EE;
  --code-comment: #9FE1CB;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071A17;
    --bg-alt: #0B2420;
    --text: #E6F2EE;
    --text-muted: #A9C2BB;
    --border: #1C3A34;
    --heading: #E1F5EE;
    --accent: #5DCAA5;
    --roof: #E1F5EE;
    --wave: #5DCAA5;
    --name2: #9FE1CB;
    --code-bg: #031512;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
p code, li code { font-size: 0.9em; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }

.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; line-height: 0; }
.logo { height: 34px; width: auto; }
.logo .roof { stroke: var(--roof); }
.logo .wave { stroke: var(--wave); }
.logo .name { font: 600 26px Inter, system-ui, sans-serif; fill: var(--heading); letter-spacing: -0.3px; }
.logo .name2 { font: 400 26px Inter, system-ui, sans-serif; fill: var(--name2); letter-spacing: -0.3px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }

.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--sunset); color: var(--sunset-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover { background: var(--bg-alt); }
.nav .btn-ghost { padding: 7px 14px; border: 1px solid var(--border); }

.hero { padding: 96px 0 72px; }
.eyebrow { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; letter-spacing: 0.02em; color: var(--accent); margin: 0 0 18px; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.1; letter-spacing: -0.025em; color: var(--heading); margin: 0 0 22px; font-weight: 600; }
.accent-text { color: var(--accent); }
.lede { font-size: 1.2rem; max-width: 680px; color: var(--text-muted); margin: 0 0 30px; }
.lede strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.install { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; background: var(--code-bg); border: 1px solid var(--border); color: var(--code-text); border-radius: 8px; padding: 10px 10px 10px 16px; }
.install code { font-size: 15px; }
.install .prompt { color: var(--code-comment); margin-right: 6px; }
.copy { font: 500 13px Inter, system-ui, sans-serif; background: transparent; color: var(--code-text); border: 1px solid #2B5A51; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.copy:hover { border-color: var(--code-comment); }

.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--heading); margin: 0 0 18px; font-weight: 600; }
h3 { font-size: 1.2rem; color: var(--heading); margin: 0; font-weight: 600; }
.section p { margin: 0 0 16px; }

.points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.points li { padding-left: 28px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 14px; height: 3px; border-radius: 2px; background: var(--shallows); }
.points strong { color: var(--heading); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 36px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 26px; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-alt); color: var(--accent); font-size: 20px; margin-bottom: 16px; border: 1px solid var(--border); }
.card-sub { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--accent); margin: 4px 0 12px !important; }
.card p:last-child { margin: 0; color: var(--text-muted); font-size: 16px; }

.code { background: var(--code-bg); border: 1px solid var(--border); color: var(--code-text); border-radius: 10px; padding: 20px 22px; overflow-x: auto; font-size: 14.5px; line-height: 1.7; margin: 22px 0 0; }
.code .c { color: var(--code-comment); }

.join { padding-bottom: 96px; }
.join-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; text-align: left; }
.join-link { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); }
.join-link strong { color: var(--heading); font-weight: 600; }
.join-link span { color: var(--text-muted); font-size: 14px; }
.join-link:hover { border-color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; color: var(--text-muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 18px; }
.footer-row a { color: var(--text-muted); text-decoration: none; }
.footer-row a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .join-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .logo { height: 28px; }
}

@media (max-width: 480px) {
  .join-grid { grid-template-columns: 1fr; }
}

/* Blog */
.page-title { font-size: clamp(2rem, 4.4vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; color: var(--heading); margin: 0 0 16px; font-weight: 600; }
.blog-hero { padding-bottom: 8px; }
.blog-list-section { padding-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head a { text-decoration: none; font-weight: 500; }
.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.post-list.stacked { grid-template-columns: 1fr; }
.post-card { display: block; padding: 22px 24px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--bg); }
.post-card:hover { border-color: var(--accent); }
.post-card time { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--accent); }
.post-card h2, .post-card h3 { font-size: 1.2rem; line-height: 1.3; color: var(--heading); margin: 8px 0 8px; font-weight: 600; }
.post-card p { margin: 0; color: var(--text-muted); font-size: 16px; }
.feed-note { margin-top: 28px; font-size: 15px; }

.post { padding-top: 56px; }
.post-meta { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }
.post-meta a { text-decoration: none; }
.prose { margin-top: 36px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.prose h3 { margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--heading); font-weight: 600; }
.prose img { display: block; max-width: 100%; height: auto; margin: 28px auto; border: 1px solid var(--border); border-radius: 12px; background: #FFFFFF; }
.prose pre { background: var(--code-bg) !important; border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose :not(pre) > code { font-size: 0.88em; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--shallows); color: var(--text-muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.post-footer { margin-top: 48px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
.post-footer p { margin: 0; }
.post-footer code { font-size: 0.9em; }
