/* ==========================================================================
   khawarzaman.com — design system
   Extracted from design/*.html. Tokens, type and component patterns are
   settled (content brief §7) — layout changes need a reason.
   Where the four pages diverged, the difference is scoped by body class
   rather than reconciled, so every page renders exactly as it did before.
   ========================================================================== */

/* ---------------------------------------------------------- tokens + base */
:root{
  --ink:#10141C;
  --slate:#171E29;
  --raise:#1E2735;
  --line:#2C3646;
  --paper:#E8EBF0;
  --muted:#8A94A6;
  --signal:#2FB8A8;
  --bronze:#B0703C;
  --silver:#9AA7B4;
  --gold:#D9A425;
  --wrap:1140px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--ink);
  color:var(--paper);
  font-family:"IBM Plex Sans",system-ui,sans-serif;
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--signal);outline-offset:3px}

.wrap{max-width:var(--wrap);margin:0 auto;padding-left:28px;padding-right:28px}

h1,h2,h3{
  font-family:Archivo,system-ui,sans-serif;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.08;
  margin:0;
}

.eyebrow{
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
}

/* ------------------------------------------------------------------- nav */
.nav{
  position:sticky;top:0;z-index:50;
  background:rgba(16,20,28,.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav-in{
  max-width:var(--wrap);margin:0 auto;padding:14px 28px;
  display:flex;align-items:center;gap:28px;
}
.brand{
  font-family:Archivo,sans-serif;font-weight:700;font-size:16px;
  letter-spacing:-.01em;display:flex;align-items:center;gap:10px;
}
.brand span{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  color:var(--signal);border:1px solid var(--line);
  padding:3px 6px;border-radius:3px;letter-spacing:.08em;
}
.nav-links{margin-left:auto;display:flex;align-items:center;gap:26px}
.nav-links a{font-size:15px;color:var(--muted);transition:color .18s}
.nav-links a:hover,.nav-links a.on{color:var(--paper)}
.nav-toggle{
  display:none;margin-left:auto;cursor:pointer;
  background:none;border:1px solid var(--line);color:var(--paper);
  font-family:"IBM Plex Mono",monospace;font-size:12px;
  letter-spacing:.1em;text-transform:uppercase;
  padding:9px 13px;border-radius:4px;
}

/* --------------------------------------------------------------- buttons */
.btn{
  display:inline-block;
  font-family:"IBM Plex Mono",monospace;font-size:13px;
  letter-spacing:.04em;
  padding:10px 18px;border-radius:4px;
  border:1px solid var(--signal);color:var(--signal);
  background:none;cursor:pointer;
  transition:background .18s,color .18s;
}
.btn:hover{background:var(--signal);color:var(--ink)}
.btn-solid{background:var(--signal);color:var(--ink);border-color:var(--signal)}
.btn-solid:hover{background:#3ED4C2;color:var(--ink)}

/* -------------------------------------------------------------- sections */
section{padding:76px 0}
.sec-head{margin-bottom:44px;max-width:66ch}
.sec-head h2{font-size:clamp(28px,3.6vw,40px);margin-top:14px}
.sec-head p{color:var(--muted);margin:16px 0 0;font-size:17px}

/* ------------------------------------------------------------------ hero */
/* Vertical padding only. These elements also carry .wrap, and a `padding`
   shorthand here would reset .wrap's 28px side padding to zero — equal
   specificity, later rule wins — leaving the hero flush to the screen edge
   on any viewport narrower than the 1140px max-width. */
.hero{padding-top:80px;padding-bottom:0}
.hero h1{font-size:clamp(34px,4.8vw,56px)}
.hero h1 em{font-style:normal;color:var(--signal)}
.hero .lede{max-width:56ch;color:#BAC3D0;font-size:18.5px;margin:24px 0 0}
.hero .lede strong{color:var(--paper);font-weight:500}
.hero .eyebrow{display:block;margin-bottom:20px}
.hero-grid{
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:52px;align-items:center;
}
.hero-top{
  display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);
  gap:48px;align-items:center;
}
.hero-facts{
  font-family:"IBM Plex Mono",monospace;font-size:13.5px;color:var(--muted);
  display:flex;flex-direction:column;gap:14px;
  border-left:1px solid var(--line);padding-left:24px;
}
.hero-facts b{color:var(--paper);font-weight:500;font-size:15px;display:block}
.hero-cta{display:flex;flex-wrap:wrap;gap:14px;margin-top:34px}

/* ------------------------------------------- signature: medallion pipeline */
.pipeline{
  margin:74px 0 0;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,var(--slate),#141A24);
  padding:26px;
}
.pipe-head{
  display:flex;flex-wrap:wrap;gap:12px;align-items:baseline;
  justify-content:space-between;
  padding-bottom:20px;margin-bottom:24px;
  border-bottom:1px solid var(--line);
}
.pipe-head p{margin:0;font-size:14px;color:var(--muted);max-width:52ch}

.flow{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;
  gap:0;align-items:stretch;
}
.stage{
  border:1px solid var(--line);border-radius:6px;
  background:var(--raise);padding:16px 15px;
  display:flex;flex-direction:column;gap:10px;
}
.stage .bar{height:3px;border-radius:2px;width:34px}
.stage .tier{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;
}
.stage-note{
  margin:0;font-size:13px;color:var(--muted);line-height:1.45;
  padding-bottom:10px;border-bottom:1px solid var(--line);
}
.stage ul{margin:0;padding:0;list-style:none;display:grid;gap:7px}
.stage li{font-size:13.5px;color:#AEB8C6;line-height:1.4}
.stage li b{color:var(--paper);font-weight:500}
.stage.split .rule{height:1px;background:var(--line);margin:2px 0}

.b .bar{background:var(--bronze)}   .b .tier{color:var(--bronze)}
.s .bar{background:var(--silver)}   .s .tier{color:var(--silver)}
.g .bar{background:var(--gold)}     .g .tier{color:var(--gold)}
.o .bar{background:var(--signal)}   .o .tier{color:var(--signal)}

.conn{
  align-self:center;width:44px;height:2px;
  background:repeating-linear-gradient(90deg,var(--line) 0 6px,transparent 6px 12px);
  background-size:12px 2px;
  animation:march 1.1s linear infinite;
}
@keyframes march{to{background-position:12px 0}}
@keyframes marchv{to{background-position:0 12px}}
@media (prefers-reduced-motion:reduce){
  .conn{animation:none}
}

/* ----------------------------------------------------------- proof strip */
.proof{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:1px;background:var(--line);
  border:1px solid var(--line);border-radius:8px;
  margin:72px 0 0;overflow:hidden;
}
.proof div{background:var(--ink);padding:24px 22px}
.proof .n{
  font-family:"IBM Plex Mono",monospace;font-size:28px;
  color:var(--paper);display:block;margin-bottom:6px;
}
.proof .n.text{font-size:19px;line-height:1.3}
.proof .l{font-size:13.5px;color:var(--muted);line-height:1.45}

/* ----------------------------------------------------------------- cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{
  border:1px solid var(--line);border-radius:8px;
  background:var(--slate);padding:26px 24px;
  display:flex;flex-direction:column;gap:14px;
  transition:border-color .2s,transform .2s;
}
.card:hover{border-color:#3C4A5E;transform:translateY(-2px)}
.card h3{font-size:20px}
.card p{margin:0;font-size:15px;color:#AEB8C6}
.card .who{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  color:var(--signal);letter-spacing:.1em;text-transform:uppercase;
}
.card .tags{margin-top:auto;display:flex;flex-wrap:wrap;gap:7px;padding-top:8px}
.tag{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  color:var(--muted);border:1px solid var(--line);
  padding:4px 8px;border-radius:3px;
}

/* ------------------------------------------------------ engagement strip */
.engage{
  margin-top:44px;
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;
  background:var(--line);border:1px solid var(--line);
  border-radius:8px;overflow:hidden;
}
.engage > div{background:#141A24;padding:24px 22px}
.engage .step{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--signal);
  display:block;margin-bottom:10px;
}
.engage h4{
  font-family:Archivo,sans-serif;font-weight:600;font-size:17px;
  margin:0 0 8px;letter-spacing:-.01em;
}
.engage p{margin:0;font-size:14px;color:#AEB8C6;line-height:1.55}

/* ------------------------------------------------------------------ band */
.band{
  border:1px solid var(--line);border-radius:8px;
  background:linear-gradient(120deg,#1A2230,#141A24);
  padding:34px;
  display:flex;flex-wrap:wrap;gap:24px;align-items:center;
  justify-content:space-between;
}
.band div{max-width:62ch}
.band h3{font-size:23px;margin-bottom:10px}
.band p{margin:0;color:#AEB8C6;font-size:15.5px}

/* ------------------------------------------------------ photos + captions */
.photo{
  display:block;width:100%;height:auto;
  border:1px solid var(--line);border-radius:8px;
  filter:saturate(.82) contrast(1.03);
}
.caption{
  font-family:"IBM Plex Mono",monospace;font-size:12px;
  color:var(--muted);letter-spacing:.02em;line-height:1.5;
  margin-top:10px;display:flex;gap:10px;align-items:baseline;
}
.caption::before{
  content:"";width:16px;height:1px;background:var(--signal);
  flex:none;position:relative;top:-4px;
}
.portrait{margin:0}
.portrait img{
  display:block;width:100%;height:auto;
  border:1px solid var(--line);border-radius:8px;
  filter:saturate(.85) contrast(1.03);
  aspect-ratio:4/4.6;object-fit:cover;object-position:center 15%;
}
.portrait figcaption{
  font-family:"IBM Plex Mono",monospace;font-size:12px;color:var(--muted);
  margin-top:10px;letter-spacing:.02em;
}
.about-grid{
  display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);
  gap:56px;align-items:center;
}

/* ---------------------------------------------- writing: subscribe block */
.sub{
  border:1px solid var(--line);border-radius:8px;
  background:linear-gradient(180deg,var(--slate),#141A24);
  padding:30px;
}
.sub h3{font-size:21px;margin-bottom:10px}
.sub p{margin:0 0 22px;color:#AEB8C6;font-size:15px;max-width:44ch}
.sub-meta{
  font-family:"IBM Plex Mono",monospace;font-size:12.5px;color:var(--muted);
  border-left:2px solid var(--signal);padding-left:16px;
  display:grid;gap:7px;margin-top:24px;
}
.sub-meta b{color:var(--paper);font-weight:500}
.sub-form{display:flex;flex-wrap:wrap;gap:10px}

/* ----------------------------------------------------------------- forms */
.field{
  width:100%;
  background:var(--ink);border:1px solid var(--line);border-radius:4px;
  color:var(--paper);font-family:"IBM Plex Sans",sans-serif;font-size:15px;
  padding:11px 14px;
}
.field::placeholder{color:var(--muted)}
.field:focus{border-color:var(--signal);outline:none}
.sub-form .field{flex:1;min-width:200px}
textarea.field{resize:vertical;min-height:130px;line-height:1.55}

.contact-form{max-width:560px;margin-top:8px}
.contact-form .row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.contact-form .actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:16px}

.form-note{
  font-family:"IBM Plex Mono",monospace;font-size:13px;line-height:1.5;
  border-left:2px solid var(--signal);padding:2px 0 2px 14px;
  margin:0 0 18px;color:#AEB8C6;
}
.form-note.bad{border-left-color:var(--bronze)}
.field-error{
  display:block;font-family:"IBM Plex Mono",monospace;font-size:12px;
  color:var(--bronze);margin-top:6px;
}

/* --------------------------------------------------- writing: pillars */
.pillars{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.pillar{
  border:1px solid var(--line);border-radius:8px;
  background:#141A24;padding:26px 24px;
  display:flex;flex-direction:column;gap:12px;
}
.pillar .who{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  color:var(--signal);letter-spacing:.1em;text-transform:uppercase;
}
.pillar h3{font-size:19px}
.pillar p{margin:0;font-size:15px;color:#AEB8C6}

/* --------------------------------------------------- writing: archive */
.filter-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}
.chip{
  font-family:"IBM Plex Mono",monospace;font-size:12px;
  color:var(--muted);border:1px solid var(--line);background:none;
  padding:6px 14px;border-radius:999px;cursor:pointer;
  transition:color .15s,border-color .15s;
}
.chip:hover{color:var(--paper)}
.chip.active{color:var(--signal);border-color:var(--signal)}
.post.hide{display:none}
.posts{display:grid;gap:0;border-top:1px solid var(--line)}
.post{
  display:grid;grid-template-columns:120px minmax(0,1fr) auto;
  gap:24px;align-items:baseline;
  padding:22px 4px;border-bottom:1px solid var(--line);
  transition:background .18s;
}
.post:hover{background:#151C27}
.post time{font-family:"IBM Plex Mono",monospace;font-size:13px;color:var(--muted)}
.post h3{font-size:18px;font-weight:600}
.post .kind{
  font-family:"IBM Plex Mono",monospace;font-size:11px;
  color:var(--muted);letter-spacing:.1em;text-transform:uppercase;
}

/* -------------------------------------------------- empty state + notes */
.empty{
  border:1px dashed var(--line);border-radius:8px;
  padding:34px 30px;text-align:left;
}
.empty h3{font-size:20px;margin-bottom:12px}
.empty p{margin:0;color:#AEB8C6;font-size:15.5px;max-width:64ch}
.note{
  border:1px dashed var(--line);border-radius:8px;
  padding:24px 26px;margin-top:34px;
}
.note p{margin:0;font-size:15.5px;color:#AEB8C6;max-width:70ch}
.note b{color:var(--paper);font-weight:500}

/* ------------------------------------------- teaching: rooms + ladder */
/* Vertical only — .rooms is used together with .wrap. See the note on .hero. */
.rooms{padding-top:76px;padding-bottom:0}
.rooms-head{margin-bottom:28px;max-width:66ch}
.rooms-head h2{font-size:clamp(24px,3vw,32px);margin-top:12px}
.rooms-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.rooms-grid figure{margin:0}
.rooms-grid .photo{aspect-ratio:4/3.1;object-fit:cover}
.rooms-grid figure:nth-child(1) .photo{object-position:center 55%}
.rooms-grid figure:nth-child(2) .photo{object-position:center 42%}
.rooms-grid figure:nth-child(3) .photo{object-position:center 20%}

.ladder{
  border:1px solid var(--line);border-radius:8px;
  background:linear-gradient(180deg,var(--slate),#141A24);
  padding:30px;
}
.ladder-head{padding-bottom:22px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.ladder-head h3{font-size:22px;margin-bottom:10px}
.ladder-head p{margin:0;color:var(--muted);font-size:15px;max-width:60ch}
.rung{
  display:grid;grid-template-columns:56px 1fr;gap:18px;
  align-items:start;padding:22px 0;border-bottom:1px solid var(--line);
}
.rung:last-child{border-bottom:0;padding-bottom:6px}
.rung .step{
  font-family:"IBM Plex Mono",monospace;font-size:12px;
  color:var(--muted);letter-spacing:.1em;padding-top:4px;
}
.rung h4{
  font-family:Archivo,sans-serif;font-weight:600;font-size:18px;
  margin:0 0 6px;letter-spacing:-.01em;
}
.rung p{margin:0;font-size:15px;color:#AEB8C6;max-width:64ch}
.rung.last h4{color:var(--signal)}
.rung .bar{display:block;height:2px;border-radius:2px;margin-top:14px;background:var(--line)}
.rung:nth-child(2) .bar{width:18%;background:var(--bronze)}
.rung:nth-child(3) .bar{width:38%;background:var(--bronze)}
.rung:nth-child(4) .bar{width:60%;background:var(--silver)}
.rung:nth-child(5) .bar{width:82%;background:var(--gold)}
.rung:nth-child(6) .bar{width:100%;background:var(--signal)}

/* ------------------------------------------------------- craft blocks */
.craft-grid{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.62fr);
  gap:24px;align-items:stretch;
}
.craft{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.craft > div{
  border:1px solid var(--line);border-radius:8px;
  padding:24px;background:#141A24;
}
.craft h3{font-size:18px;margin-bottom:10px}
.craft p{margin:0;font-size:15px;color:#AEB8C6}
.craft-fig{margin:0;display:flex;flex-direction:column}
.craft-fig .photo{flex:1;object-fit:cover;object-position:center 22%;min-height:0}

/* --------------------------------------------------- about: timeline */
.timeline{
  border:1px solid var(--line);border-radius:8px;
  background:linear-gradient(180deg,var(--slate),#141A24);
  padding:10px 30px;
}
.era{
  display:grid;grid-template-columns:130px 1fr;gap:22px;
  align-items:start;padding:24px 0;border-bottom:1px solid var(--line);
}
.era:last-child{border-bottom:0}
.era .years{
  font-family:"IBM Plex Mono",monospace;font-size:13px;
  color:var(--muted);letter-spacing:.04em;padding-top:3px;
}
.era h3{font-size:19px;margin-bottom:7px;letter-spacing:-.01em}
.era p{margin:0;font-size:15px;color:#AEB8C6;max-width:66ch}
.era .bar{display:block;height:2px;border-radius:2px;margin-top:14px;background:var(--line)}
.era:nth-child(1) .bar{width:14%;background:var(--bronze)}
.era:nth-child(2) .bar{width:30%;background:var(--bronze)}
.era:nth-child(3) .bar{width:48%;background:var(--silver)}
.era:nth-child(4) .bar{width:64%;background:var(--silver)}
.era:nth-child(5) .bar{width:82%;background:var(--gold)}
.era:nth-child(6) .bar{width:100%;background:var(--signal)}
.era.now h3{color:var(--signal)}

/* -------------------------------------------------------- about: now */
.now-band{
  border:1px solid var(--line);border-radius:8px;
  background:linear-gradient(120deg,#1A2230,#141A24);
  padding:34px;
  display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:30px;align-items:center;
}
.now-band h3{font-size:22px;margin-bottom:12px}
.now-band p{margin:0;color:#AEB8C6;font-size:15.5px;max-width:60ch}
.now-list{
  font-family:"IBM Plex Mono",monospace;font-size:13.5px;color:#AEB8C6;
  border-left:2px solid var(--signal);padding-left:18px;
  display:grid;gap:8px;
}
.now-list b{color:var(--paper);font-weight:500}

/* --------------------------------------------------------------- post */
/* Full wrap width, matching the nav and every other page. To reintroduce a
   reading measure later, put a max-width back here — 68ch is the comfortable
   end, 84ch a middle ground — and keep the auto margins so it stays centred. */
.article{max-width:none;margin-left:auto;margin-right:auto}
.article .meta{
  font-family:"IBM Plex Mono",monospace;font-size:13px;color:var(--muted);
  display:flex;flex-wrap:wrap;gap:16px;margin-top:20px;
}
.article h1{font-size:clamp(30px,4.4vw,46px)}
.article .dek{color:#BAC3D0;font-size:19px;margin:22px 0 0}
.prose{margin-top:44px;border-top:1px solid var(--line);padding-top:40px}
.prose > *:first-child{margin-top:0}
.prose p{margin:0 0 22px;color:#C6CEDA}
.prose h2{font-size:26px;margin:44px 0 16px}
.prose h3{font-size:20px;margin:34px 0 14px}
.prose ul,.prose ol{margin:0 0 22px;padding-left:22px;color:#C6CEDA}
.prose li{margin-bottom:9px}
.prose a{color:var(--signal);border-bottom:1px solid rgba(47,184,168,.4)}
.prose a:hover{border-bottom-color:var(--signal)}
.prose strong{color:var(--paper);font-weight:600}
.prose blockquote{
  margin:0 0 22px;padding:2px 0 2px 20px;
  border-left:2px solid var(--line);color:var(--muted);
}
.prose code{
  font-family:"IBM Plex Mono",monospace;font-size:14px;
  background:var(--raise);border:1px solid var(--line);
  border-radius:3px;padding:2px 6px;
}
.prose pre{
  background:var(--slate);border:1px solid var(--line);border-radius:6px;
  padding:20px;overflow-x:auto;margin:0 0 22px;
}
.prose pre code{background:none;border:0;padding:0;font-size:13.5px;line-height:1.6}
.prose img{max-width:100%;height:auto;border:1px solid var(--line);border-radius:6px}
.prose table{width:100%;border-collapse:collapse;margin:0 0 22px;font-size:15px}
.prose th,.prose td{border:1px solid var(--line);padding:10px 12px;text-align:left}
.prose th{background:var(--raise);font-weight:600}
.post-foot{
  margin-top:52px;padding-top:32px;border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:14px;
}
/* Deliberately the quietest thing in the row. Sharing is a convenience for the
   reader, not a call to action — §3, "not an influencer chasing engagement". */
.btn-quiet-link{border-color:var(--line);color:var(--muted)}
.btn-quiet-link:hover{background:var(--line);color:var(--paper)}

/* -------------------------------------------------------------- contact */
.contact{border-top:1px solid var(--line)}
.contact h2{font-size:clamp(28px,4.2vw,46px);max-width:24ch}
.contact .lede{color:#BAC3D0;max-width:58ch;margin:20px 0 32px;font-size:18px}
.cta-row{display:flex;flex-wrap:wrap;gap:14px}

footer{
  border-top:1px solid var(--line);padding:30px 0;
  font-size:14px;color:var(--muted);
}
.foot-in{display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between}
.foot-in a{color:var(--muted)}
.foot-in a:hover{color:var(--paper)}

/* ==========================================================================
   Page-scoped overrides — preserves the per-page differences that existed
   in the original standalone files.
   ========================================================================== */
.page-home .hero{padding-top:88px;padding-bottom:20px}
.page-home .hero .eyebrow{margin-bottom:22px}
.page-home .hero h1{font-size:clamp(38px,6vw,68px);max-width:15ch}
.page-home .hero .lede{max-width:60ch;font-size:19px;margin:26px 0 0}
.page-home .sec-head{max-width:64ch}
.page-home .portrait img{aspect-ratio:4/4.4;object-position:center 18%}
.page-home .contact h2{font-size:clamp(30px,4.4vw,50px);max-width:22ch}
.page-home .contact .lede{max-width:56ch}

.page-writing .hero h1{max-width:18ch}

/* Post pages carry both page-writing and page-post, so the archive page's 18ch
   cap above would otherwise catch the post title too — same specificity, and it
   comes first. This releases it back to the full wrap width. */
.page-post .article h1{max-width:none}

.page-teaching .hero{padding-top:72px;padding-bottom:0}
.page-teaching .hero h1{max-width:19ch}
.page-teaching .hero-fig{margin:0}
.page-teaching .hero-fig .photo{aspect-ratio:4/5.2;object-fit:cover;object-position:60% 30%}
.page-teaching .proof{margin:64px 0 0}

.page-about .hero h1{font-size:clamp(34px,5vw,56px);max-width:17ch}
.page-about .hero .lede{font-size:19px}
.page-about .hero-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:56px}


/*-----------------------CASE STUDY -------------------*/

/* =========================================================
   LONG-FORM CASE STUDY
   This block is intentionally scoped to .case-study only.
   It does not change the site's existing article, nav, footer,
   writing archive, or other component styles.
   ========================================================= */

.case-study{
  --case-prose:880px;
  width:100%;
  max-width:none;
  margin:0;
  color:inherit;
  font:inherit;
}

/* The site-wide `section` rule adds 76px vertical padding.
   Case-study sections already manage their own rhythm, so reset
   that global padding only inside this component. */
section.case-study-section,
section.case-study-metrics{
  padding:0;
}

/* --------------------------------------------------------- header */
/* Kept for reuse if a future post stores its own case-study header. */
.case-study-header{
  width:100%;
  margin:0 0 56px;
}

.case-study-category{
  margin-bottom:16px;
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
  font-weight:500;
  line-height:1;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--signal);
}

.case-study-header h1{
  max-width:none;
  margin:0;
  font-size:clamp(34px,4.8vw,54px);
  font-weight:700;
  line-height:1.04;
  letter-spacing:-.035em;
}

.case-study-deck{
  max-width:70ch;
  margin:22px 0 0;
  color:#BAC3D0;
  font-size:19px;
  line-height:1.6;
}

.case-study-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  margin-top:20px;
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  color:var(--muted);
}

/* ----------------------------------------------------- main rhythm */

.case-study-section{
  width:100%;
  max-width:none;
  margin:0 0 72px;
}

/* Keep long-form prose readable while aligning it to the same
   left edge as the post title. Large visual components below
   are still allowed to use the full article width. */
.case-study-section > p,
.case-study-section > h2,
.case-study-section > h3,
.case-study-section > blockquote{
  max-width:var(--case-prose);
}

.case-study-section p{
  margin:0 0 22px;
  color:#C6CEDA;
  font-size:17px;
  line-height:1.75;
}

.case-study-opening > p:first-child{
  font-size:19px;
  color:var(--paper);
}

.case-study-section h2{
  margin:0 0 18px;
  font-size:clamp(27px,3.2vw,34px);
  font-weight:700;
  line-height:1.12;
  letter-spacing:-.025em;
}

.case-study-section h3{
  margin:36px 0 14px;
  font-size:21px;
  font-weight:600;
  line-height:1.25;
  letter-spacing:-.015em;
}

/* ------------------------------------------------------ pull quote */

.prose .case-study-pullquote{
  max-width:var(--case-prose);
  margin:32px 0 34px;
  padding:3px 0 3px 22px;
  border-left:2px solid var(--signal);
  color:var(--paper);
  font-family:Archivo,system-ui,sans-serif;
  font-size:clamp(23px,2.5vw,31px);
  font-weight:600;
  line-height:1.35;
  letter-spacing:-.025em;
}

.prose .case-study-pullquote.small{
  font-size:21px;
  line-height:1.45;
}

/* ------------------------------------------------------ key metrics */

.case-study-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  width:100%;
  margin:18px 0 78px;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  background:var(--line);
  gap:1px;
}

.case-study-metric{
  min-width:0;
  padding:24px 20px;
  background:#141A24;
}

.case-study-metric strong{
  display:block;
  margin-bottom:6px;
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:clamp(22px,2.4vw,30px);
  font-weight:500;
  line-height:1.1;
  letter-spacing:-.03em;
}

.case-study-metric:nth-child(2) strong,
.case-study-metric:nth-child(3) strong{
  color:var(--signal);
}

.case-study-metric span{
  display:block;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

/* --------------------------------------------------- workload summary */

.case-study-workload-summary{
  max-width:var(--case-prose);
  margin:28px 0 30px;
  border-top:1px solid var(--line);
}

.case-study-workload-row{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:18px;
  padding:14px 0;
  border-bottom:1px solid var(--line);
  color:#C6CEDA;
  font-size:15px;
  line-height:1.5;
}

.case-study-workload-day{
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  font-weight:500;
}

/* ---------------------------------------------------------- figure */

.case-study-figure{
  width:100%;
  margin:0 0 78px;
}

.case-study-figure img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--slate);
}

.case-study-figure figcaption{
  max-width:var(--case-prose);
  margin-top:11px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
  line-height:1.55;
}

/* Legacy placeholder support, if another post still uses it. */
.case-study-image-placeholder{
  display:flex;
  min-height:380px;
  padding:32px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  border:1px solid var(--line);
  border-radius:8px;
  background:linear-gradient(180deg,var(--slate),#141A24);
}

.case-study-image-placeholder span{
  color:var(--paper);
  font-family:Archivo,system-ui,sans-serif;
  font-size:18px;
  font-weight:600;
}

.case-study-image-placeholder small{
  max-width:520px;
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

/* -------------------------------------------------------- timeline */

.case-study-timeline{
  position:relative;
  max-width:var(--case-prose);
  margin:30px 0 36px;
  padding-left:28px;
  border-left:1px solid var(--line);
}

.case-study-timeline-item{
  position:relative;
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:18px;
  padding:0 0 24px;
}

.case-study-timeline-item:last-child{
  padding-bottom:0;
}

.case-study-timeline-item::before{
  content:"";
  position:absolute;
  left:-33px;
  top:5px;
  width:9px;
  height:9px;
  border:2px solid var(--signal);
  border-radius:50%;
  background:var(--ink);
}

.case-study-timeline-item time{
  color:var(--signal);
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  font-weight:500;
}

.case-study-timeline-item strong{
  display:block;
  margin-bottom:3px;
  color:var(--paper);
  font-weight:600;
}

.case-study-timeline-item span{
  display:block;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* ----------------------------------------------------------- tables */

.case-study-table-wrap{
  width:100%;
  margin:28px 0 34px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:8px;
}

.prose .case-study-table{
  width:100%;
  min-width:680px;
  margin:0;
  border-collapse:collapse;
  font-size:14px;
}

.prose .case-study-table th,
.prose .case-study-table td{
  padding:13px 16px;
  border:0;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:middle;
}

.prose .case-study-table tbody tr:last-child td{
  border-bottom:0;
}

.prose .case-study-table th{
  background:var(--raise);
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
  font-weight:500;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.case-study-action{
  display:inline-block;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
  font-weight:500;
  line-height:1.3;
}

.case-study-action.resume{
  color:var(--signal);
  border-color:rgba(47,184,168,.45);
}

.case-study-action.pause{
  color:#AEB8C6;
}

/* --------------------------------------------------- note / disclaimer */

.case-study-note,
.case-study-disclaimer{
  max-width:var(--case-prose);
  margin:30px 0;
  padding:20px 22px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#141A24;
}

.case-study-note{
  border-left:2px solid var(--signal);
}

.case-study-note > strong,
.case-study-disclaimer > strong{
  display:block;
  margin-bottom:7px;
  color:var(--paper);
  font-weight:600;
}

.case-study-note p,
.case-study-disclaimer p{
  margin:0;
  color:#AEB8C6;
  font-size:14px;
  line-height:1.65;
}

/* ----------------------------------------------------- inline status */

.case-study-inline-list{
  max-width:var(--case-prose);
  margin:24px 0 28px;
  padding:15px 18px;
  border:1px solid var(--line);
  border-left:2px solid var(--signal);
  border-radius:6px;
  color:#C6CEDA;
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  line-height:1.6;
}

.case-study-inline-list span{
  display:inline-block;
  margin:0 8px 6px 0;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
}

/* ---------------------------------------------------- architecture flow */

.case-study-flow{
  display:flex;
  width:100%;
  align-items:center;
  gap:10px;
  margin:28px 0 34px;
  padding:20px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:#141A24;
}

.case-study-flow div{
  flex:1 0 150px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--raise);
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
  font-weight:500;
  text-align:center;
}

.case-study-flow > span{
  flex:0 0 auto;
  color:var(--signal);
  opacity:.75;
}

/* ------------------------------------------------------------ code */

.prose .case-study-code{
  width:100%;
  margin:26px 0 32px;
  padding:20px 22px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:7px;
  background:#0D1118;
  color:#DCE3EC;
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  line-height:1.7;
  tab-size:4;
}

.prose .case-study-code code{
  padding:0;
  border:0;
  background:none;
  color:inherit;
  font:inherit;
}

.prose .case-study-code-output{
  color:#CDE8DE;
  border-left:2px solid var(--signal);
}

.prose .case-study-inline-code{
  padding:2px 6px;
  border:1px solid var(--line);
  border-radius:3px;
  background:var(--raise);
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:.86em;
}

/* ------------------------------------------------ implementation steps */

.prose .case-study-steps{
  max-width:var(--case-prose);
  margin:28px 0 34px;
  padding:0;
  list-style:none;
  counter-reset:case-step;
  color:inherit;
}

.prose .case-study-steps li{
  position:relative;
  margin:0;
  padding:15px 0 15px 46px;
  border-bottom:1px solid var(--line);
  counter-increment:case-step;
}

.prose .case-study-steps li:first-child{
  border-top:1px solid var(--line);
}

.prose .case-study-steps li::before{
  content:counter(case-step,decimal-leading-zero);
  position:absolute;
  left:0;
  top:16px;
  color:var(--signal);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
  font-weight:500;
}

.case-study-steps strong{
  display:block;
  margin-bottom:2px;
  color:var(--paper);
}

.case-study-steps span{
  display:block;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* -------------------------------------------------------- checklists */

.prose .case-study-checklist,
.prose .case-study-didnt-change{
  max-width:var(--case-prose);
  margin:26px 0 32px;
  padding:0;
  list-style:none;
  color:inherit;
}

.prose .case-study-checklist li,
.prose .case-study-didnt-change li{
  position:relative;
  margin:0;
  padding:11px 0 11px 30px;
  border-bottom:1px solid var(--line);
  color:#C6CEDA;
  line-height:1.5;
}

.prose .case-study-checklist li:first-child,
.prose .case-study-didnt-change li:first-child{
  border-top:1px solid var(--line);
}

.case-study-checklist li::before{
  content:"✓";
  position:absolute;
  left:0;
  color:var(--signal);
  font-weight:700;
}

.case-study-didnt-change li::before{
  content:"—";
  position:absolute;
  left:0;
  color:var(--muted);
}

/* ---------------------------------------------------- schedule cards */

.case-study-schedule-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:100%;
  margin:30px 0 36px;
}

.case-study-schedule-card{
  position:relative;
  display:flex;
  min-width:0;
  min-height:200px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#141A24;
  flex-direction:column;
}

.case-study-schedule-number{
  display:block;
  margin-bottom:30px;
  color:var(--signal);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
}

.case-study-schedule-card strong{
  display:block;
  margin-bottom:5px;
  color:var(--paper);
  font-size:16px;
}

.case-study-schedule-card > span:not(.case-study-schedule-number){
  color:var(--muted);
  font-size:13px;
}

.case-study-schedule-card time{
  display:block;
  margin-top:12px;
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:16px;
  font-weight:500;
}

.case-study-schedule-card code{
  display:block;
  margin-top:auto;
  padding-top:18px;
  border:0;
  background:none;
  color:var(--signal);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
}

/* ----------------------------------------------------- process strip */

.case-study-process{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items:stretch;
  gap:8px;
  width:100%;
  margin:28px 0 36px;
  overflow-x:auto;
}

.case-study-process > div{
  display:flex;
  min-width:120px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#141A24;
  flex-direction:column;
}

.case-study-process time{
  margin-bottom:20px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
}

.case-study-process strong{
  color:var(--paper);
  font-size:14px;
}

.case-study-process > span{
  align-self:center;
  color:var(--signal);
  opacity:.75;
}

/* ------------------------------------------------ cost calculation */

.case-study-calculation{
  max-width:var(--case-prose);
  margin:26px 0 34px;
  border-top:1px solid var(--line);
}

.case-study-calculation > div{
  display:flex;
  justify-content:space-between;
  gap:28px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
  color:#C6CEDA;
}

.case-study-calculation strong{
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  font-weight:500;
}

.case-study-calculation-total{
  color:var(--paper) !important;
}

.case-study-big-number{
  display:flex;
  max-width:var(--case-prose);
  align-items:center;
  justify-content:center;
  gap:24px;
  margin:30px 0 34px;
  padding:26px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#141A24;
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:clamp(23px,3vw,34px);
}

.case-study-big-number strong{
  color:var(--signal);
  font-weight:500;
}

.case-study-cost-comparison{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:16px;
  width:100%;
  margin:34px 0;
}

.case-study-cost-comparison > div:not(.case-study-cost-arrow){
  min-width:0;
  padding:24px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#141A24;
}

.case-study-cost-comparison small{
  display:block;
  margin-bottom:14px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
  letter-spacing:.04em;
}

.case-study-cost-comparison strong{
  display:block;
  color:var(--paper);
  font-family:"IBM Plex Mono",monospace;
  font-size:clamp(26px,3.2vw,38px);
  font-weight:500;
  letter-spacing:-.04em;
}

.case-study-cost-comparison span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.case-study-cost-arrow{
  color:var(--signal);
  font-size:24px;
}

.case-study-result{
  font-size:19px !important;
  color:var(--paper) !important;
}

/* --------------------------------------------------- decision flow */

.case-study-decision-flow{
  max-width:var(--case-prose);
  margin:30px 0 36px;
  text-align:center;
}

.case-study-decision-flow > div:first-child,
.case-study-decision-question{
  max-width:480px;
  margin:0 auto;
  padding:14px 18px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#141A24;
  color:var(--paper);
}

.case-study-decision-flow > span{
  display:block;
  margin:8px 0;
  color:var(--signal);
}

.case-study-decision-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  max-width:600px;
  margin:14px auto 0;
}

.case-study-decision-options > div{
  padding:16px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--raise);
  color:#C6CEDA;
}

.case-study-decision-options strong{
  display:block;
  margin-bottom:3px;
  color:var(--paper);
}

/* --------------------------------------------------- monitoring cards */

.case-study-monitor-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  width:100%;
  margin:30px 0 36px;
}

.case-study-monitor-grid > div{
  min-width:0;
  padding:20px;
  border:1px solid var(--line);
  border-top:2px solid var(--signal);
  border-radius:7px;
  background:#141A24;
  color:var(--muted);
}

.case-study-monitor-grid > div > span{
  display:block;
  margin-bottom:28px;
  color:var(--signal);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
}

.case-study-monitor-grid strong{
  display:block;
  margin:0 0 7px;
  color:var(--paper);
}

.case-study-monitor-grid p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

/* --------------------------------------------------------- outcomes */

/* Supports both the original span-based markup and the simplified
   database markup where the outcomes are stored as plain text. */
.case-study-outcomes{
  max-width:var(--case-prose);
  margin:30px 0;
  padding:18px 20px;
  border:1px solid var(--line);
  border-left:2px solid var(--signal);
  border-radius:7px;
  background:#141A24;
  color:#C6CEDA;
  font-size:14px;
  line-height:1.8;
}

.case-study-outcomes span{
  display:block;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}

.case-study-outcomes span:last-child{
  border-bottom:0;
}

.case-study-final-line{
  margin-top:34px !important;
  color:var(--paper) !important;
  font-size:19px !important;
  line-height:1.65 !important;
}

/* ----------------------------------------------------- post navigation */

.case-study-post-nav{
  display:flex;
  justify-content:space-between;
  gap:16px;
  width:100%;
  margin-top:72px;
  padding-top:24px;
  border-top:1px solid var(--line);
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
}

.case-study-post-nav a{
  color:var(--muted);
}

.case-study-post-nav a:hover{
  color:var(--paper);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:960px){
  .case-study{
    --case-prose:100%;
  }

  .case-study-schedule-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .case-study-monitor-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .case-study-section{
    margin-bottom:58px;
  }

  .case-study-section p{
    font-size:16px;
    line-height:1.72;
  }

  .case-study-opening > p:first-child{
    font-size:18px;
  }

  .case-study-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
    margin-bottom:60px;
  }

  .case-study-timeline-item{
    grid-template-columns:78px minmax(0,1fr);
    gap:12px;
  }

  .case-study-flow{
    padding:16px;
  }

  .case-study-cost-comparison{
    grid-template-columns:1fr;
  }

  .case-study-cost-arrow{
    justify-self:center;
    transform:rotate(90deg);
  }

  .case-study-process{
    display:flex;
  }

  .case-study-image-placeholder{
    min-height:260px;
  }
}

@media (max-width:520px){
  .case-study-workload-row{
    grid-template-columns:1fr;
    gap:5px;
  }

  .case-study-metrics{
    grid-template-columns:1fr;
  }

  .case-study-schedule-grid{
    grid-template-columns:1fr;
  }

  .case-study-calculation > div{
    flex-direction:column;
    gap:4px;
  }

  .case-study-big-number{
    gap:14px;
    padding:20px 14px;
    font-size:21px;
  }

  .case-study-decision-options{
    grid-template-columns:1fr;
  }

  .case-study-post-nav{
    flex-direction:column;
  }
}

/*-----------------------END CASE STUDY -------------------*/
/* ------------------------------------------------------------ responsive */
@media (max-width:960px){
  .nav-in{flex-wrap:wrap;gap:16px}
  .nav-toggle{display:block}
  .nav-links{
    margin-left:0;width:100%;display:none;
    flex-direction:column;align-items:flex-start;gap:16px;padding-bottom:6px;
  }
  .nav-links.open{display:flex}

  .hero-grid{grid-template-columns:1fr;gap:36px}
  .page-about .hero-grid{grid-template-columns:1fr;gap:36px}
  .hero-top{grid-template-columns:1fr;gap:34px;align-items:start}
  .hero-facts{flex-direction:column;border-left:1px solid var(--line)}
  .page-teaching .hero-fig .photo{aspect-ratio:4/4.4}

  .flow{grid-template-columns:1fr}
  .conn{
    width:2px;height:26px;justify-self:center;
    background:repeating-linear-gradient(180deg,var(--line) 0 6px,transparent 6px 12px);
    background-size:2px 12px;
    animation:marchv 1.1s linear infinite;
  }

  .cards{grid-template-columns:1fr}
  .engage{grid-template-columns:1fr}
  .proof{grid-template-columns:1fr}
  .pillars{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr;gap:36px}
  .portrait{max-width:420px}

  .craft-grid{grid-template-columns:1fr}
  .craft{grid-template-columns:1fr}
  .craft-fig .photo{aspect-ratio:3/4;max-height:520px}
  .rooms-grid{grid-template-columns:1fr}
  .rooms-grid .photo{aspect-ratio:16/9}

  .now-band{grid-template-columns:1fr}
  .era{grid-template-columns:1fr;gap:6px}
  .era .years{padding-top:0}

  .contact-form .row{grid-template-columns:1fr}
}

@media (max-width:600px){
  body{font-size:16px}
  .hero{padding-top:52px}
  .page-home .hero{padding-top:56px;padding-bottom:10px}
  .page-teaching .hero{padding-top:48px}
  section{padding:52px 0}
  .rooms{padding-top:52px}
  .pipeline{padding:18px}
  .sub{padding:22px}
  .ladder{padding:20px}
  .timeline{padding:6px 20px}
  .post{grid-template-columns:1fr;gap:6px}
  .post .kind{order:-1}
  .rung{grid-template-columns:1fr;gap:6px}
  .rung .step{padding-top:0}
}