/* ==========================================================================
   Haniya Amjad portfolio. Direction C, 2026-09-30.
   Cream page, flat white surfaces, brand colour only on tiles and inside
   case studies. One theme. No blur, no gradients in the chrome.
   Previous stylesheet: style.css.bak-v40.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg: #F4F2EC;
  --bg-alt: #ECEAE3;
  --surface-solid: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #1C1D21;
  --text-mid: #44464D;
  --muted: #6F7178;
  --line: rgba(28, 29, 33, 0.12);
  --line-soft: rgba(28, 29, 33, 0.07);
  --hair: rgba(28, 29, 33, 0.10);
  --ink: #1C1D21;
  --accent: #1e56a0;
  --green: #16A34A;
  --amber: #A67400;

  /* per-case accent, set by .case-scope from --c-l */
  --case: #1e56a0;
  --case-soft: rgba(30, 86, 160, 0.09);
  --case-line: rgba(30, 86, 160, 0.28);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-tile: 0 1px 2px rgba(0, 0, 0, 0.10);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 14px;
  --radius-xl: 14px;

  --wrap: 1000px;
  --wrap-wide: 1200px;
  --nav-h: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .25s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.022em; line-height: 1.1; margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 56px 0; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: var(--wrap-wide); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.section { padding: 60px 0 40px; }
.section-sm { padding: 40px 0 16px; }
.section-alt { background: var(--bg-alt); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Chips (shared by nav, tiles, tags) ---------- */
.chip, .nav-links a, .nav-cta, .back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 8px 12px; border-radius: 100px;
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--hair);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover, .nav-links a:hover, .back-link:hover { border-color: var(--ink); }
.chip.is-dark, .nav-links a.is-active, .nav-cta { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-cta:hover { background: #000; }

/* ---------- Nav: chips left, name centre, contact right ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: var(--bg); }
.nav-in {
  max-width: var(--wrap-wide); margin: 0 auto; padding: 14px 24px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: var(--nav-h);
}
.nav-links { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.nav-logo {
  justify-self: center; text-align: center;
  font-family: var(--font-display); font-weight: 650; font-size: 15px; letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-cta { justify-self: end; }
.nav-toggle {
  display: none; justify-self: end;
  background: var(--surface-solid); border: 1px solid var(--hair); border-radius: 100px;
  padding: 9px 13px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text);
}
@media (max-width: 900px) {
  .nav-in { grid-template-columns: 1fr auto; }
  .nav-logo { justify-self: start; grid-column: 1; grid-row: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; grid-row: 1; }
  .nav-cta { display: none; }
  .nav-links {
    grid-column: 1 / -1; grid-row: 2;
    display: none; flex-direction: column; align-items: stretch; gap: 6px;
    padding: 6px 0 8px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { justify-content: flex-start; padding: 12px 14px; font-size: 14px; border-radius: 10px; }
}

/* ---------- Type utilities ---------- */
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--case); margin: 0 0 14px;
}
.eyebrow-muted { color: var(--muted); }
.h-display { font-size: clamp(32px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -0.024em; text-wrap: balance; font-weight: 600; }
.h1 { font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.026em; text-wrap: balance; }
.h2 { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -0.022em; text-wrap: balance; }
.h3 { font-size: clamp(19px, 2.2vw, 24px); letter-spacing: -0.016em; }
.h4 { font-size: 17.5px; letter-spacing: -0.012em; }
.lede { font-size: clamp(16px, 1.8vw, 19px); line-height: 1.5; color: var(--text-mid); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xsmall { font-size: 12.5px; }
.center { text-align: center; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: 0; }
.section-head { margin-bottom: 40px; }
.section-head .lede { max-width: 68ch; margin-top: 14px; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
  background: var(--case-soft); color: var(--case);
  white-space: nowrap;
}
.tag-plain { background: var(--surface-solid); color: var(--muted); border: 1px solid var(--hair); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  padding: 12px 20px; border-radius: 100px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: background var(--dur) var(--ease);
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: #000; }
.btn-ghost { background: var(--surface-solid); color: var(--text); border-color: var(--hair); }
.btn-ghost:hover { background: var(--surface-solid); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-size: 14px; font-weight: 600;
}
.link-arrow::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Case hero (interior pages) ---------- */
.case-hero { padding: 56px 0 0; }
.case-hero .wrap::after { content: ""; display: block; height: 1px; margin-top: 44px; background: var(--line); }
.case-hero h1 { margin: 18px 0 0; max-width: 22ch; }
.case-hero .lede { margin-top: 18px; max-width: 64ch; }
.case-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-brand .co { display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; margin-right: 6px; }

/* Meta strip */
.meta-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.meta-strip > div { background: var(--surface-solid); padding: 16px 18px; }
.meta-strip dt { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta-strip dd { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; }

/* ---------- Metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 22px 20px 22px 0; }
.metric + .metric { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.metric .num {
  font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-variant-numeric: tabular-nums; font-weight: 650;
  letter-spacing: -0.03em; line-height: 1; color: var(--text); display: block;
}
.metric .lbl { display: block; margin-top: 10px; font-size: 13.5px; line-height: 1.4; color: var(--text-mid); }
.metric .sub { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 18px 12px 18px 0; }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}

/* ---------- Prose ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin: 0 0 18px; }
.prose h3 { margin: 32px 0 12px; }
.prose h4 { margin: 28px 0 8px; }
.prose > *:first-child { margin-top: 0; }
.prose > p, .prose > ul, .prose > ol { max-width: 68ch; }
.prose ul li::marker, .prose ol li::marker { color: var(--case); }

/* Q&A */
.qa { border-left: 2px solid var(--case); padding-left: 20px; margin: 0 0 8px; max-width: 72ch; }
.qa-row { margin-bottom: 18px; }
.qa-row:last-child { margin-bottom: 0; }
.qa-q, .qa-a { display: flex; gap: 12px; margin-bottom: 7px; }
.qa-who { flex: 0 0 auto; width: 62px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.qa-q .qa-who { color: var(--case); }
.qa-txt { flex: 1 1 auto; font-size: 15.5px; line-height: 1.5; }
.qa-q .qa-txt { font-weight: 500; }
.qa-a .qa-txt { color: var(--text-mid); }

/* Callout */
.callout { border-radius: var(--radius); padding: 22px 24px; margin: 24px 0; background: var(--surface-solid); border: 1px solid var(--hair); border-left: 3px solid var(--case); }
.callout .eyebrow { margin-bottom: 8px; }
.callout p { font-size: 16px; }
.callout-neutral { border-left-color: var(--line); }
.callout-neutral .eyebrow { color: var(--muted); }

/* Pull quote */
.quote { margin: 28px 0; padding: 0 0 0 22px; border-left: 3px solid var(--case); max-width: 68ch; }
.quote p { font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 23px); font-weight: 500; line-height: 1.35; letter-spacing: -0.016em; margin-bottom: 12px; }
.quote cite { font-style: normal; font-size: 13.5px; color: var(--muted); }

/* Note */
.note { display: flex; gap: 12px; align-items: flex-start; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 22px 0; background: var(--surface-solid); }
.note .note-k { flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.note p { font-size: 14px; color: var(--text-mid); margin: 0; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; background: var(--surface-solid); border: 1px solid var(--hair); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
td strong { font-weight: 600; }
.t-num { font-family: var(--font-mono); font-size: 13.5px; white-space: nowrap; }
.t-win { background: var(--case-soft); }
.t-win td { font-weight: 500; }
caption { caption-side: bottom; text-align: left; padding: 12px 16px; font-size: 12.5px; color: var(--muted); }

/* ---------- Diagram frame ---------- */
.diagram { margin: 26px 0; border: 1px solid var(--hair); border-radius: var(--radius); background: var(--surface-solid); overflow: hidden; }
.diagram-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.diagram-head .eyebrow { margin-bottom: 6px; }
.diagram-head h3 { font-size: 18px; letter-spacing: -0.014em; }
.diagram-head p { font-size: 14px; color: var(--muted); margin: 8px 0 0; max-width: 70ch; }
.diagram-body { padding: 20px 22px 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram-body svg { display: block; margin: 0 auto; min-width: 620px; }
.diagram-note { padding: 0 22px 20px; font-size: 12.5px; color: var(--muted); }

/* SVG theming hooks (untouched by the redesign on purpose) */
.dg-bg { fill: var(--surface-solid); }
.dg-line { stroke: var(--line); }
.dg-node { fill: var(--surface-solid); stroke: var(--line); }
.dg-node-accent { fill: var(--case-soft); stroke: var(--case-line); }
.dg-node-solid { fill: var(--case); stroke: var(--case); }
.dg-t { fill: var(--text); font-family: var(--font-text); font-size: 12.5px; font-weight: 500; }
.dg-t-sm { fill: var(--muted); font-family: var(--font-text); font-size: 11px; font-weight: 400; }
.dg-t-hd { fill: var(--text); font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.dg-t-inv { fill: #fff; font-family: var(--font-text); font-size: 12.5px; font-weight: 600; }
.dg-t-acc { fill: var(--case); font-family: var(--font-text); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.dg-arrow { fill: var(--line); }

/* ---------- Step rail ---------- */
.rail { display: grid; gap: 0; margin: 24px 0; }
.rail-item { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding-bottom: 26px; position: relative; }
.rail-item::before { content: ""; position: absolute; left: 19px; top: 32px; bottom: 0; width: 1px; background: var(--line); }
.rail-item:last-child { padding-bottom: 0; }
.rail-item:last-child::before { display: none; }
.rail-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--line); font-family: var(--font-display); font-size: 13.5px; font-weight: 700; color: var(--case); position: relative; z-index: 1; }
.rail-item.is-leak .rail-n { background: var(--case); border-color: var(--case); color: #fff; }
.rail-b h4 { margin-bottom: 6px; }
.rail-b p { font-size: 15px; color: var(--text-mid); margin: 0; }
.rail-b .tag { margin-top: 10px; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: var(--surface-solid); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px 22px; }
.card h4 { margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-mid); margin: 0; }
.card .eyebrow { font-size: 11px; margin-bottom: 10px; }
.exp-card h4 { display: flex; align-items: center; font-size: 16px; }

/* Artifact links */
.artifacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 28px 0 0; }
.artifact { display: flex; align-items: center; gap: 12px; border: 1px solid var(--hair); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-solid); transition: border-color var(--dur) var(--ease); }
.artifact:hover { border-color: var(--ink); }
.artifact .a-ic { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--bg); font-size: 13px; }
.artifact .a-t { font-size: 14px; font-weight: 500; line-height: 1.25; }
.artifact .a-s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- TOC ---------- */
.toc { position: sticky; top: calc(var(--nav-h) + 20px); border-left: 1px solid var(--line); padding-left: 18px; }
.toc-t { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc a { display: block; font-size: 13.5px; color: var(--muted); padding: 5px 0; line-height: 1.35; position: relative; transition: color .2s var(--ease); }
.toc a::before { content: ""; position: absolute; left: -19px; top: 7px; bottom: 7px; width: 2px; background: var(--ink); opacity: 0; transition: opacity .2s var(--ease); }
.toc a:hover, .toc a.is-active { color: var(--text); }
.toc a.is-active { font-weight: 600; }
.toc a.is-active::before { opacity: 1; }
.case-layout { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 1080px) {
  .case-layout { grid-template-columns: 200px 1fr; align-items: start; }
  .case-layout .toc { order: -1; }
}
@media (max-width: 1079px) { .toc { display: none; } }
.case-layout .case-main { min-width: 0; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 40px; font-size: 13.5px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 28px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal { color: var(--muted); font-size: 12.5px; margin-top: 22px; line-height: 1.6; max-width: 86ch; }

/* ---------- Prev / next ---------- */
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.pager a { border: 1px solid var(--hair); border-radius: var(--radius); padding: 20px 22px; background: var(--surface-solid); transition: border-color var(--dur) var(--ease); }
.pager a:hover { border-color: var(--ink); }
.pager .dir { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pager .ttl { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.012em; margin-top: 8px; display: block; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Print ---------- */
@media print {
  .nav, .toc, .footer, .pager, .btn-row { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .diagram { break-inside: avoid; }
}

/* ==========================================================================
   Portfolio shell: one page, hash routed
   ========================================================================== */
.case-scope {
  --case: var(--c-l);
  --case-soft: color-mix(in srgb, var(--case) 9%, transparent);
  --case-line: color-mix(in srgb, var(--case) 30%, transparent);
}
.view { display: none; }
.view.is-on { display: block; }

/* Landing hero: one paragraph */
.home-hero { padding: 48px 0 28px; }
.home-hero .wrap { max-width: 1200px; }
.home-hero h1 { max-width: 22ch; }
.home-hero .lede { max-width: 60ch; margin-top: 14px; }

/* Back bar inside a case view */
.back-bar { padding: 20px 0 0; }
.back-link { padding: 8px 13px 8px 10px; color: var(--text-mid); }
.back-link::before { content: "\2190"; }

/* Logo marks: black square, white initial */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  margin-right: 9px; flex: 0 0 auto;
}

/* ==========================================================================
   Bento tiles
   ========================================================================== */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile-grid > .tile:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 520px; }
.tile {
  --case: var(--c-l);
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 1.15; min-height: 250px;
  border-radius: var(--radius); background: var(--case); color: #fff;
  box-shadow: var(--shadow-tile);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); }
.tile:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.tile-t {
  position: absolute; left: 20px; right: 20px; top: 18px; z-index: 2;
  font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; line-height: 1.25; letter-spacing: -0.016em;
  max-width: 24ch; text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.tile-grid > .tile:first-child .tile-t { font-size: clamp(20px, 2.4vw, 26px); max-width: 20ch; }
.tile-tags { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 5px; }
.tile-tags span {
  display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px;
  background: #fff; color: var(--text); font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.tile-tags .k { background: var(--ink); color: #fff; }

/* Art: a phone bleeding off the bottom right, or a white card for a chart */
.tile-art { position: absolute; z-index: 1; pointer-events: none; }
.tile-art img { display: block; width: 100%; height: auto; }
.tile-art-phone {
  right: 6%; bottom: -14%; width: 46%; max-width: 250px;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.30);
  transform: rotate(-4deg);
  transition: transform .45s var(--ease);
}
.tile:hover .tile-art-phone { transform: rotate(-3deg) translateY(-6px); }
.tile-grid > .tile:first-child .tile-art-phone { width: 58%; max-width: 340px; bottom: 2%; right: 8%; }
.tile-art-card {
  left: 12%; right: -8%; bottom: -10%;
  background: #fff; border-radius: 10px 10px 0 0; padding: 12px 12px 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transform: rotate(-2deg);
  transition: transform .45s var(--ease);
}
.tile:hover .tile-art-card { transform: rotate(-1.5deg) translateY(-6px); }
.tile-grid > .tile:first-child .tile-art-card { left: 6%; right: -12%; bottom: 8%; padding: 18px 18px 0; }
/* fade the art under the title so text stays readable */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--case) 70%, transparent) 0%, transparent 38%);
}
.tile .tile-art { z-index: 0; }
.tile .tile-t, .tile .tile-tags { z-index: 2; }

@media (max-width: 720px) {
  .tile-grid { grid-template-columns: 1fr; gap: 12px; }
  .tile-grid > .tile:first-child { grid-row: auto; aspect-ratio: 1.15; min-height: 0; }
  .tile { min-height: 0; }
  .tile-grid > .tile:first-child .tile-t { font-size: 20px; }
  .tile-t { font-size: 18px; }
  .tile-art-phone, .tile-grid > .tile:first-child .tile-art-phone { width: 40%; max-width: 160px; bottom: -32%; right: 6%; }
  .tile-art-card, .tile-grid > .tile:first-child .tile-art-card { left: 14%; right: -10%; bottom: -16%; padding: 10px 10px 0; }
}

/* Prototype button under the projects grid */
.btn-row.case-scope .btn { background: var(--ink); }

/* ==========================================================================
   About page
   ========================================================================== */
.hero-split { display: flex; align-items: center; gap: 44px; }
.hero-split-txt { flex: 1 1 auto; min-width: 0; }
.hero-photo-wrap { flex: 0 0 auto; }
.hero-photo { width: 200px; height: 200px; border-radius: var(--radius); object-fit: cover; filter: grayscale(1); }
@media (max-width: 720px) {
  .hero-split { flex-direction: column-reverse; align-items: flex-start; gap: 22px; }
  .hero-photo { width: 120px; height: 120px; }
}

/* How I work */
.work-lede { font-size: 16.5px; line-height: 1.5; color: var(--text-mid); max-width: 62ch; margin: 14px 0 0; }
.work-panel { margin-top: 24px; padding: 24px; background: var(--surface-solid); border: 1px solid var(--hair); border-radius: var(--radius); }
.work-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wf { position: relative; margin: 0; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); display: grid; grid-template-columns: 1fr; row-gap: 0; }
.wf-ic { width: 36px; height: 36px; border-radius: 10px; color: var(--case); background: var(--surface-solid); border: 1px solid var(--hair); display: grid; place-items: center; margin-bottom: 12px; }
.wf-ic svg { width: 20px; height: 20px; }
.wf-n { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.wf-t { font-family: var(--font-display); font-weight: 650; font-size: 15px; letter-spacing: -0.012em; line-height: 1.3; color: var(--text); padding-right: 28px; margin-bottom: 4px; text-wrap: balance; }
.wf-s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 720px) {
  .work-panel { padding: 16px; }
  .work-flow { grid-template-columns: 1fr; gap: 10px; }
  .wf { grid-template-columns: 36px 1fr; column-gap: 12px; }
  .wf-ic { grid-row: 1 / span 2; margin-bottom: 0; }
}

/* balance figure, flat */
.wb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px -4px 6px; padding: 0 4px; min-width: 0; }
.wb-svg { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; overflow: visible; }
.wb-user { --c: #1e56a0; }
.wb-biz  { --c: #16A34A; }
.wb-core { --c: #A67400; }
.wb-beam { fill: var(--ink); }
.wb-strut, .wb-string { stroke: var(--line); stroke-width: 1.5; fill: none; stroke-dasharray: 3 4; }
.wb-pivot { fill: var(--surface-solid); stroke: #A67400; stroke-width: 3; }
.wb-pill { fill: var(--surface-solid); stroke: var(--line); }
.wb-pill-t { fill: var(--text); font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.wb-pan { fill: var(--surface-solid); stroke: var(--line); stroke-width: 1; }
.wb-fulcrum { fill: color-mix(in srgb, var(--c) 12%, var(--surface-solid)); stroke: var(--c); stroke-width: 1.5; stroke-linejoin: round; }
.wb-hd { fill: var(--text); font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.wb-core .wb-hd { fill: var(--c); }
.wb-tag { fill: var(--bg); stroke: var(--line); }
.wb-tag-t { fill: var(--c); font-family: var(--font-text); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.wb-sub { fill: var(--muted); font-family: var(--font-text); font-size: 11.5px; }
@media (max-width: 720px) {
  .wb-scroll { margin: 18px -16px 6px; padding: 0 16px; }
  .wb-svg { min-width: 560px; }
}
.work-base-k { margin: 18px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.work-base { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wb-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 11px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg); border: 1px solid var(--hair); }
.wb-chip svg { width: 18px; height: 18px; color: var(--case); }

/* Scrollbar */
@media (min-width: 900px) {
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-thumb { background: rgba(28, 29, 33, 0.25); border-radius: 100px; border: 3px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-track { background: transparent; }
}
