/* marcturtal.com v2 — electric edition
   Dark hero with vivid electric blue, light platinum body.
   Type: Space Grotesk (display) + IBM Plex Mono (labels/data). */

:root {
  --ink: #12141a;
  --ink-soft: #4a4f5a;
  --ink-faint: #828896;
  --paper: #fbfbfd;
  --silver-050: #f5f6f9;
  --silver-100: #edeff4;
  --silver-200: #e0e3ea;
  --silver-300: #cbd0da;
  --dark: #141827;
  --dark-2: #1a1f33;
  --dark-3: #232a45;
  --dark-line: #333c5c;
  --dark-text: #f0f2f8;
  --dark-muted: #a8b0c6;
  --blue: #2b5bff;
  --blue-bright: #4d78ff;
  --blue-deep: #1a3fd6;
  --blue-tint: #e8edff;
  --trim: linear-gradient(90deg, transparent, var(--silver-300) 18%, #f4f5f7 50%, var(--silver-300) 82%, transparent);
  --display: "Space Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--display);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: #ffffff; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- primitives ---------- */

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--blue); flex: none; }

.rule { border: 0; height: 1px; background: var(--trim); }

.u-link { position: relative; padding-bottom: 2px; }
.u-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.u-link:hover::after { transform: scaleX(1); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--silver-300);
  background: linear-gradient(180deg, #ffffff, var(--silver-050));
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); transition: left 0.6s var(--ease);
}
.btn:hover { border-color: var(--blue); box-shadow: 0 8px 28px rgba(43, 91, 255, 0.16); transform: translateY(-1px); color: var(--ink); }
.btn:hover::before { left: 130%; }
.btn:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(43, 91, 255, 0.14); }

.btn-blue {
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  color: #ffffff;
  border-color: var(--blue);
}
.btn-blue:hover { color: #ffffff; background: linear-gradient(180deg, var(--blue), var(--blue-deep)); }

.btn-ghost-dark {
  background: transparent;
  color: var(--dark-text);
  border-color: var(--dark-line);
}
.btn-ghost-dark:hover { color: #ffffff; border-color: var(--blue-bright); }

/* ---------- nav (dark) ---------- */

.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 24, 39, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--dark-line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--dark-text);
}
.brand:hover { color: #ffffff; }
.brand b { color: var(--blue-bright); font-weight: 500; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--dark-muted); }
.nav-links a:hover { color: #ffffff; }

/* ---------- hero (dark) ---------- */

.hero {
  background:
    radial-gradient(900px 480px at 78% 10%, rgba(77, 120, 255, 0.30), transparent 65%),
    radial-gradient(600px 400px at 12% 92%, rgba(77, 120, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--dark-text);
  overflow: hidden;
}
.hero a { color: inherit; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: end;
  padding-top: 88px;
}
.hero .kicker { color: var(--dark-muted); }
.hero h1 {
  font-size: clamp(46px, 6.4vw, 82px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.hero h1 em { font-style: normal; color: var(--blue-bright); }
.hero .title-line {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue-bright); margin-top: 24px;
}
.hero .positioning {
  font-size: clamp(19px, 2.2vw, 24px); line-height: 1.45; color: var(--dark-muted);
  max-width: 540px; margin-top: 22px; font-weight: 400; text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 14px; margin: 40px 0 72px; flex-wrap: wrap; }

.portrait {
  position: relative; align-self: stretch; justify-self: end; width: 100%;
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.portrait::before {
  content: ""; position: absolute; inset: auto -8% -14% -8%; height: 88%;
  background: radial-gradient(closest-side, rgba(43, 91, 255, 0.38), transparent 72%);
  filter: blur(8px);
}
.portrait img {
  position: relative; display: block;
  height: 100%; width: 100%; max-height: 640px;
  object-fit: contain; object-position: bottom right;
  margin-bottom: -4px;
}

/* company strip on hero */
.hero-strip { border-top: 1px solid var(--dark-line); background: rgba(15, 18, 30, 0.45); }
.strip-inner { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.strip-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dark-muted); margin-right: 8px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.01em; color: #d4dae8; opacity: 0.9;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.wordmark img {
  width: 26px; height: 26px; display: block; object-fit: contain;
  background: #ffffff; padding: 3px; box-sizing: border-box;
}
.wordmark:hover { opacity: 1; color: #ffffff; transform: translateY(-1px); }
.wordmark.jpm { font-weight: 700; letter-spacing: -0.01em; }
.wordmark.mono-mark { font-family: var(--mono); font-weight: 500; font-size: 13.5px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- proof bar ---------- */

.proof { padding: 72px 0; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item {
  padding: 8px 28px;
  border-left: 1px solid var(--silver-200);
  transition: background 0.4s var(--ease);
}
.proof-item:first-child { border-left: 0; padding-left: 0; }
.proof-item:hover { background: linear-gradient(180deg, transparent, var(--blue-tint)); }
.proof-num {
  font-size: clamp(34px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.proof-num sup { font-size: 0.5em; color: var(--blue); }
.proof-label { font-size: 14px; color: var(--ink-soft); margin-top: 12px; line-height: 1.5; text-wrap: pretty; }
.proof-src {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue-deep); margin-top: 14px;
}

/* ---------- sections ---------- */

.section { padding: 96px 0; }
.section-tint { background: linear-gradient(180deg, var(--silver-050), var(--paper)); border-top: 1px solid var(--silver-200); }
.section h2 {
  font-size: clamp(30px, 3.8vw, 46px); font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.1; max-width: 680px; text-wrap: pretty;
}

/* case study */
.case-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; margin-top: 56px; }
.case-col h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--blue-deep);
  padding-bottom: 14px; border-bottom: 2px solid var(--blue); margin-bottom: 18px;
}
.case-col p { color: var(--ink-soft); font-size: 15.5px; text-wrap: pretty; }
.case-col p + p { margin-top: 12px; }

.stack-row { margin-top: 56px; }
.stack-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px;
}
.stack-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  padding: 9px 14px; background: #ffffff; border: 1px solid var(--silver-200);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.chip img, .chip svg { width: 16px; height: 16px; display: block; }
.chip:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43, 91, 255, 0.12); }

.case-outcomes {
  margin-top: 56px; padding: 40px 44px;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3));
  border: 1px solid var(--dark-line);
  color: var(--dark-text);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
}
.case-outcomes .proof-num { font-size: clamp(28px, 3vw, 40px); color: #ffffff; }
.case-outcomes .proof-label { color: var(--dark-muted); }

/* track record */
.timeline { margin-top: 56px; list-style: none; }
.timeline li {
  display: grid; grid-template-columns: 170px 1fr; gap: 40px;
  padding: 34px 0; border-top: 1px solid var(--silver-200);
  transition: background 0.4s var(--ease), padding-left 0.4s var(--ease);
}
.timeline li:hover { background: linear-gradient(90deg, var(--blue-tint), transparent 70%); padding-left: 12px; }
.timeline li:last-child { border-bottom: 1px solid var(--silver-200); }
.tl-when {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); padding-top: 6px;
}
.tl-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tl-role { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.tl-org {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.01em;
  padding: 5px 12px; background: var(--silver-100); border: 1px solid var(--silver-200); color: var(--ink-soft);
}
.tl-org.blue { background: var(--blue-tint); border-color: #c6d3ff; color: var(--blue-deep); }
.tl-org img { width: 16px; height: 16px; display: block; object-fit: contain; }
.tl-proof { color: var(--ink-soft); font-size: 15.5px; margin-top: 10px; max-width: 720px; text-wrap: pretty; }

/* projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.project {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; background: #ffffff; border: 1px solid var(--silver-200);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 14px 36px rgba(43, 91, 255, 0.12); color: var(--ink); }
.project-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue-deep);
}
.project-name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.project-desc { color: var(--ink-soft); font-size: 14.5px; flex: 1; text-wrap: pretty; }
.project-cta {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--silver-300); align-self: flex-start; padding-bottom: 3px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.project:hover .project-cta { border-color: var(--blue); color: var(--blue-deep); }

/* services */
.services { margin-top: 56px; list-style: none; counter-reset: svc; }
.services li {
  counter-increment: svc;
  display: grid; grid-template-columns: 56px 1fr; gap: 24px; align-items: start;
  padding: 28px 0; border-top: 1px solid var(--silver-200);
  transition: padding-left 0.4s var(--ease);
}
.services li:hover { padding-left: 12px; }
.services li:last-child { border-bottom: 1px solid var(--silver-200); }
.svc-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--blue-tint); border: 1px solid #c6d3ff; color: var(--blue-deep);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.svc-icon svg { width: 20px; height: 20px; }
.services li:hover .svc-icon { background: var(--blue); color: #ffffff; }
.svc-name { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.svc-name::after {
  content: "0" counter(svc);
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  color: var(--ink-faint); margin-left: 12px; vertical-align: super;
}
.svc-desc { color: var(--ink-soft); font-size: 15.5px; margin-top: 6px; max-width: 640px; text-wrap: pretty; }

/* FAQ */
.faq-list { margin-top: 56px; max-width: 780px; }
.faq-item { border-top: 1px solid var(--silver-200); }
.faq-item:last-child { border-bottom: 1px solid var(--silver-200); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue-deep); }
.faq-item summary::after {
  content: "+"; font-family: var(--mono); font-size: 20px; font-weight: 400;
  color: var(--blue); flex: none; transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 40px 26px 0; color: var(--ink-soft); font-size: 15.5px; text-wrap: pretty; }
.faq-body a { color: var(--blue-deep); }

/* contact (dark) */
.contact-dark {
  background:
    radial-gradient(720px 420px at 85% 0%, rgba(43, 91, 255, 0.2), transparent 62%),
    linear-gradient(180deg, var(--dark-2), var(--dark));
  color: var(--dark-text);
  padding: 96px 0;
}
.contact-dark .kicker { color: var(--dark-muted); }
.contact-dark h2 { color: #ffffff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; margin-top: 56px; }
.contact-lines { list-style: none; margin-top: 28px; }
.contact-lines li {
  display: flex; gap: 18px; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--dark-line); font-size: 16px;
}
.contact-lines li:last-child { border-bottom: 1px solid var(--dark-line); }
.contact-lines .k {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dark-muted); width: 88px; flex: none;
}
.contact-lines a { color: var(--dark-text); }
.contact-lines a:hover { color: var(--blue-bright); }
.contact-lines .u-link::after { background: var(--blue-bright); }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dark-muted);
}
.field input, .field textarea, .field select {
  font-family: var(--display); font-size: 16px; color: var(--dark-text);
  background: var(--dark-3); border: 1px solid var(--dark-line); padding: 14px 16px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #3a4460; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue-bright);
  box-shadow: 0 0 0 1px var(--blue-bright), 0 10px 30px rgba(43, 91, 255, 0.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* footer */
.footer { background: var(--dark); border-top: 1px solid var(--dark-line); padding: 32px 0 48px; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dark-muted);
}

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* responsive */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; padding-top: 64px; }
  .portrait { justify-self: start; width: min(340px, 86%); margin-top: 8px; align-self: start; display: block; }
  .portrait img { height: auto; object-position: bottom left; }
  .canvas-figure { margin-top: 40px; }
  .proof-grid { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .proof-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .case-cols { grid-template-columns: 1fr; gap: 36px; }
  .case-outcomes { grid-template-columns: 1fr; gap: 28px; padding: 32px 28px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .nav-links { display: none; }
}
@media (max-width: 700px) {
  /* the full-length cut-out reads awkwardly on a phone: drop it and put a
     framed portrait chip above the headline instead */
  .portrait { display: none; }
  .avatar-mobile {
    display: block; width: 88px; height: 88px;
    margin: 0 0 22px; position: relative;
    border: 1px solid var(--dark-line);
    background: linear-gradient(180deg, var(--dark-3), var(--dark-2));
  }
  .avatar-mobile img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 12%;
  }
  .hero-ctas { margin-bottom: 56px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .writing-list a { grid-template-columns: 1fr; padding: 26px 16px; margin: 0 -16px; }
  .w-cta { grid-row: auto; grid-column: 1; margin-top: 6px; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--silver-200); padding-top: 24px; }
  .proof-item:first-child { border-top: 0; padding-top: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; }
  .projects-grid { grid-template-columns: 1fr; }
  .services li { grid-template-columns: 44px 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================
   Production additions (Claude Code build pass)
   Alternating row hues, wired forms, resume request dialog.
   ========================================================== */

/* alternating hue: track record and services rows */
.timeline li:nth-child(even),
.services li:nth-child(even) {
  background: linear-gradient(90deg, rgba(43, 91, 255, 0.06), rgba(43, 91, 255, 0.015) 70%, transparent);
}
.timeline li, .services li { padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
.timeline li:hover, .services li:hover { padding-left: 28px; }

/* text-styled buttons that act like links */
.link-btn {
  font: inherit; background: none; border: 0; padding: 0 0 2px;
  color: var(--blue-deep); cursor: pointer; position: relative;
}
.link-btn::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.link-btn:hover::after { transform: scaleX(1); }
.link-btn.dark { color: var(--dark-text); }
.link-btn.dark:hover { color: var(--blue-bright); }

/* honeypot fields: visually removed, still submitted */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* form status line */
.form-status { font-size: 14.5px; line-height: 1.5; min-height: 22px; margin: 0; }
.form-status.ok { color: #6ee7a0; }
.form-status.err { color: #ff8a8a; }

/* resume request dialog */
dialog#resume-dialog {
  border: 1px solid var(--dark-line);
  background: linear-gradient(180deg, var(--dark-2), var(--dark));
  color: var(--dark-text);
  padding: 36px;
  width: min(520px, calc(100vw - 40px));
  margin: auto;
}
dialog#resume-dialog::backdrop { background: rgba(10, 12, 22, 0.66); backdrop-filter: blur(3px); }
#resume-dialog form { display: grid; gap: 18px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dlg-head h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: #ffffff; }
.dlg-close {
  font-family: var(--mono); font-size: 22px; line-height: 1;
  background: none; border: 1px solid var(--dark-line); color: var(--dark-muted);
  width: 36px; height: 36px; cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.dlg-close:hover { color: #ffffff; border-color: var(--blue-bright); }
.dlg-sub { font-size: 14.5px; color: var(--dark-muted); text-wrap: pretty; }
#resume-dialog select { width: 100%; appearance: none; }
#resume-dialog select:invalid { color: var(--dark-muted); }

/* ---- case study emphasis ---- */
.case-col strong { font-weight: 600; color: var(--ink); }
.case-col strong.hl-num {
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- halftone dot field: dots grow toward a corner then fade out ---- */
.case-outcomes {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -18px 40px rgba(10, 13, 26, 0.55),
    0 24px 60px rgba(20, 24, 39, 0.30);
}
.case-outcomes::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(77, 120, 255, 0.50) 2.6px, transparent 2.9px),
    radial-gradient(circle, rgba(77, 120, 255, 0.34) 1.7px, transparent 2px),
    radial-gradient(circle, rgba(77, 120, 255, 0.22) 1px, transparent 1.3px);
  background-size: 30px 30px, 21px 21px, 13px 13px;
  background-position: 0 0, 4px 8px, 2px 3px;
  -webkit-mask-image: radial-gradient(560px 360px at 92% -10%, black 0%, rgba(0,0,0,0.55) 42%, transparent 72%);
  mask-image: radial-gradient(560px 360px at 92% -10%, black 0%, rgba(0,0,0,0.55) 42%, transparent 72%);
}
.case-outcomes::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(480px 300px at 88% 0%, rgba(77, 120, 255, 0.16), transparent 70%);
}
.case-outcomes .proof-num {
  background: linear-gradient(180deg, #ffffff 30%, #b9c7f2 78%, #8fa5e6 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(15, 20, 45, 0.55));
}

/* ---- article pages ---- */
.article { padding: 88px 0 96px; }
.article-wrap { max-width: 760px; }
.article h1 {
  font-size: clamp(34px, 4.6vw, 54px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 28px; text-wrap: pretty;
}
.article .lede {
  font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--ink-soft);
  margin-bottom: 28px; text-wrap: pretty;
}
.article .byline {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: 40px; border-bottom: 1px solid var(--silver-200); margin-bottom: 44px;
}
.article h2 {
  font-size: clamp(22px, 2.6vw, 29px); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; margin: 52px 0 18px; text-wrap: pretty;
}
.article p { font-size: 17.5px; line-height: 1.72; color: var(--ink-soft); margin-bottom: 20px; text-wrap: pretty; }
.article p strong { color: var(--ink); font-weight: 600; }
.article .article-cta {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--silver-200);
  font-size: 17px; color: var(--ink);
}
.article .article-cta a { color: var(--blue-deep); }

/* ---- hero avatar: shown only on phones, in place of the cut-out ----
   Scoped to min-width so it never competes with the phone rule below,
   whatever order the two land in. */
@media (min-width: 701px) {
  .avatar-mobile { display: none; }
}

/* ---- writing list ---- */
.writing-list { list-style: none; margin-top: 56px; }
.writing-list li + li { margin-top: 2px; }
.writing-list a {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 6px 32px;
  padding: 30px 20px; margin: 0 -20px;
  border-top: 1px solid var(--silver-200);
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease);
}
.writing-list li:last-child a { border-bottom: 1px solid var(--silver-200); }
.writing-list a:hover { padding-left: 32px; background: linear-gradient(90deg, var(--blue-tint), transparent 70%); color: var(--ink); }
.w-meta {
  grid-column: 1 / -1;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue-deep);
}
.w-title { font-size: 23px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.w-desc { grid-column: 1; color: var(--ink-soft); font-size: 15.5px; max-width: 70ch; text-wrap: pretty; }
.w-cta {
  grid-row: 2 / 4; grid-column: 2; align-self: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.writing-list a:hover .w-cta { color: var(--blue-deep); transform: translateX(4px); }

/* ---- workflow canvas: the pipeline drawn as a node graph ---- */
.canvas-figure { margin: 56px 0 0; }
.canvas-cap {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px;
}
.canvas-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--silver-200);
  background: var(--silver-050);
}
.flow { display: block; width: 100%; height: auto; font-family: var(--display); }
/* The wide graph needs room, so it scrolls sideways in its frame. The stacked
   version replaces it on phones so nothing has to be swiped. Both swaps use
   non-overlapping media queries, so neither depends on source order. */
.flow-h { min-width: 720px; }
@media (min-width: 701px) { .flow-v { display: none; } }
@media (max-width: 700px) {
  .flow-h { display: none; }
  .flow-v { display: block; min-width: 0; }
  .canvas-scroll { overflow-x: hidden; }
}
.c-node text.c-sm { font-size: 12px; }
.c-bg { fill: var(--silver-050); }
.c-dot { fill: var(--silver-300); }
.c-arrow { fill: var(--blue); }

.c-links path { fill: none; stroke: var(--silver-300); stroke-width: 2; }
.c-links path.c-link-lit { stroke: var(--blue); }

.c-node rect { fill: #ffffff; stroke: var(--silver-300); stroke-width: 1; }
.c-node text { font-size: 14px; font-weight: 500; fill: var(--ink); }
.c-node .c-node-sub { font-size: 12px; font-weight: 400; fill: var(--ink-faint); font-family: var(--mono); }
.c-node-lit rect { stroke: var(--blue); }
.c-port { fill: var(--silver-300); }
.c-port-lit { fill: var(--blue); }

.c-warehouse > rect { fill: #ffffff; stroke: var(--blue); stroke-width: 1.5; }
.c-wh-title { font-size: 15px; font-weight: 600; fill: var(--ink); }
.c-wh-sub { font-size: 11.5px; fill: var(--ink-faint); font-family: var(--mono); }
.c-layer { fill: var(--silver-050); stroke: var(--silver-200); stroke-width: 1; }
.c-layer-lit { fill: var(--blue-tint); stroke: #c6d3ff; }
.c-layer-t { font-size: 11px; font-family: var(--mono); letter-spacing: 0.12em; fill: var(--blue-deep); }
.c-layer-s { font-size: 11.5px; fill: var(--ink-soft); }
.c-tag {
  font-size: 11px; font-family: var(--mono); letter-spacing: 0.14em;
  text-transform: uppercase; fill: var(--ink-faint);
}

/* current flowing along the connectors */
.c-links path {
  stroke-dasharray: 5 9;
  animation: flowline 1.6s linear infinite;
}
.c-links path.c-link-lit { stroke-dasharray: 6 8; }
@keyframes flowline { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) {
  .c-links path { animation: none; stroke-dasharray: none; }
}

/* ---- project cards: soft depth plus a dot bloom in the corner ---- */
.project {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(165deg, #ffffff 55%, var(--silver-050) 100%);
  box-shadow: 0 1px 2px rgba(18, 20, 26, 0.05), 0 10px 24px rgba(18, 20, 26, 0.05);
}
.project::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(43, 91, 255, 0.34) 2.2px, transparent 2.5px),
    radial-gradient(circle, rgba(43, 91, 255, 0.20) 1.3px, transparent 1.6px);
  background-size: 24px 24px, 15px 15px;
  background-position: 6px 2px, 0 0;
  -webkit-mask-image: radial-gradient(300px 220px at 108% -12%, black 0%, rgba(0,0,0,0.4) 45%, transparent 72%);
  mask-image: radial-gradient(300px 220px at 108% -12%, black 0%, rgba(0,0,0,0.4) 45%, transparent 72%);
  opacity: 0.55;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.project:hover::after { opacity: 1; transform: scale(1.06); }
.project:hover {
  box-shadow: 0 2px 4px rgba(18, 20, 26, 0.05), 0 18px 44px rgba(43, 91, 255, 0.16);
}
