@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans-400.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans-500.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-400.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f1e7d2;
  --paper-light: #faf4e6;
  --carbon: #252820;
  --red: #923e2b;
  --forest: #3e4b44;
  --career-ink: #33423b;
  --ink-glaze: rgb(35 49 41 / 78%);
  --ink-texture: linear-gradient(var(--ink-glaze), var(--ink-glaze)), url("assets/illustrations/olive-ink.png");
  --forest-wash: #b3bcb3;
  --quiet: #4b5850;
  --rule: #b4b8aa;
  --sans: "Instrument Sans", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --gutter: 48px;
  --rail: 196px;
  --gap: 64px;
}

* { box-sizing: border-box; }
body { position: relative; isolation: isolate; margin: 0; background: var(--paper); color: var(--carbon); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
/* One quiet material layer brings the illustration's paper into every page. */
body::before { content: ""; position: absolute; z-index: -1; inset: 0; background: url("assets/illustrations/paper-grain.png") repeat; background-size: 768px 512px; mix-blend-mode: multiply; opacity: .28; pointer-events: none; }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
/* Shared dry ink coverage, imperfect edges, and a faint bleed for every title. */
h1, h2, h3 { font-weight: 400; filter: url("#ink-on-paper"); mix-blend-mode: multiply; }
.ink-effects { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule); transition: color 120ms ease-out, text-decoration-color 120ms ease-out; }
a:hover { color: var(--red); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
main:focus { outline: none; }
::selection { background: var(--carbon); color: var(--paper); }
.shell { width: min(100%, 1376px); margin-inline: auto; padding-inline: var(--gutter); }
.layout-row { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--gap); }
.content { min-width: 0; }
.dark-surface { background: var(--forest); color: var(--paper-light); }
.dark-surface :is(h1, h2, h3) { mix-blend-mode: normal; }
.dark-surface ::selection { background: var(--paper); color: var(--carbon); }
.accent-mark { color: inherit; }
.hero-name .accent-mark { color: var(--red); }
.eyebrow { font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.skip-link { position: absolute; z-index: 2; left: var(--gutter); top: 16px; padding: 12px 16px; transform: translateY(-180%); background: var(--carbon); color: var(--paper); }
.skip-link:focus { transform: translateY(0); }
.skip-link:hover { color: var(--paper); }

/* One shared header, with ordinary page navigation. */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; }
.site-identity { display: inline-flex; align-items: center; gap: 10px; min-width: 44px; min-height: 44px; color: inherit; font: 500 14px/1.25 var(--sans); text-decoration: none; }
.site-mark { display: block; flex: none; width: 24px; height: 24px; background: currentColor; -webkit-mask: url("assets/forest-sprig.svg") center / contain no-repeat; mask: url("assets/forest-sprig.svg") center / contain no-repeat; }
.site-name { white-space: nowrap; }
.page-navigation { display: flex; gap: 8px; }
.page-navigation a { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; min-height: 44px; color: var(--quiet); text-decoration: none; }
.page-navigation a[aria-current="page"] { color: var(--carbon); }
.page-navigation a::after { content: ""; position: absolute; bottom: 5px; left: 16px; right: 16px; height: 2px; background: currentColor; opacity: 0; clip-path: polygon(0 30%, 18% 15%, 62% 0, 100% 20%, 98% 75%, 46% 100%, 2% 85%); transform: rotate(-2deg); }
.page-navigation a:is([aria-current="page"], :hover, :focus-visible)::after { opacity: .8; }
.site-header a:hover { color: var(--red); }
.site-identity:hover .site-name { text-decoration: underline; text-underline-offset: 4px; }
.site-header a:focus-visible { outline-offset: 2px; }

/* The About text follows the shared left edge, with comfortable reading widths. */
.home-introduction { padding-block: 64px 80px; }
.hero-name { margin-bottom: 32px; font-family: var(--serif); font-size: clamp(64px, 7.2vw, 88px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy { min-width: 0; }
.hero-introduction { max-width: 36ch; font-family: var(--serif); font-size: 30px; line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty; }
.hero-biography { max-width: 54ch; margin-top: 24px; font-family: var(--serif); font-size: 21px; line-height: 1.5; }
.hero-biography p + p { margin-top: 16px; }
.hero-conversation { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 24px; color: var(--forest); }

/* The career has a different pace: recent work leads, earlier roles tighten. */
/* Luminosity carries the grain; a forest glaze keeps the material dark and muted. */
.career-section { position: relative; padding-block: 80px; background-color: var(--career-ink); background-image: var(--ink-texture); background-size: 768px 512px; background-blend-mode: normal, luminosity; }
.career-section::before, .career-section::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; height: 20px; background-color: var(--career-ink); background-image: var(--ink-texture); background-size: 768px 512px; background-blend-mode: normal, luminosity; }
.career-section::before { top: -10px; clip-path: polygon(0 40%, 17% 28%, 38% 42%, 64% 12%, 83% 30%, 100% 15%, 100% 100%, 0 100%); }
.career-section::after { bottom: -10px; clip-path: polygon(0 0, 100% 0, 100% 65%, 81% 83%, 53% 55%, 29% 76%, 0 58%); }
.career-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 64px; }
.career-heading .eyebrow { margin-bottom: 24px; color: var(--paper); }
.career-heading h2 { font-family: var(--serif); font-size: 84px; line-height: .95; letter-spacing: -.05em; }
.career-heading .accent-mark { color: inherit; }
.career-introduction { max-width: 24ch; margin-top: 24px; color: var(--paper); font-family: var(--serif); font-size: 22px; line-height: 1.4; }
.career-entry { --entry-top: 28px; --entry-bottom: 32px; --logo-row-height: 48px; --year-size: 13px; --year-height: calc(var(--year-size) * 1.5); --period-offset: calc((var(--logo-row-height) - var(--year-height)) / 2); --tick-center: calc(var(--entry-top) + var(--period-offset) + var(--year-height) / 2); position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 32px; padding-block: var(--entry-top) var(--entry-bottom); padding-left: 28px; }
.career-entry::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid #839488; }
.career-entry:first-child { --entry-top: 24px; }
.career-entry:first-child::after { top: var(--tick-center); }
.career-entry:last-child { --entry-bottom: 0px; }
.career-entry:last-child::after { bottom: auto; height: var(--tick-center); }
/* Each tick follows its year line rather than an offset from the company row. */
.period { position: relative; align-self: start; margin-top: var(--period-offset); color: var(--paper); font-size: var(--year-size); line-height: var(--year-height); }
.period::before { content: ""; position: absolute; left: -28px; top: 50%; width: 11px; height: 1px; background: var(--paper); transform: translateY(-50%); }
.career-name { display: flex; align-items: center; min-height: var(--logo-row-height); font-family: var(--serif); font-size: 32px; line-height: 1.2; letter-spacing: -.03em; }
.career-logo { display: block; flex: none; max-width: 100%; height: auto; filter: brightness(0) invert(1); }
.logo-shopify { width: 144px; }
.logo-dazn { width: 44px; }
.logo-travix { width: 108px; }
.logo-vtex { width: 124px; }
.career-entry-olx { --logo-row-height: 50px; }
.career-name-pair { gap: 20px; height: var(--logo-row-height); }
/* The white SVG has a transparent background, without Safari blend compositing. */
.logo-olx { width: 96px; height: 50px; object-fit: cover; filter: none; }
/* Show the Storia half of the supplied lockup, omitting its duplicate OLX badge. */
.storia-logo-window { position: relative; flex: none; width: calc(var(--logo-row-height) * 118 / 84); height: var(--logo-row-height); overflow: hidden; }
.logo-storia { position: absolute; width: calc(var(--logo-row-height) * 196 / 84); max-width: none; left: calc(var(--logo-row-height) * -78 / 84); top: calc(var(--logo-row-height) * -33 / 84); filter: grayscale(1) invert(1) brightness(3); mix-blend-mode: screen; }
.career-role { margin-top: 12px; color: var(--paper); }
.career-contribution { max-width: 60ch; margin-top: 16px; font-family: var(--serif); font-size: 21px; line-height: 1.5; }
.career-contribution + .career-contribution { margin-top: 12px; }
.career-profile-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 24px; color: var(--paper-light); text-decoration-color: #9da99f; }
.career-profile-link:hover { color: var(--paper-light); text-decoration-color: currentColor; }
.career-entry-recent { --entry-top: 32px; --entry-bottom: 40px; }
.career-entry-recent .career-name { font-size: 44px; }
.career-entry-compact { --compact-mark-width: 144px; --entry-top: 16px; --entry-bottom: 16px; --logo-row-height: calc(var(--compact-mark-width) * 113 / 284); }
.career-entry-compact .career-details { display: grid; grid-template-columns: var(--compact-mark-width) minmax(0, 1fr); align-items: center; gap: 24px; }
.career-entry-compact .career-logo { width: var(--compact-mark-width); }
/* Trim the PNG's transparent edge so its visible mark follows the shared width. */
.peixe-logo-window { position: relative; display: block; flex: none; width: var(--compact-mark-width); height: var(--logo-row-height); overflow: hidden; }
.career-entry-compact .logo-peixe { position: absolute; width: calc(var(--compact-mark-width) * 300 / 284); max-width: none; left: calc(var(--compact-mark-width) * -8 / 284); top: calc(var(--compact-mark-width) * -8 / 284); }
.career-wordmark { display: block; width: var(--compact-mark-width); height: auto; fill: currentColor; font-family: var(--serif); font-size: 23px; letter-spacing: 0; }
.career-entry-compact .career-role { margin-top: 0; }

/* Home offers a selection; Writing remains its own page. */
.featured-writing { padding-block: 80px 96px; }
.featured-writing-header { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.featured-writing-header .eyebrow { margin-bottom: 16px; color: var(--quiet); }
.featured-writing-header h2 { font-family: var(--serif); font-size: 56px; line-height: 1.1; letter-spacing: -.04em; }

/* Illustrations connect the previews and their individual reading pages. */
.blog-main { padding-block: 64px 96px; }
.blog-heading { padding-bottom: 48px; }
.blog-heading .eyebrow { margin-bottom: 24px; color: var(--quiet); }
.blog-title { font-family: var(--serif); font-size: clamp(72px, 10.2vw, 136px); line-height: 1; letter-spacing: -.06em; }
.blog-intro { max-width: 42ch; margin-top: 24px; font-size: 23px; line-height: 1.5; letter-spacing: -.025em; }
.article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.article-entry { min-width: 0; }
.post-link { display: block; text-decoration: none; }
.article-artwork { overflow: hidden; background: var(--paper); }
.article-artwork img { display: block; width: 100%; height: auto; }
.article-content { min-width: 0; padding-top: 24px; }
.post-title { max-width: 27ch; font-family: var(--serif); font-size: 35px; line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.post-summary { max-width: 53ch; margin-top: 16px; font-family: var(--serif); font-size: 21px; line-height: 1.5; }
.read-cue { display: inline-block; margin-top: 24px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px; }
.post-link:hover .read-cue { text-decoration-color: currentColor; }

/* A shared reading layout for individual articles. */
.article-shell { padding-block: 64px 80px; }
.article-heading .content, .article-reading .content { max-width: 720px; }
.article-title { padding-bottom: 24px; border-bottom: 1px solid var(--forest); font-family: var(--serif); font-size: 60px; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.article-deck { margin-top: 24px; color: var(--quiet); font-family: var(--serif); font-size: 24px; line-height: 1.4; }
.article-illustration { margin-top: 40px; }
.article-illustration .content { max-width: 720px; }
.article-illustration img { display: block; width: 100%; height: auto; }
.article-reading { margin-top: 40px; }
.reading-body { font-family: var(--serif); font-size: 22px; line-height: 1.6; }
.reading-body p + p { margin-top: 24px; }
.reading-body h2 { margin-block: 40px 16px; color: var(--forest); font-family: var(--sans); font-size: 25px; line-height: 1.25; letter-spacing: -.025em; }
.open-question { margin-top: 40px; padding: 12px 0 12px 28px; border-left: 3px solid var(--red); color: var(--forest); font-size: 27px; line-height: 1.4; font-style: italic; }
.article-footer { padding-left: calc(var(--gutter) + var(--rail) + var(--gap)); padding-bottom: 64px; }
.article-footer a { display: inline-flex; align-items: center; min-height: 44px; }

.site-footer { border-top: 1px solid var(--forest); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 32px; }
.footer-inner > p { color: var(--quiet); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }

@media (max-width: 1023px) {
  :root { --gap: 40px; --rail: 140px; }
  .career-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .career-heading h2 { font-size: 64px; }
  .career-heading h2 br { display: none; }
  .career-introduction { max-width: none; }
  .article-list { gap: 32px; }
  .post-title { font-size: 32px; }
  .article-title { font-size: 54px; }
}

@media (max-width: 767px) {
  :root { --gutter: 24px; --gap: 24px; }
  .header-inner { min-height: 52px; gap: 12px; }
  .page-navigation { gap: 0; }
  .page-navigation a { padding-inline: 12px; }
  .page-navigation a::after { left: 12px; right: 12px; }
  .home-introduction { padding-block: 40px 56px; }
  .hero-name { font-size: 56px; margin-bottom: 28px; }
  .hero-introduction { font-size: 26px; }
  .career-section { padding-block: 48px; }
  .career-layout { gap: 32px; }
  .career-heading .eyebrow { margin-bottom: 16px; }
  .career-heading h2 { font-size: 60px; }
  .career-introduction { margin-top: 16px; font-size: 21px; max-width: 30ch; }
  .career-entry { --entry-top: 24px; --entry-bottom: 24px; --period-offset: 0px; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .career-name { font-size: 30px; }
  .career-entry-recent .career-name { font-size: 36px; }
  .career-contribution { font-size: 20px; }
  .career-entry-compact { --compact-mark-width: 116px; --entry-top: 16px; --entry-bottom: 16px; gap: 8px; }
  .career-entry-compact .career-details { gap: 20px; }
  .featured-writing { padding-block: 48px 64px; }
  .featured-writing-header { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .featured-writing-header h2 { font-size: 42px; }
  .blog-main { padding-block: 40px 64px; }
  .blog-heading { padding-bottom: 32px; }
  .blog-title { font-size: 76px; }
  .blog-intro { font-size: 22px; }
  .article-list { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .article-content { padding-top: 20px; }
  .post-title { font-size: 32px; }
  .post-summary { font-size: 21px; margin-top: 16px; }
  .read-cue { margin-top: 20px; }
  .layout-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .article-shell { padding-block: 40px 48px; }
  .article-heading > .context { display: none; }
  .article-title { font-size: 40px; padding-bottom: 20px; }
  .article-deck { font-size: 22px; margin-top: 20px; }
  .article-illustration { display: block; margin-top: 32px; }
  .article-illustration > .context { display: none; }
  .article-reading { display: block; margin-top: 32px; }
  .article-reading > .context { display: none; }
  .reading-body { font-size: 21px; }
  .reading-body h2 { font-size: 24px; margin-top: 32px; }
  .open-question { padding: 8px 0 8px 20px; font-size: 25px; }
  .article-footer { padding-left: var(--gutter); padding-bottom: 48px; }
  .footer-inner { align-items: start; flex-direction: column; gap: 16px; padding-block: 24px; }
  .footer-inner nav { gap: 20px; }
}

@media (max-width: 359px) {
  .header-inner { gap: 8px; }
  .page-navigation a { padding-inline: 9px; font-size: 13px; }
  .page-navigation a::after { left: 9px; right: 9px; }
  .career-heading h2 { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

@media (forced-colors: active) {
  body::before { display: none; }
  h1, h2, h3 { filter: none; mix-blend-mode: normal; }
}
