/* Inline declarations avoid a render-blocking Google Fonts stylesheet. */
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/fragmentmono/v6/4iCr6K5wfMRRjxp0DA6-2CLnB4NHhg.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fragment Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/fragmentmono/v6/4iC16K5wfMRRjxp0DA6-2CLnB4Z3hK0M.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/instrumentserif/v5/jizBRFtNs2ka5fXjeivQ4LroWlx-6zUTjg.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/instrumentserif/v5/jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjjH7M.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #0b0c0f;
  --bg-raise: #111318;
  --ink: #eeece8;
  --dim: #9a9ca3;
  --faint: #7a7e88;
  --hair: #252932;
  --green: #a9cec8;
  --opal: #d4e7ea;
  --opal-soft: rgba(212, 231, 234, .12);
  --opal-line: rgba(220, 235, 240, .38);
  --opal-spectrum: linear-gradient(110deg, rgba(247, 240, 255, .88) 0%, rgba(190, 228, 234, .74) 34%, rgba(244, 216, 233, .76) 68%, rgba(205, 226, 248, .84) 100%);
  --opal-ink: #11151a;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
/* faint grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- parse-progress bar (scroll-driven) ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 10;
  background: var(--opal-spectrum);
  opacity: .82;
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: parse linear both;
    animation-timeline: scroll(root);
  }
  @keyframes parse { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- file chrome ---------- */
header.chrome {
  position: sticky; top: 0; z-index: 9;
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  align-items: baseline;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
  font-size: 12px; color: var(--dim);
  letter-spacing: .02em;
}
header.chrome .fname { color: var(--ink); }
header.chrome .spacer { flex: 1; }

/* ---------- document body ---------- */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) clamp(16px, 4vw, 48px) 0;
  counter-reset: ln;
}
.row {
  position: relative;
  padding-left: clamp(34px, 5vw, 58px);
  /* one shared measure: every text block wraps at ~72ch of the mono base */
  max-width: calc(72ch + clamp(34px, 5vw, 58px));
}
.row::before {
  counter-increment: ln;
  content: counter(ln, decimal-leading-zero);
  position: absolute; left: 0; top: .32em;
  font-size: 11px; color: var(--faint);
  user-select: none;
}
.punct { color: var(--faint); }
.key { color: var(--dim); }
.key .q, .val .q { color: var(--faint); }
.val { color: var(--green); }
a { color: inherit; }
.val a { color: var(--green); text-decoration-color: var(--faint); text-underline-offset: 4px; overflow-wrap: anywhere; }
.val a:hover { text-decoration-color: var(--green); }
a:focus-visible { outline: 2px solid var(--opal); outline-offset: 3px; border-radius: 2px; }
.indent-1 { margin-left: clamp(14px, 2.5vw, 28px); }
.indent-2 { margin-left: clamp(28px, 5vw, 56px); }
.gap { height: 2.1em; }
main > section { scroll-margin-top: 72px; }
.comment { color: var(--faint); font-style: italic; }
.comment a { color: var(--dim); }

/* big rendered values */
.name-value {
  font-family: var(--serif);
  font-size: clamp(52px, 10.5vw, 138px);
  line-height: .95;
  font-weight: 400;
  color: var(--ink);
  margin: .06em 0 .12em;
  letter-spacing: -.01em;
}
.name-value .accent { color: var(--opal); font-style: italic; }
.role-value {
  font-family: var(--serif);
  font-size: clamp(21px, 3.2vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  max-width: 21em;
  margin: .1em 0 .2em;
}
.summary-value {
  color: var(--ink);
  max-width: 62ch;
}

/* ---------- CTA ---------- */
.cta {
  display: inline-block;
  max-width: 100%;
  margin: .5em 0;
  padding: 14px 26px;
  background: var(--opal-spectrum);
  background-size: 240% 240%;
  background-position: 0% 50%;
  color: var(--opal-ink);
  font-family: var(--mono);
  font-size: 15px;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-radius: 3px;
  letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .15s ease;
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 0 0 0 transparent;
  will-change: background-position;
  animation: email-opal-flow 8s ease-in-out infinite alternate;
}
.cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 12px 34px -18px rgba(197, 226, 235, .62); }
.cta small { opacity: .75; }
@keyframes email-opal-flow {
  0% { background-position: 0% 50%; }
  52% { background-position: 100% 34%; }
  100% { background-position: 28% 72%; }
}

/* ---------- avatar brand roster ---------- */
.brands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 1em 0 .6em;
  max-width: 640px;
}
@media (max-width: 540px) {
  .brands { grid-template-columns: 1fr; }
}
.brand {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-raise);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 18px 18px 16px;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
a.brand:hover { border-color: var(--faint); transform: translateY(-3px); }
.brand .country { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.brand .bname {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  color: var(--ink);
  line-height: 1.1;
}
.brand .handle { font-size: 13px; color: var(--green); }
a.brand:hover .handle { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- narrative ---------- */
.offer .val { color: var(--ink); }
.offer + .offer { margin-top: .38em; }
.narr-value {
  margin: .4em 0 0;
  max-width: none; /* the serif measure is set on the paragraphs, not the row */
}
.narr-value p {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 .85em;
  /* em resolves against this paragraph's own serif size. 25em ≈ 700px at
     28px ≈ 74 characters per line — display type earns a slightly wider
     measure than the 72ch mono rows so the lines don't read as stubbed */
  max-width: 25em;
}
.narr-value p:last-child { margin-bottom: 0; }
/* the opal beside the name is an easter egg, not an affordance — the prose
   carries the discoverable path to SelectBNBs */
.narr-value a { text-decoration-color: var(--faint); text-underline-offset: 6px; }
.narr-value a:hover { color: var(--opal); text-decoration-color: var(--opal); }
#work .comment { margin: .55em 0 .8em; }
#work .brands + .row { margin-top: .2em; }

/* ---------- case study ---------- */
.case {
  background: var(--bg-raise);
  border: 1px solid var(--hair);
  border-left: 2px solid var(--green);
  border-radius: 6px;
  padding: clamp(18px, 3vw, 30px);
  margin: 1em 0;
  max-width: 74ch;
}
.case h2 {
  margin: 0 0 .35em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  color: var(--ink);
}
.case p { margin: .5em 0; color: var(--ink); max-width: 62ch; }
.case .muted { color: var(--dim); font-size: 13.5px; }
.endpoints { margin: 1em 0 .3em; padding: 0; list-style: none; font-size: 13.5px; }
.endpoints li { padding: 7px 0; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.endpoints code a { color: var(--green); text-decoration: none; border-bottom: 1px dotted var(--faint); }
.endpoints code a:hover { border-bottom-color: var(--green); }
.endpoints .what { color: var(--dim); }

/* ---------- footer / EOF ---------- */
footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 12vh;
}
.eof {
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 150px);
  color: var(--faint);
  line-height: 1;
}
.colophon { font-size: 11px; color: var(--faint); margin-top: .75em; max-width: 60ch; }
.colophon a { color: var(--dim); }

/* ---------- living opal ---------- */
.cursor {
  display: inline-block;
  position: relative;
  width: .68em; height: .68em;
  overflow: hidden;
  background:
    radial-gradient(circle at 27% 20%, rgba(255, 255, 255, .98) 0 4%, rgba(255, 255, 255, .56) 6%, transparent 22%),
    radial-gradient(circle at 68% 72%, transparent 24%, rgba(50, 59, 81, .08) 48%, rgba(39, 47, 68, .38) 86%, rgba(27, 32, 48, .55) 100%),
    var(--opal-spectrum);
  border-radius: 48% 52% 57% 43% / 53% 46% 54% 47%;
  box-shadow:
    inset 0 0 .035em rgba(255, 255, 255, .78),
    inset .06em .055em .11em rgba(255, 255, 255, .46),
    inset -.115em -.14em .2em rgba(31, 38, 57, .52),
    0 .085em .1em rgba(0, 0, 0, .48),
    0 .12em .28em rgba(194, 225, 232, .24);
  vertical-align: -.01em;
  margin-left: .1em;
  isolation: isolate;
  cursor: pointer;
  will-change: transform, border-radius;
  animation: opal-form 9s ease-in-out infinite;
}
.cursor::before,
.cursor::after {
  content: "";
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 44% 56% 63% 37% / 58% 42% 58% 42%;
  filter: blur(.055em);
  opacity: .8;
  will-change: transform, border-radius;
}
.cursor::before {
  left: -30%;
  top: 42%;
  background: rgba(244, 216, 233, .92);
  animation: lava-rise 7s ease-in-out infinite alternate;
}
.cursor::after {
  right: -28%;
  top: -32%;
  background: rgba(190, 228, 234, .9);
  mix-blend-mode: screen;
  animation: lava-fall 8.5s ease-in-out infinite alternate;
}
@keyframes opal-form {
  0%, 100% {
    transform: translate3d(0, .01em, 0) rotate(-2deg) scale(1);
    border-radius: 48% 52% 57% 43% / 53% 46% 54% 47%;
  }
  25% {
    transform: translate3d(.025em, -.035em, 0) rotate(4deg) scale(1.04, .96);
    border-radius: 57% 43% 49% 51% / 44% 58% 42% 56%;
  }
  50% {
    transform: translate3d(-.018em, -.01em, 0) rotate(-3deg) scale(.97, 1.04);
    border-radius: 43% 57% 54% 46% / 59% 42% 58% 41%;
  }
  75% {
    transform: translate3d(.012em, .025em, 0) rotate(3deg) scale(1.02, .98);
    border-radius: 53% 47% 42% 58% / 47% 56% 44% 53%;
  }
}
@keyframes lava-rise {
  0% {
    transform: translate3d(-4%, 12%, 0) scale(.82) rotate(0deg);
    border-radius: 44% 56% 63% 37% / 58% 42% 58% 42%;
  }
  55% {
    transform: translate3d(34%, -38%, 0) scale(1.08) rotate(115deg);
    border-radius: 61% 39% 42% 58% / 38% 62% 40% 60%;
  }
  100% {
    transform: translate3d(78%, -82%, 0) scale(.72) rotate(220deg);
    border-radius: 37% 63% 58% 42% / 63% 40% 60% 37%;
  }
}
@keyframes lava-fall {
  0% {
    transform: translate3d(4%, -4%, 0) scale(.76) rotate(0deg);
    border-radius: 56% 44% 38% 62% / 42% 61% 39% 58%;
  }
  48% {
    transform: translate3d(-38%, 42%, 0) scale(1.12) rotate(-105deg);
    border-radius: 39% 61% 57% 43% / 62% 38% 59% 41%;
  }
  100% {
    transform: translate3d(-74%, 84%, 0) scale(.8) rotate(-210deg);
    border-radius: 64% 36% 43% 57% / 37% 58% 42% 63%;
  }
}

/* ---------- compact document: a deliberate mobile composition ---------- */
@media (max-width: 700px) {
  body {
    font-size: 14px;
    line-height: 1.65;
  }
  header.chrome {
    position: relative;
    padding: 11px 16px 12px;
    gap: 2px 10px;
    font-size: 10px;
    line-height: 1.5;
  }
  header.chrome .spacer { display: none; }
  main {
    width: 100%;
    padding: 26px 18px 0;
    overflow: hidden;
  }
  .row { padding-left: 0; }
  .row::before { display: none; }
  .indent-1,
  .indent-2 { margin-left: 0; }
  section + .gap,
  .gap { height: 1.7em; }
  .name-value {
    font-size: clamp(48px, 15.5vw, 64px);
    line-height: .9;
    margin: .12em 0 .28em;
    overflow-wrap: normal;
  }
  .narr-value {
    max-width: none;
    margin-top: .65em;
  }
  .narr-value p {
    font-size: clamp(21px, 6.3vw, 25px);
    line-height: 1.36;
  }
  .brands { gap: 10px; max-width: none; }
  .brand { padding: 16px; }
  .case {
    margin: 1em 0;
    padding: 19px 17px;
    border-left-width: 1px;
  }
  .endpoints li {
    display: block;
    padding: 10px 0;
  }
  .endpoints code,
  .endpoints .what { display: block; }
  .endpoints .what { margin-top: 4px; line-height: 1.5; }
  .role-value { font-size: 27px; max-width: none; }
  .summary-value { max-width: none; }
  .cta {
    display: block;
    width: 100%;
    padding: 14px 16px;
    text-align: center;
    font-size: 13px;
  }
  footer { padding: 0 18px 72px; }
  .eof { font-size: 30vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress { animation: none !important; transform: none !important; }
  .cursor, .cursor::before, .cursor::after { animation: none; }
  .cta { animation: none; background-position: 50% 50%; }
  .cta, .brand { transition: none; }
  .cta:hover, .brand:hover { transform: none; }
}

/* Published work and the public evidence page share the profile's typography. */
.page-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.page-nav a { text-decoration: none; text-underline-offset: 4px; }
.page-nav a:hover, .page-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.intro-copy { max-width: 62ch; color: var(--dim); margin: 1.2em 0; }
.intro-copy a, .text-link { color: var(--green); text-underline-offset: 4px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; margin: 1.2em 0; }
.profile-links a { color: var(--green); text-underline-offset: 4px; }
.section-heading { margin: .2em 0 .35em; font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); line-height: 1.1; font-weight: 400; }
.section-lead { color: var(--dim); max-width: 62ch; margin: .6em 0 1.5em; }
.row.showcase { max-width: none; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { min-width: 0; border: 1px solid var(--hair); background: var(--bg-raise); border-radius: 6px; overflow: hidden; }
.project-heading { padding: 20px 20px 16px; min-height: 222px; }
.project-heading h3 { font: 400 32px/1.15 var(--serif); margin: .25em 0; }
.project-heading p { margin: .5em 0 0; color: var(--dim); font-size: 13px; }
.eyebrow { color: var(--green); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.reel-frame { display: block; width: 100%; border: 0; background: #fff; height: 760px; }
.project-detail { padding: 18px 20px 22px; font-size: 13px; }
.project-detail p { margin: 0 0 .8em; color: var(--dim); }
.project-detail a { color: var(--green); text-underline-offset: 4px; }
.project-detail .result { color: var(--ink); }
.project-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.more-work { margin: 1.4em 0 0; font-size: 13px; }
.steps { padding-left: 22px; max-width: 64ch; color: var(--dim); }
.steps li { padding: .5em 0 .5em 6px; }
.steps strong { color: var(--ink); font-weight: 400; }
.work-title { font: 400 clamp(56px, 9vw, 100px)/1 var(--serif); margin: .2em 0 .35em; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 1.4em 0; }
.metric { min-width: 0; padding: 20px; border: 1px solid var(--hair); border-radius: 6px; background: var(--bg-raise); }
.metric strong { display: block; font: 400 clamp(28px, 4vw, 42px)/1.2 var(--serif); overflow-wrap: anywhere; }
.metric span { display: block; margin-top: .6em; color: var(--dim); font-size: 12px; }
.evidence-note { color: var(--dim); font-size: 12px; max-width: 76ch; }
.evidence-note a { color: var(--green); text-underline-offset: 4px; }
.work-table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 1.5em 0; }
.work-table th, .work-table td { text-align: left; vertical-align: top; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--hair); }
.work-table th { color: var(--dim); font-weight: 400; }
.work-table a { color: var(--green); text-underline-offset: 4px; }
.work-table small { display: block; color: var(--dim); margin-top: 6px; }
.table-wrap { overflow-x: auto; }
@media (max-width: 800px) {
  .work-grid { grid-template-columns: 1fr; }
  .project-heading { min-height: 0; }
  .reel-frame { height: 760px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { padding: 18px; }
  .metric strong { font-size: 38px; }
}
@media (max-width: 700px) {
  .page-nav { margin-left: auto; gap: 12px; }
  .intro-copy { font-size: 14px; }
  .section-heading { font-size: 36px; }
  .project-heading, .project-detail { padding-left: 16px; padding-right: 16px; }
  .profile-links { gap: 8px 18px; }
  .reel-frame { height: 720px; }
}
@media (max-width: 360px) { .reel-frame { height: 670px; } }
