/* ============================================================
   COLOR PALETTE — LIGHT MODE (default / browser set to light)
   Edit the hex values below to change the palette site-wide.
   ============================================================ */
:root{
  --bg:        #eef1f7;   /* page background */
  --paper:     #ffffff;   /* card / input background */
  --ink:       #0f1c3d;   /* primary text (deep navy) */
  --ink-soft:  #47547a;   /* secondary text */
  --ink-faint: #8b93ab;   /* tertiary / label text */
  --line:      #d7dce8;   /* borders / dividers */
  --moss:      #1e3a6e;   /* accent 1 — deep navy blue */
  --moss-soft: #e2e8f5;   /* accent 1 background (pills/tags) */
  --rust:      #b5763a;   /* accent 2 — warm contrast (links/hover) */
}
/* ============================================================
   COLOR PALETTE — DARK MODE (browser/OS set to dark)
   Same variables, dark-mode values. Edit here for dark theme.
   ============================================================ */
@media (prefers-color-scheme: dark){
  :root{
    --bg:        #0a1024;
    --paper:     #0f1730;
    --ink:       #dfe6f5;
    --ink-soft:  #9aa5c4;
    --ink-faint: #5f6a8c;
    --line:      #212c4c;
    --moss:      #7fa3e8;
    --moss-soft: #16224a;
    --rust:      #d99a63;
  }
}
/* ============================================================
   COLOR PALETTE — MANUAL OVERRIDE (set via the theme toggle)
   These win over the prefers-color-scheme block above whenever
   the person has explicitly picked a theme (stored in localStorage).
   Keep these in sync with the two blocks above.
   ============================================================ */
html[data-theme="light"]{
  --bg:#eef1f7; --paper:#ffffff; --ink:#0f1c3d; --ink-soft:#47547a;
  --ink-faint:#8b93ab; --line:#d7dce8; --moss:#1e3a6e; --moss-soft:#e2e8f5; --rust:#b5763a;
}
html[data-theme="dark"]{
  --bg:#0a1024; --paper:#0f1730; --ink:#dfe6f5; --ink-soft:#9aa5c4;
  --ink-faint:#5f6a8c; --line:#212c4c; --moss:#7fa3e8; --moss-soft:#16224a; --rust:#d99a63;
}
*{box-sizing:border-box; margin:0; padding:0;}
[hidden]{ display:none !important; } /* keep the hidden attribute working on flex/grid elements */
html{scroll-behavior:smooth;}
body{
  background:var(--bg); color:var(--ink);
  font-family:'Inter', sans-serif; font-size:16px; line-height:1.65;
  transition:background .2s ease, color .2s ease;
}
a{ color:inherit; }
.serif{ font-family:'Fraunces', serif; }
.mono{ font-family:'IBM Plex Mono', monospace; }
.wrap{ max-width:680px; margin:0 auto; padding:0 24px; }

/* subtle noise-free paper feel via border rhythm, no gradients/glow */
header.top{ padding:40px 24px 0; }
.top-inner{ max-width:680px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.mark{ font-family:'Fraunces', serif; font-weight:600; font-size:17px; white-space:nowrap; }
.top-links{ display:flex; align-items:center; gap:18px; font-family:'IBM Plex Mono', monospace; font-size:12.5px; color:var(--ink-soft); }
.top-links a{ border-bottom:1px solid transparent; white-space:nowrap; }
.top-links a:hover{ border-color:var(--moss); color:var(--moss); }

/* ---------- Theme toggle (subtle, top right) ---------- */
.theme-toggle{
  width:26px; height:26px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--ink-faint);
  cursor:pointer; transition:color .2s ease, border-color .2s ease, opacity .2s ease; opacity:0.75;
}
.theme-toggle:hover{ opacity:1; color:var(--ink-soft); border-color:var(--ink-faint); }
.theme-toggle svg{ width:13px; height:13px; }
.theme-toggle .icon-moon{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }
@media (prefers-color-scheme: dark){
  html:not([data-theme]) .theme-toggle .icon-sun{ display:none; }
  html:not([data-theme]) .theme-toggle .icon-moon{ display:block; }
}

/* ---------- Hero ---------- */
.hero{ padding:64px 24px 56px; }
.hero-inner{ max-width:680px; margin:0 auto; }
.status{
  display:inline-flex; align-items:center; gap:8px; font-family:'IBM Plex Mono', monospace;
  font-size:12px; color:var(--moss); background:var(--moss-soft); padding:5px 11px;
  border-radius:100px; margin-bottom:26px;
}
.status .dot{ width:6px; height:6px; border-radius:50%; background:var(--moss); }
h1{
  font-family:'Fraunces', serif; font-weight:500; font-optical-sizing:auto;
  font-size:clamp(32px, 6vw, 46px); line-height:1.18; letter-spacing:-0.01em; max-width:560px;
}
h1 em{ font-style:italic; color:var(--moss); font-weight:500; }
.hero p.lede{ margin-top:22px; color:var(--ink-soft); font-size:17px; max-width:520px; }
.hero-foot{ margin-top:30px; display:flex; gap:16px; flex-wrap:wrap; font-family:'IBM Plex Mono', monospace; font-size:12.5px; color:var(--ink-faint); }
.hero-foot a:hover{ color:var(--rust); }

/* ---------- Section shell ---------- */
section{ padding:56px 24px; border-top:1px solid var(--line); }
.section-inner{ max-width:680px; margin:0 auto; }
.eyebrow{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:0.09em; margin-bottom:14px; }
h2.stitle{ font-family:'Fraunces', serif; font-weight:500; font-size:24px; margin-bottom:20px; }

.section-lede{ color:var(--ink-soft); font-size:15.5px; max-width:560px; margin-bottom:28px; }

/* ---------- Buttons / CTAs ---------- */
.hero-cta{ margin-top:30px; display:flex; gap:12px; flex-wrap:wrap; }
.btn{
  display:inline-block; font-family:'IBM Plex Mono', monospace; font-size:13px; text-decoration:none;
  padding:11px 22px; border-radius:100px; border:1px solid var(--moss); transition:opacity .2s ease, background .2s ease, color .2s ease;
}
.btn-primary{ background:var(--moss); color:var(--paper); }
.btn-primary:hover{ opacity:0.85; }
.btn-ghost{ color:var(--moss); background:transparent; }
.btn-ghost:hover{ background:var(--moss-soft); }
.top-links a.nav-cta{ text-decoration:none; color:var(--moss); border:1px solid var(--moss); border-radius:100px; padding:3px 11px; }
.top-links a.nav-cta:hover{ background:var(--moss-soft); }
a.mark{ text-decoration:none; }

/* ---------- Products ---------- */
.product-list{ display:flex; flex-direction:column; gap:16px; }
.product{ background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:24px; }
.product-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:12px; }
.product h3{ font-family:'Fraunces', serif; font-size:21px; font-weight:600; line-height:1.2; }
.product-domain{ font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--rust); text-decoration:none; }
.product-domain:hover{ text-decoration:underline; }
.product p{ color:var(--ink-soft); font-size:14.5px; max-width:540px; }
.product-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.product-tags span{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--moss); background:var(--moss-soft); padding:4px 10px; border-radius:100px; }
.b-link{ display:inline-block; margin-top:14px; font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--rust); text-decoration:none; }
.b-link:hover{ text-decoration:underline; }

/* ---------- How I work (steps) ---------- */
.steps{ list-style:none; margin-bottom:28px; }
.steps li{ display:flex; gap:18px; padding:16px 0; border-bottom:1px solid var(--line); }
.steps li:last-child{ border-bottom:none; }
.step-n{ font-family:'IBM Plex Mono', monospace; font-size:11px; color:var(--ink-faint); width:28px; flex-shrink:0; padding-top:4px; }
.steps h3{ font-family:'Fraunces', serif; font-size:17px; font-weight:600; margin-bottom:3px; }
.steps p{ color:var(--ink-soft); font-size:14.5px; max-width:500px; }

.b-status{ font-family:'IBM Plex Mono', monospace; font-size:10.5px; color:var(--ink-faint); border:1px solid var(--line); padding:3px 9px; border-radius:100px; white-space:nowrap; margin-top:2px; }

/* ---------- Repos ---------- */
.repo-grid{ display:flex; flex-direction:column; gap:14px; }
.repo{
  background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:18px 20px;
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  text-decoration:none; transition:border-color .2s ease;
}
a.repo:hover{ border-color:var(--moss); }
.repo-name{ font-family:'IBM Plex Mono', monospace; font-size:14px; font-weight:500; }
.repo-desc{ color:var(--ink-soft); font-size:13.5px; margin-top:4px; max-width:400px; }
.repo-lang{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--ink-faint); white-space:nowrap; }

/* ---------- Consulting ---------- */
.consult-box{
  background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:28px;
}
.consult-box p{ color:var(--ink-soft); font-size:15px; margin-bottom:14px; }
.consult-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.consult-tags span{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--moss); background:var(--moss-soft); padding:4px 10px; border-radius:100px; }
.stat-row{ display:flex; gap:28px; margin-top:20px; flex-wrap:wrap; }
.stat-row .s{ }
.stat-row .s b{ font-family:'Fraunces', serif; font-size:22px; font-weight:600; display:block; }
.stat-row .s span{ font-family:'IBM Plex Mono', monospace; font-size:11px; color:var(--ink-faint); }

/* ---------- Path (experience, minimal) ---------- */
.path-item{ padding:16px 0; border-bottom:1px solid var(--line); display:flex; gap:16px; justify-content:space-between; flex-wrap:wrap; }
.path-item:last-child{ border-bottom:none; }
.path-role{ font-weight:600; font-size:15px; }
.path-org{ color:var(--ink-soft); font-size:14px; }
.path-time{ font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--ink-faint); white-space:nowrap; }

/* ---------- Elsewhere / stack ---------- */
.tag-cloud{ display:flex; flex-wrap:wrap; gap:9px; }
.tag-cloud span{ font-family:'IBM Plex Mono', monospace; font-size:12.5px; color:var(--ink-soft); border:1px solid var(--line); padding:5px 11px; border-radius:100px; }

/* ---------- Contact form ---------- */
.contact-form{ display:flex; flex-direction:column; gap:14px; max-width:440px; margin-top:26px; }
.cf-row{ display:flex; flex-direction:column; gap:6px; }
.cf-row label{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:0.06em; }
.cf-row input, .cf-row textarea{
  background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:11px 13px;
  color:var(--ink); font-family:'Inter', sans-serif; font-size:14.5px; resize:vertical;
}
.cf-row input:focus, .cf-row textarea:focus{ outline:none; border-color:var(--moss); }
.cf-row textarea{ min-height:110px; }
.cf-submit{
  align-self:flex-start; font-family:'IBM Plex Mono', monospace; font-size:13px;
  background:var(--moss); color:var(--paper); border:none; padding:11px 22px;
  border-radius:100px; cursor:pointer; transition:opacity .2s ease;
}
.cf-submit:hover{ opacity:0.85; }
.cf-submit:disabled{ opacity:0.5; cursor:not-allowed; }
.cf-status{ font-family:'IBM Plex Mono', monospace; font-size:12.5px; min-height:16px; }
.cf-status.ok{ color:var(--moss); }
.cf-status.err{ color:var(--rust); }

/* ---------- Footer ---------- */
footer{ padding:64px 24px 48px; border-top:1px solid var(--line); }
.foot-inner{ max-width:680px; margin:0 auto; }
.foot-title{ font-family:'Fraunces', serif; font-style:italic; font-size:clamp(24px,4vw,32px); max-width:440px; margin-bottom:22px; }
.foot-links{ display:flex; gap:18px; flex-wrap:wrap; font-family:'IBM Plex Mono', monospace; font-size:13px; }
.foot-links a{ border-bottom:1px solid var(--line); padding-bottom:2px; }
.foot-links a:hover{ border-color:var(--rust); color:var(--rust); }
.foot-bottom{ margin-top:48px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-family:'IBM Plex Mono', monospace; font-size:11px; color:var(--ink-faint); }

.foot-note{ color:var(--ink-soft); font-size:14.5px; max-width:460px; margin:-8px 0 4px; }
.foot-note a{ color:var(--rust); }

/* ---------- Sub-pages (/start, /book) ---------- */
.page-hero{ padding:56px 24px 24px; }
.page-hero .eyebrow{ margin-bottom:16px; }
.form-section{ border-top:none; padding-top:16px; }
.slim-foot{ padding:32px 24px 40px; }
.slim-foot .foot-bottom{ margin-top:0; }

/* ---------- Intake form ---------- */
.intake-form{ display:flex; flex-direction:column; gap:30px; }
.intake-form fieldset{ border:none; padding:0; margin:0; min-width:0; }
.intake-form legend{ font-family:'Fraunces', serif; font-size:18px; font-weight:600; margin-bottom:14px; padding:0; }
.cf-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.cf-row .opt{ text-transform:none; letter-spacing:0; color:var(--ink-faint); opacity:.8; margin-left:4px; }
.cf-row select{
  background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:11px 13px;
  color:var(--ink); font-family:'Inter', sans-serif; font-size:14.5px; appearance:auto;
}
.cf-row select:focus{ outline:none; border-color:var(--moss); }
.intake-form textarea{ min-height:150px; }
.choice-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.choice{ position:relative; cursor:pointer; }
.choice input{ position:absolute; opacity:0; pointer-events:none; }
.choice span{
  display:block; background:var(--paper); border:1px solid var(--line); border-radius:6px;
  padding:12px 14px; font-size:14.5px; color:var(--ink-soft); transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.choice:hover span{ border-color:var(--ink-faint); }
.choice input:checked + span{ border-color:var(--moss); background:var(--moss-soft); color:var(--ink); }
.choice input:focus-visible + span{ outline:2px solid var(--moss); outline-offset:2px; }
.form-foot{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.intake-done{ background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:32px 28px; }
.intake-done p{ color:var(--ink-soft); max-width:500px; }

/* ---------- Blog ---------- */
.post-list{ display:flex; flex-direction:column; }
.post-item{ display:flex; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); text-decoration:none; }
.post-item:last-child{ border-bottom:none; }
.post-item h3{ font-family:'Fraunces', serif; font-size:18px; font-weight:600; line-height:1.3; margin-bottom:4px; transition:color .15s ease; }
.post-item h3 .b-status{ display:inline-block; vertical-align:middle; margin-left:6px; }
.post-item p{ color:var(--ink-soft); font-size:14.5px; }
.post-item:hover h3{ color:var(--moss); }
.post-date{ font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--ink-faint); width:92px; flex-shrink:0; padding-top:5px; }
.post{ max-width:680px; margin:0 auto; padding:56px 24px 24px; }
.post-head{ margin-bottom:36px; }
.post-head .eyebrow a{ text-decoration:none; }
.post-head .eyebrow a:hover{ color:var(--moss); }
.post-head h1{ max-width:none; }
.post-head .lede{ margin-top:16px; color:var(--ink-soft); font-size:17px; }
.post-head .product-tags{ margin-top:18px; }
.prose{ font-size:16.5px; line-height:1.75; }
.prose > * + *{ margin-top:1.1em; }
.prose h2{ font-family:'Fraunces', serif; font-weight:500; font-size:25px; line-height:1.25; margin-top:1.9em; }
.prose h3{ font-family:'Fraunces', serif; font-weight:600; font-size:19px; margin-top:1.6em; }
.prose h4, .prose h5{ font-weight:600; font-size:16.5px; margin-top:1.4em; }
.prose a{ color:var(--moss); text-underline-offset:2px; }
.prose a:hover{ color:var(--rust); }
.prose ul, .prose ol{ padding-left:1.4em; }
.prose li + li{ margin-top:.35em; }
.prose blockquote{ border-left:3px solid var(--moss); padding:2px 0 2px 18px; color:var(--ink-soft); font-style:italic; }
.prose code{ font-family:'IBM Plex Mono', monospace; font-size:.88em; background:var(--moss-soft); padding:1px 5px; border-radius:4px; }
.prose pre{ background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:16px 18px; overflow-x:auto; }
.prose pre code{ background:none; padding:0; font-size:13.5px; line-height:1.6; }
.prose img{ max-width:100%; height:auto; border-radius:6px; border:1px solid var(--line); }
.prose hr{ border:none; border-top:1px solid var(--line); margin:2.2em 0; }
.post-cta{ margin-top:56px; background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:28px; }
.post-cta p{ color:var(--ink-soft); max-width:500px; }

/* ---------- Booking embed ---------- */
.booking-frame{ background:var(--paper); border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.booking-frame iframe{ display:block; width:100%; height:720px; border:0; background:#fff; }
.booking-fallback{ background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:28px; }
.booking-fallback p{ color:var(--ink-soft); margin-bottom:6px; }
.booking-notes{ display:flex; gap:28px; flex-wrap:wrap; margin-bottom:24px; }
.booking-notes div{ font-size:14px; color:var(--ink-soft); }
.booking-notes b{ display:block; font-family:'IBM Plex Mono', monospace; font-size:11px; font-weight:400; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.08em; }

@media (max-width:520px){
  .cf-grid, .choice-grid{ grid-template-columns:1fr; }
  .post-item{ flex-direction:column; gap:4px; }
  .post-date{ width:auto; padding-top:0; }
  .post{ padding-top:40px; }
  .booking-frame iframe{ height:900px; }
  .top-links{ gap:12px; }
  .top-links a:not(.nav-cta):not([href="/blog/"]){ display:none; }
  .product{ padding:20px; }
  .repo{ flex-direction:column; align-items:flex-start; gap:6px; }
}
