/* willshadrach.com
   Palette: cool paper, deep petrol panel, brass + verdigris accents.
   Type: Newsreader (display) / IBM Plex Sans (body) / IBM Plex Mono (utility) */

:root {
  --paper: #EBEDEC;
  --paper-2: #E1E5E3;
  --card: #F5F6F5;
  --ink: #101A1D;
  --ink-soft: #2C3A3E;
  --muted: #5C6B6E;
  --panel: #0C1A1F;
  --panel-2: #12262C;
  --brass: #A87422;
  --brass-lt: #C89A46;
  --verdigris: #3E7C71;
  --line: rgba(16, 26, 29, 0.14);
  --line-soft: rgba(16, 26, 29, 0.08);

  --measure: 34rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 640px) { body { font-size: 16px; } }

img, svg { max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---------- layout ---------- */

.wrap {
  width: min(1120px, 100% - (var(--pad) * 2));
  margin-inline: auto;
}

.narrow { max-width: 44rem; }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- type ---------- */

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
  display: block;
}

.eyebrow.brass { color: var(--brass); }

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.25rem);
  line-height: 1.04;
  margin: 0 0 1.6rem;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 1.4rem;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 0.55rem;
}

p { margin: 0 0 1.15rem; max-width: var(--measure); }
p.wide { max-width: 46rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 40rem;
}

strong { font-weight: 600; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ---------- header ---------- */

.masthead {
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.wordmark .surname { font-weight: 600; }

.masthead nav {
  display: flex;
  gap: 1.6rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.masthead nav a {
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--brass); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(4rem, 10vw, 8rem) clamp(2.5rem, 5vw, 4rem); }

.hero h1 { max-width: 15ch; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
}

.hero-aside p { font-size: 1rem; color: var(--ink-soft); }

.hero-aside .mono-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.hero-aside .mono-list li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero-aside .mono-list li span:last-child { color: var(--ink); }

/* ---------- signature panel ---------- */

.panel {
  background: var(--panel);
  color: #DCE5E4;
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  overflow: hidden;
}

.panel .eyebrow { color: var(--brass-lt); }

.panel h2, .panel h3 { color: #F0F4F3; }

.panel p { color: #A9BAB9; }

.panel-caption {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(220, 229, 228, 0.16);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #7F9694;
}

.panel-caption strong { color: #DCE5E4; font-weight: 500; }

.figure { margin: 0; }
.figure svg { display: block; width: 100%; height: auto; }

/* ---------- work cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1.75rem 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(168, 116, 34, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -20px rgba(16, 26, 29, 0.55);
}

.card h3 { margin-bottom: 0.7rem; }

.card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  max-width: none;
}

.specs {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.specs li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.specs li span:last-child { color: var(--ink); text-align: right; }

.card-foot {
  margin-top: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-foot .arrow { transition: transform 0.2s ease; }
.card:hover .card-foot .arrow { transform: translateX(4px); }

/* ---------- method ---------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: 2.5rem;
}

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

.method-item .label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verdigris);
  display: block;
  margin-bottom: 0.6rem;
}

.method-item h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.method-item p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }

/* ---------- background ---------- */

.roles { margin-top: 2.25rem; border-top: 1px solid var(--line); }

.role {
  display: grid;
  grid-template-columns: 10rem 1fr 8rem;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}

@media (max-width: 720px) {
  .role { grid-template-columns: 1fr; gap: 0.25rem; }
  .role .role-when { order: -1; }
}

.role-org { font-weight: 600; font-size: 0.98rem; }
.role-what { color: var(--ink-soft); font-size: 0.95rem; }
.role-when {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: right;
}
@media (max-width: 720px) { .role-when { text-align: left; } }

/* ---------- contact ---------- */

.contact { background: var(--paper-2); }

.contact-link {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
  transition: border-color 0.2s ease;
  display: inline-block;
}

.contact-link:hover { border-bottom-color: var(--brass); }

footer {
  padding-block: 2.25rem;
  border-top: 1px solid var(--line-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ---------- case study pages ---------- */

.back {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2.5rem;
}

.back:hover { color: var(--brass); }

.case-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }

.case-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 18ch; }

.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) { .meta { grid-template-columns: repeat(2, 1fr); } }

.meta div span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.meta div strong { font-weight: 500; font-size: 0.95rem; }

.body-copy { max-width: 44rem; }

.body-copy h2 { margin-top: 3.25rem; }
.body-copy h2:first-child { margin-top: 0; }
.body-copy h3 { margin-top: 2rem; font-size: 1.15rem; }
.body-copy p { max-width: none; }

.body-copy ul {
  margin: 0 0 1.15rem;
  padding-left: 1.1rem;
}

.body-copy li { margin-bottom: 0.55rem; }

.pullout {
  border-left: 2px solid var(--brass);
  padding: 0.35rem 0 0.35rem 1.4rem;
  margin: 2rem 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.32rem;
  line-height: 1.35;
  color: var(--ink);
}

.status-note {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1.5rem 1.6rem;
  margin-top: 3rem;
}

.status-note .eyebrow { color: var(--brass); margin-bottom: 0.7rem; }
.status-note p { font-size: 0.97rem; color: var(--ink-soft); margin: 0; max-width: none; }

/* Diagrams escape the reading measure and run to the container edge,
   so 11px labels inside a 900-unit viewBox stay legible. */
.figure-block {
  margin: 3rem 0;
  margin-right: calc(-1 * clamp(0px, 100vw - (var(--pad) * 2) - 44rem - 24px, 26rem));
}

.figure-block .cap {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.9rem;
}

.next {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: baseline;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}

.next a {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.next a:hover { border-bottom-color: var(--brass); }

/* ---------- svg diagram tokens ---------- */

.dgm { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.dgm .node { fill: none; stroke: #4E6E6B; stroke-width: 1; }
.dgm .node-fill { fill: rgba(78, 110, 107, 0.12); stroke: #4E6E6B; stroke-width: 1; }
.dgm .core { fill: rgba(168, 116, 34, 0.16); stroke: var(--brass-lt); stroke-width: 1.25; }
.dgm .link { fill: none; stroke: #3E5E5C; stroke-width: 1; }
.dgm .link-2 { fill: none; stroke: var(--brass-lt); stroke-width: 1; opacity: 0.75; }
.dgm .t { fill: #C6D4D3; font-size: 11px; letter-spacing: 0.04em; }
.dgm .t-dim { fill: #7F9694; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.dgm .t-brass { fill: var(--brass-lt); font-size: 11px; letter-spacing: 0.08em; }
.dgm .t-lg { fill: #F0F4F3; font-size: 13px; letter-spacing: 0.06em; }
.dgm .gate { fill: var(--brass-lt); }
.dgm .axis { stroke: rgba(220, 229, 228, 0.18); stroke-width: 1; }

/* light-panel diagrams on case pages */
.dgm-light .node { stroke: #7F918F; }
.dgm-light .node-fill { fill: rgba(62, 124, 113, 0.08); stroke: #6E8C86; }
.dgm-light .core { fill: rgba(168, 116, 34, 0.12); stroke: var(--brass); }
.dgm-light .link { stroke: #8AA09D; }
.dgm-light .link-2 { stroke: var(--brass); opacity: 0.65; }
.dgm-light .t { fill: var(--ink-soft); font-size: 11px; }
.dgm-light .t-dim { fill: var(--muted); font-size: 10px; letter-spacing: 0.1em; }
.dgm-light .t-brass { fill: var(--brass); font-size: 11px; letter-spacing: 0.08em; }
.dgm-light .t-lg { fill: var(--ink); font-size: 13px; letter-spacing: 0.06em; }

/* draw-in animation */
.draw {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.fade {
  opacity: 0;
  animation: fade 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .draw, .fade {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
  .card { transition: none; }
  * { scroll-behavior: auto; }
}

/* ---------- print ---------- */

@media print {
  body { background: #fff; font-size: 11pt; }
  .draw, .fade { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .figure-block { margin-right: 0; }
  .masthead nav, .next, .skip, footer { display: none; }
  .panel { background: #fff; color: #000; border: 1px solid #999; }
  .panel p, .panel-caption { color: #333; }
  section { padding-block: 1.5rem; page-break-inside: avoid; }
  .card { break-inside: avoid; }
  a { text-decoration: none; }
}

/* ---------- feature card (flagship build) ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-top: 2.5rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  border-color: rgba(168, 116, 34, 0.5);
  box-shadow: 0 14px 34px -22px rgba(16, 26, 29, 0.6);
}

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

.feature h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 0.9rem; }
.feature p { font-size: 1.02rem; color: var(--ink-soft); max-width: 32rem; }

.feature .card-foot { margin-top: 1.5rem; }

.layer-list { list-style: none; margin: 0; padding: 0; align-self: center; }

.layer-list li {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.layer-list li:last-child { margin-bottom: 0; }
.layer-list li span { color: var(--muted); font-size: 0.7rem; }

/* ---------- four-up card grid ---------- */

.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.25rem; }

@media (max-width: 1040px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards-4 { grid-template-columns: 1fr; } }

.cards-4 .card { padding: 1.5rem 1.35rem 1.3rem; }
.cards-4 .card h3 { font-size: 1.15rem; }
.cards-4 .card p { font-size: 0.9rem; margin-bottom: 1.2rem; }
.cards-4 .specs li { font-size: 0.7rem; padding: 0.4rem 0; }

/* ---------- method phases ---------- */

.phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: 2.75rem;
}

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

.phase .num {
  font-family: "Newsreader", Georgia, serif;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--verdigris);
  opacity: 0.55;
  display: block;
  margin-bottom: 0.7rem;
}

.phase h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.phase p { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 0.9rem; }

.phase .turn {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--brass);
  border-top: 1px solid var(--line-soft);
  padding-top: 0.8rem;
  display: block;
}

/* ---------- background skill rows ---------- */

.role-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0;
  margin-top: 0.5rem;
}

.role-skills span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}

.role-skills span:not(:last-child)::after {
  content: "·";
  color: var(--brass);
  margin: 0 0.6rem;
}

.role-2 {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

@media (max-width: 720px) { .role-2 { grid-template-columns: 1fr; gap: 0.4rem; } }
