/* ===== kuanyu.dev — warm, friendly, hand-drawn · built on Direction D ===== */
:root{
  --ink:#2b2722;
  --ink-2:#6b6358;
  --ink-3:#9a9183;
  --paper:#f6f1e6;
  --panel:#fffdf6;
  --panel-2:#efe9da;
  --line:#d8d0bf;
  --line-2:#c6bca7;
  --blue:#5b78a6;             /* blueprint ink — soft */
  --blue-line:rgba(91,120,166,.13);
  --accent:#ffd23f;          /* highlighter — the key / gate / action */
  --accent-ink:#7a5b00;
  --accent-bg:rgba(255,210,63,.2);
  --teal:#1d6e78;            /* secondary — wayfinding labels (from the polo) */
  --teal-bg:rgba(29,110,120,.1);
  --good:#3c8a4e;
  --hand:'Architects Daughter','Comic Sans MS',cursive;
  --mono:'Space Mono',ui-monospace,monospace;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{ margin:0; background:var(--paper); color:var(--ink); font-family:var(--hand); font-size:17px; line-height:1.5; -webkit-font-smoothing:antialiased; }
a{ color:inherit; }
.mono{ font-family:var(--mono); }
.kicker{ font-family:var(--mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--teal); }

/* ---- nav ---- */
.nav{ position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:20px;
  padding:14px 34px; background:rgba(246,241,230,.9); backdrop-filter:blur(8px); border-bottom:2px solid var(--ink); }
.brand{ font-family:var(--hand); font-weight:400; font-size:23px; cursor:pointer; }
.brand .dot{ background:var(--accent); padding:0 3px; }
.nav-links{ display:flex; gap:18px; margin-left:auto; font-family:var(--mono); font-size:12.5px; color:var(--ink-2); }
.nav-links a{ text-decoration:none; } .nav-links a:hover{ color:var(--teal); }
.nav-cta{ font-family:var(--mono); font-size:12px; border:2px solid var(--ink); border-radius:9px; padding:6px 13px; background:var(--accent); color:var(--ink); text-decoration:none; }

.wrapc{ max-width:1140px; margin:0 auto; padding:0 34px; }
.section{ padding:52px 0; }

/* ---- friendly intro ---- */
.intro{ padding:64px 0 40px; }
.intro .wrapc{ display:grid; grid-template-columns:1.5fr .8fr; gap:50px; align-items:center; }
.intro h1{ font-size:clamp(34px,5.2vw,56px); line-height:1.08; margin:14px 0 18px; max-width:16ch; }
.intro .blurb{ font-size:20px; line-height:1.55; color:var(--ink-2); max-width:48ch; margin:0 0 26px; }
.intro .leadin{ display:inline-flex; align-items:center; gap:10px; font-size:20px; margin:8px 0 0; }
.intro .leadin .arrow{ font-family:var(--mono); }
.doodle-underline{ background:linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%); }
.intro-photo{ display:flex; justify-content:center; }
.photo-frame{ background:var(--panel); border:2.5px solid var(--ink); border-radius:6px; padding:12px 12px 14px;
  box-shadow:6px 7px 0 rgba(43,39,34,.15); transform:rotate(-2.4deg); }
.photo-frame .portrait{ display:block; width:288px; height:336px; object-fit:cover; object-position:56% 26%; border-radius:8px; background:var(--panel-2); }
.photo-cap{ font-family:var(--hand); text-align:center; margin-top:9px; font-size:18px; color:var(--teal); }

/* ---- gallery facets ---- */
.work-head{ display:flex; align-items:flex-end; gap:18px; flex-wrap:wrap; margin-bottom:8px; }
.work-head h2{ font-size:30px; margin:6px 0; max-width:20ch; }
.readhint{ font-size:16px; color:var(--ink-2); max-width:60ch; margin:0 0 24px; }
.readhint .swatch{ display:inline-block; width:12px; height:12px; background:var(--accent); border:1.5px solid var(--accent-ink); border-radius:3px; vertical-align:-1px; }
.facets{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:30px; }
.facets .fl{ font-family:var(--mono); font-size:11px; color:var(--ink-3); text-transform:uppercase; letter-spacing:.08em; }
.chip{ font-family:var(--mono); font-size:12px; cursor:pointer; background:var(--panel); border:1.5px solid var(--line-2); color:var(--ink-2); border-radius:20px; padding:5px 13px; transition:.12s; }
.chip:hover{ border-color:var(--ink); color:var(--ink); }
.chip.on{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.facet-count{ margin-left:auto; font-family:var(--mono); font-size:12px; color:var(--ink-3); }

/* ---- group / band header ---- */
.group{ margin-bottom:46px; }
.group-head{ margin-bottom:20px; }
.group-head .gk{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.group-head h3{ font-size:28px; margin:2px 0 4px; max-width:24ch; line-height:1.12; }
.group-head .sub{ font-family:var(--mono); font-size:11.5px; color:var(--ink-3); }
.group-head .gcount{ font-family:var(--mono); font-size:11.5px; color:var(--ink-3); }
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(370px,1fr)); gap:22px; }

/* ===== warm blueprint card ===== */
.card{ border:2.5px solid var(--ink); border-radius:13px; background:var(--panel); overflow:hidden; cursor:pointer;
  box-shadow:5px 5px 0 rgba(43,39,34,.13); transition:transform .1s, box-shadow .1s; display:flex; flex-direction:column; }
.card:hover{ transform:translate(-2px,-2px); box-shadow:7px 7px 0 rgba(43,39,34,.17); }
.card-top{ padding:15px 17px 12px; }
.card-titlerow{ display:flex; align-items:flex-start; gap:9px; }
.status-dot{ width:9px; height:9px; border-radius:50%; background:var(--ink-3); flex:0 0 auto; margin-top:7px; }
.status-dot.live, .status-dot.active{ background:var(--good); box-shadow:0 0 0 3px rgba(60,138,78,.18); }
.card-title{ font-size:21px; line-height:1.12; }
.card-domain{ margin-left:auto; font-family:var(--mono); font-size:10px; color:var(--ink-3); margin-top:5px; white-space:nowrap; }
.card-pain{ margin:9px 0 0; font-size:16px; color:var(--ink-2); line-height:1.4; }

/* compact loop line (short!) */
.loopline{ display:flex; align-items:center; gap:9px; padding:9px 17px; border-top:2px dashed var(--line); border-bottom:2px dashed var(--line); background:var(--panel-2); flex-wrap:wrap; }
.pips{ display:flex; gap:3px; } .pip{ width:7px; height:7px; border-radius:50%; border:1.5px solid var(--ink-2); }
.pip.on{ background:var(--accent); border-color:var(--accent-ink); }
.loop-label{ font-family:var(--mono); font-size:11.5px; font-weight:700; }
.loop-trig{ font-family:var(--mono); font-size:10.5px; color:var(--ink-2); }
.loop-trig b{ color:var(--ink-3); font-weight:400; }

/* zoned mini diagram on graph paper */
.zones{ display:flex; align-items:stretch;
  background-color:#f4f6f9; background-image:linear-gradient(var(--blue-line) 1px,transparent 1px),linear-gradient(90deg,var(--blue-line) 1px,transparent 1px); background-size:15px 15px; }
.zone{ flex:1 1 0; padding:12px 9px 13px; border-right:1px dashed #b9c4d6; text-align:center; min-width:0; }
.zone:last-child{ border-right:none; }
.zone.gate{ background:var(--accent-bg); }
.zone .zt{ font-family:var(--mono); font-size:8px; letter-spacing:.05em; color:var(--blue); margin-bottom:6px; }
.zone.gate .zt{ color:var(--accent-ink); }
.zone .zn{ font-size:14px; line-height:1.12; }
.zone .zsub{ font-family:var(--mono); font-size:8.5px; color:var(--ink-3); margin-top:3px; }
.zarrow{ align-self:center; color:var(--blue); font-family:var(--mono); font-size:12px; padding:0 1px; opacity:.6; }

.card-tags{ display:flex; gap:7px; flex-wrap:wrap; padding:13px 17px 0; }
.tag{ font-family:var(--mono); font-size:10px; border:1.5px solid var(--line-2); border-radius:20px; padding:3px 9px; color:var(--ink-2); }
.tag.lead{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.tag.gate-Human, .tag.gate-Live{ background:var(--accent-bg); border-color:var(--accent-ink); color:var(--accent-ink); }
.tag.gate-Automated{ background:rgba(91,120,166,.16); border-color:var(--blue); color:#3a567f; }
.card-focal{ display:flex; gap:8px; padding:11px 17px 14px; }
.card-focal .d{ color:var(--accent-ink); font-size:14px; line-height:1.25; }
.card-focal .t{ font-size:15px; color:var(--ink-2); line-height:1.4; }
.card-foot{ margin-top:auto; display:flex; align-items:center; gap:8px; padding:10px 17px; border-top:2px dashed var(--line); font-family:var(--mono); font-size:11px; color:var(--ink-2); }
.card-foot .open{ margin-left:auto; color:var(--accent-ink); }

/* ===== project page ===== */
#project{ display:none; }
body.route-project #home{ display:none; }
body.route-project #project{ display:block; }
.back{ font-family:var(--mono); font-size:12px; color:var(--ink-2); background:none; border:none; cursor:pointer; padding:0; }
.back:hover{ color:var(--ink); }
.proj-hero{ padding:30px 0 26px; }
.proj-crumb{ font-family:var(--mono); font-size:12px; color:var(--ink-3); margin:16px 0; }
.proj-title{ font-size:clamp(32px,4.6vw,50px); line-height:1.05; margin:6px 0; }
.proj-pain{ font-size:22px; color:var(--ink-2); line-height:1.4; max-width:54ch; margin:14px 0 22px; }
.proj-chips{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.proj-links{ display:flex; gap:10px; margin-top:22px; }
.btn{ font-family:var(--mono); font-size:12.5px; border:2px solid var(--ink); border-radius:9px; padding:8px 15px; background:var(--panel); cursor:pointer; text-decoration:none; color:var(--ink); }
.btn.fill{ background:var(--accent); }

/* full blueprint */
.bp{ border:2.5px solid var(--ink); border-radius:13px; overflow:hidden; background:var(--panel); box-shadow:5px 5px 0 rgba(43,39,34,.13); }
.bp-bar{ display:flex; align-items:center; gap:14px; padding:12px 20px; border-bottom:2px solid var(--ink); background:var(--panel-2); }
.bp-bar .fig{ font-family:var(--mono); font-size:11px; color:var(--ink-3); letter-spacing:.05em; }
.bp-bar .spacer{ margin-left:auto; }
.bp-legend{ display:grid; grid-template-columns:repeat(4,1fr); border-bottom:2px dashed var(--line); }
.bp-legend .c{ padding:13px 17px; border-right:1px dashed var(--line); }
.bp-legend .c:last-child{ border-right:none; }
.bp-legend .k{ font-family:var(--mono); font-size:9px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); display:block; margin-bottom:5px; }
.bp-legend .v{ font-size:16px; } .bp-legend .v.mono{ font-family:var(--mono); font-size:12px; }
.bp-canvas{ display:flex; align-items:stretch;
  background-color:#f4f6f9; background-image:linear-gradient(var(--blue-line) 1px,transparent 1px),linear-gradient(90deg,var(--blue-line) 1px,transparent 1px); background-size:20px 20px; }
.bz{ flex:1 1 0; padding:18px 15px 20px; border-right:1px dashed #b9c4d6; min-width:0; }
.bz:last-child{ border-right:none; }
.bz.gate{ background:var(--accent-bg); }
.bz-head{ display:flex; align-items:center; gap:8px; margin-bottom:13px; }
.bz-badge{ font-family:var(--mono); font-weight:700; font-size:11px; width:24px; height:24px; border:2px solid var(--blue); color:var(--blue); border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--panel); }
.bz.gate .bz-badge{ border-color:var(--accent-ink); color:var(--accent-ink); background:var(--accent-bg); }
.bz-title{ font-family:var(--mono); font-size:11px; font-weight:700; letter-spacing:.04em; }
.bz-body{ display:flex; flex-direction:column; gap:9px; }
.bnode{ border:2px solid var(--blue); border-radius:9px; background:var(--panel); padding:10px 12px; }
.bz.gate .bnode{ border-color:var(--accent-ink); background:#fffdf4; }
.bnode .bl{ font-size:16px; line-height:1.15; }
.bnode .bt{ font-family:var(--mono); font-size:10px; color:var(--blue); margin-top:4px; }
.bz.gate .bnode .bt{ color:var(--accent-ink); }
.bnarrow{ text-align:center; color:var(--blue); font-family:var(--mono); font-size:13px; opacity:.6; }
.bzarrow{ align-self:center; display:flex; flex-direction:column; align-items:center; gap:4px; padding:0 4px; flex:0 0 auto; min-width:60px; }
.bzarrow-glyph{ color:var(--blue); font-family:var(--mono); font-size:17px; opacity:.6; }
.bzarrow-label{ font-family:var(--mono); font-size:8.5px; color:var(--ink-3); text-align:center; line-height:1.2; }
.bp-focal{ display:flex; gap:11px; align-items:flex-start; padding:15px 20px; border-top:2px dashed var(--line); background:#fffdf4; }
.bp-focal .mk{ font-family:var(--mono); font-weight:700; font-size:10px; background:var(--accent); color:var(--accent-ink); border-radius:6px; padding:4px 9px; white-space:nowrap; }
.bp-focal .ft{ font-size:17px; line-height:1.4; }
.bp-foot{ display:flex; align-items:center; padding:12px 20px; border-top:1px solid var(--line); font-family:var(--mono); font-size:12px; }
.bp-foot .guide{ margin-left:auto; color:var(--ink-3); font-size:11px; }

.cols3{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.dbox h4{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); margin:0 0 7px; }
.dbox p{ margin:0; font-size:16px; line-height:1.5; }
.steps{ display:flex; flex-direction:column; gap:12px; }
.step{ display:grid; grid-template-columns:30px 1fr; gap:14px; align-items:start; }
.step .sn{ font-family:var(--mono); font-weight:700; font-size:12px; color:var(--accent-ink); width:28px; height:28px; border-radius:50%; border:2px solid var(--accent-ink); background:var(--accent-bg); display:flex; align-items:center; justify-content:center; }
.step .sl{ font-size:17px; } .step .st{ font-family:var(--mono); font-size:11.5px; color:var(--ink-2); }
.evidence{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.ph{ border:2px dashed var(--line-2); border-radius:11px; min-height:150px; display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:11px; color:var(--ink-3);
  background:repeating-linear-gradient(45deg,transparent,transparent 9px,rgba(0,0,0,.025) 9px,rgba(0,0,0,.025) 18px); }

.h2-hand{ font-size:30px; margin:6px 0 22px; }

/* ===== NOW ===== */
.now-testing{ font-family:var(--mono); font-size:13px; color:var(--ink-2); margin-top:8px; padding:14px 16px;
  border:2px dashed var(--line-2); border-radius:11px; background:var(--panel); }
.thread{ border:2.5px solid var(--ink); border-radius:13px; background:var(--panel); box-shadow:5px 5px 0 rgba(43,39,34,.12);
  padding:20px 22px; margin-bottom:20px; }
.thread-head{ display:flex; align-items:center; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.intensity{ font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-2);
  border:1.5px solid var(--line-2); border-radius:20px; padding:3px 10px; }
.intensity.hot{ background:var(--accent); border-color:var(--accent-ink); color:var(--accent-ink); }
.thread-title{ font-size:25px; margin:0; }
.thread-why{ font-size:17px; color:var(--ink-2); line-height:1.45; margin:0 0 16px; max-width:64ch; }
.thread-flow{ display:grid; grid-template-columns:1fr 34px 1fr; gap:16px; align-items:center;
  border-top:2px dashed var(--line); padding-top:16px; }
.flow-label{ font-family:var(--mono); font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); display:block; margin-bottom:9px; }
.feed-chips{ display:flex; gap:7px; flex-wrap:wrap; }
.feed-chip{ font-family:var(--mono); font-size:11.5px; border:1.5px solid var(--line-2); border-radius:20px; padding:4px 10px; color:var(--ink-2); background:var(--paper); }
.feed-chip.link{ cursor:pointer; border-color:var(--ink); color:var(--ink); }
.feed-chip.link:hover{ background:var(--accent); border-color:var(--accent-ink); }
.flow-arrow{ font-family:var(--mono); font-size:22px; color:var(--accent-ink); text-align:center; }
.heading-next{ font-size:18px; line-height:1.4; margin:0; }
.heading-next{ background:linear-gradient(transparent 70%, var(--accent-bg) 70%); display:inline; }

/* ===== ABOUT ===== */
.about-grid{ display:grid; grid-template-columns:1.4fr 1fr; gap:36px; align-items:start; }
.about-story p{ font-size:18px; line-height:1.6; color:var(--ink); max-width:56ch; margin:0 0 16px; }
.about-story em{ font-style:normal; background:var(--accent-bg); padding:0 3px; }
.about-side{ display:flex; flex-direction:column; gap:18px; }
.about-card{ border:2.5px solid var(--ink); border-radius:13px; background:var(--panel); box-shadow:4px 4px 0 rgba(43,39,34,.1); padding:18px 20px; }
.about-card h4{ font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); margin:0 0 14px; }
.about-facts{ list-style:none; margin:0; padding:0; }
.about-facts li{ font-size:16px; padding:7px 0 7px 22px; position:relative; border-bottom:1px dashed var(--line); }
.about-facts li:last-child{ border-bottom:none; }
.about-facts li::before{ content:"◆"; position:absolute; left:0; color:var(--accent-ink); font-size:11px; top:9px; }

/* ===== deeper layer (paid) ===== */
.deep-layer{ border:2.5px solid var(--ink); border-radius:14px; overflow:hidden;
  background:#272320; color:#efe9da; box-shadow:6px 6px 0 rgba(43,39,34,.18); }
.deep-head{ display:flex; gap:14px; align-items:flex-start; padding:22px 24px; border-bottom:2px dashed #4a443c; }
.deep-lock{ font-size:24px; line-height:1; }
.deep-title{ font-size:28px; margin:0 0 6px; color:#fff; }
.deep-pitch{ font-size:16px; line-height:1.5; color:#c4bdac; margin:0; max-width:70ch; }
.deep-grid{ display:grid; grid-template-columns:1fr 1fr; }
.deep-teaser{ padding:22px 24px; border-right:2px dashed #4a443c; }
.deep-teaser .flow-label{ color:#9a9281; }
.locked{ margin-top:12px; position:relative; }
.locked-row{ font-family:var(--mono); font-size:13px; color:#e7e0d0; padding:8px 0; border-bottom:1px dashed #3c3730;
  filter:blur(4px); user-select:none; }
.locked-row:first-child{ filter:blur(3px); }
.locked::after{ content:"🔒 locked"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:12px; letter-spacing:.1em; color:#fff; text-transform:uppercase;
  background:linear-gradient(rgba(39,35,32,.1),rgba(39,35,32,.55)); }
.deep-offer{ padding:22px 24px; }
.deep-offer .flow-label{ color:#9a9281; }
.deep-includes{ list-style:none; margin:12px 0 18px; padding:0; }
.deep-includes li{ font-size:15px; color:#e7e0d0; padding:7px 0 7px 24px; position:relative; line-height:1.4; }
.deep-includes li::before{ content:"✓"; position:absolute; left:0; color:var(--accent); font-weight:700; }
.deep-buy{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.deep-price{ font-family:var(--mono); font-weight:700; font-size:28px; color:#fff; }
.deep-cta{ background:var(--accent); color:var(--ink); border-color:var(--accent); }
.deep-deliver{ font-family:var(--mono); font-size:11px; color:#9a9281; margin:14px 0 0; }
.deep-dfy{ margin-top:18px; padding-top:16px; border-top:1px dashed #4a443c; }
.dfy-pitch{ font-size:14px; line-height:1.5; color:#c4bdac; margin:0 0 12px; }
.deep-build{ background:transparent; color:var(--accent); border-color:var(--accent); }
.deep-build:hover{ background:var(--accent); color:var(--ink); }

/* ===== say hi ===== */
.sayhi-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:44px; align-items:start; }
.sayhi-blurb{ font-size:18px; line-height:1.55; color:var(--ink-2); max-width:46ch; }
.sayhi-right{ display:flex; flex-direction:column; }
.contact-row{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; text-decoration:none;
  padding:15px 4px; border-bottom:2px solid var(--ink); transition:padding-left .12s, background .12s; }
.contact-row:first-child{ border-top:2px solid var(--ink); }
.contact-row:hover{ padding-left:12px; background:var(--accent-bg); }
.contact-row .cl{ font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3); }
.contact-row .cv{ font-size:20px; }
.footer-line{ font-family:var(--mono); font-size:12px; color:var(--ink-3); margin-top:40px; padding-top:20px; border-top:1px dashed var(--line); }

.footer{ padding:46px 0; border-top:2px solid var(--ink); font-family:var(--mono); font-size:12px; color:var(--ink-3); }
.footer a{ text-decoration:none; }

@media (max-width:820px){
  .wrapc{ padding:0 20px; } .nav{ padding:12px 20px; }
  .bp-legend,.cols3,.evidence{ grid-template-columns:1fr 1fr; }
  .bp-canvas{ flex-direction:column; } .bz{ border-right:none; border-bottom:1px dashed #b9c4d6; }
  .bzarrow{ transform:rotate(90deg); } .grid{ grid-template-columns:1fr; }
  .about-grid{ grid-template-columns:1fr; gap:24px; }
  .thread-flow{ grid-template-columns:1fr; gap:14px; }
  .flow-arrow{ transform:rotate(90deg); }
  .intro .wrapc{ grid-template-columns:1fr; gap:30px; }
  .intro-photo{ justify-content:flex-start; }
  .deep-grid{ grid-template-columns:1fr; } .deep-teaser{ border-right:none; border-bottom:2px dashed #4a443c; }
  .sayhi-grid{ grid-template-columns:1fr; gap:26px; }
}
@media (max-width:520px){ .bp-legend,.cols3,.evidence{ grid-template-columns:1fr; } .nav-links{ display:none; } }
