@font-face {
  font-family: Inter;
  src: url('/portfolio-assets/inter-var-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f8f8f3;
  --surface: #edeee7;
  --ink: #191d18;
  --muted: #555b51;
  --accent: #3d5633;
  --button: #273b21;
  --button-text: #f5faef;
  --rule: #d1d5ca;
  --gutter: clamp(1.2rem, 5vw, 4.5rem);
  --width: 78rem;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #101110;
    --surface: #1c1d1b;
    --ink: #f1f0e9;
    --muted: #a5a89e;
    --accent: #c7d6b5;
    --button: #c7d6b5;
    --button-text: #141a12;
    --rule: #363b34;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #101110;
  --surface: #1c1d1b;
  --ink: #f1f0e9;
  --muted: #a5a89e;
  --accent: #c7d6b5;
  --button: #c7d6b5;
  --button-text: #141a12;
  --rule: #363b34;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.62 Inter, system-ui, sans-serif; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.1; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.05em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.032em; }
p + p { margin-top: .85rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--width)); margin-inline: auto; }
.skip { position: absolute; z-index: 4; padding: .8rem; background: var(--canvas); top: 1rem; left: 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.75rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 650; letter-spacing: -.035em; }
.brand-mark { width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 5px; flex: none; }
.site-nav { display: flex; align-items: center; gap: clamp(.35rem, 2.2vw, 1.8rem); }
.site-nav a, .theme { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a { font-size: .88rem; text-decoration: none; color: var(--muted); }
.site-nav a[aria-current], .site-nav a:hover { color: var(--ink); text-decoration: underline; }
.theme { justify-content: center; min-width: 44px; border: 1px solid var(--rule); color: var(--accent); background: transparent; cursor: pointer; }
.theme[hidden] { display: none; }
.hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(13rem, 1fr); gap: clamp(2rem, 6vw, 7rem); align-items: end; padding-block: clamp(4.3rem, 9vw, 9rem) clamp(3.5rem, 7vw, 6.3rem); }
.eyebrow { color: var(--accent); font: 500 .82rem/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.hero h1, .page-head h1 { font-size: clamp(2.75rem, 5.85vw, 5.75rem); letter-spacing: -.082em; line-height: 1.03; margin: 1.1rem 0 1.6rem; }
.hero h1 { font-size: clamp(2.7rem, 4.92vw, 5.05rem); letter-spacing: -.071em; text-wrap: initial; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--accent); }
.lede { max-width: 42rem; font-size: clamp(1.07rem, 1.7vw, 1.34rem); color: var(--muted); }
.actions, .links { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; }
.actions { margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .62rem 1.15rem; border: 1px solid var(--rule); text-decoration: none; font-size: .9rem; font-weight: 600; }
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
.button.primary:hover { text-decoration: underline; text-underline-offset: .26em; }
.hero-aside { padding: 0 0 .1rem; }
.hero-aside dl { margin: 0; }
.hero-aside dl div { border-top: 1px solid var(--rule); padding: .9rem 0; }
.hero-aside dt { font: .8rem/1.3 var(--mono); color: var(--muted); }
.hero-aside dd { margin: .25rem 0 0; font-weight: 550; }
.hero-aside .links { border-top: 1px solid var(--rule); padding-top: .6rem; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .91rem; }
.section { border-top: 1px solid var(--rule); padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .7rem 1.5rem; margin-bottom: 1.8rem; }
.section-heading a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; color: var(--accent); }
.section-heading + .lede { margin: -1rem 0 1.4rem; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-item { padding: 1.35rem 1.4rem 1.35rem 0; border-top: 1px solid var(--rule); }
.work-item + .work-item { padding-left: 1.4rem; border-left: 1px solid var(--rule); }
.work-item h3 { margin: .65rem 0; }
.muted, .work-item > p:last-child { color: var(--muted); }
.product-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); background: var(--surface); border: 1px solid var(--rule); }
.product-feature[hidden], .carousel-controls[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .product-carousel[data-slide-direction] { --slide-offset: .75rem; }
  .product-carousel[data-slide-direction='backward'] { --slide-offset: -.75rem; }
  .product-carousel[data-slide-direction] .product-feature:not([hidden]) > * {
    animation: product-slide-in 360ms cubic-bezier(.22, 1, .36, 1) both;
  }
  @keyframes product-slide-in {
    from { opacity: 0; transform: translateX(var(--slide-offset)); }
    to { opacity: 1; transform: translateX(0); }
  }
}

.carousel-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-block: 0 .75rem; }
.carousel-controls button { color: var(--ink); background: transparent; cursor: pointer; }
.carousel-position { margin-inline-start: auto; color: var(--muted); font: .82rem var(--mono); }

.product-copy { padding: clamp(1.25rem, 4vw, 3.5rem); align-self: center; }
.product-copy h3 { font-size: clamp(2.1rem, 5vw, 4rem); margin: .65rem 0; }
.product-visual { display: flex; align-items: start; justify-content: center; gap: clamp(.7rem, 2vw, 1.5rem); overflow: hidden; height: clamp(17rem, 29vw, 27rem); padding: 2.5rem 1.2rem 0; border-left: 1px solid var(--rule); }
.product-visual img { width: min(40%, 12rem); border: 1px solid #545c4f; border-radius: 14px; }
.product-visual img + img { margin-top: 2.35rem; }
.rows { list-style: none; padding: 0; margin: 0; }
.row { border-top: 1px solid var(--rule); }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row > a, .row > div { display: grid; grid-template-columns: minmax(9rem, .8fr) minmax(0, 1.5fr) auto; align-items: center; gap: .35rem 1rem; padding: 1.05rem 0; text-decoration: none; }
.row a:hover .row-title { text-decoration: underline; }
.row-title { font-weight: 620; letter-spacing: -.02em; }
.row-title a { text-decoration: none; }
.row-title a:hover { text-decoration: underline; }
.row .links { justify-content: flex-end; }
.row-meta { color: var(--muted); font-size: .83rem; }
.status { color: var(--accent); font: .77rem/1.4 var(--mono); }
.page-head { padding-block: clamp(3.4rem, 8vw, 7rem) clamp(2rem, 5vw, 4rem); }
.page-head h1 { max-width: 65rem; }
.prose { max-width: 47rem; padding-bottom: 4rem; }
.prose h2, .prose h3, .prose h4 { margin-block: 2rem .75rem; }
.prose img { margin-block: 1rem; }
.prose ul { padding-left: 1.35rem; }
.prose pre { border: 1px solid var(--rule); background: #1c211a; color: #f1f0e9; overflow: auto; padding: 1rem; }
.prose code { font-family: var(--mono); overflow-wrap: anywhere; }
.prose pre code { overflow-wrap: normal; }
.hljs-string, .hljs-number, .hljs-literal { color: #d3e7a8; }
.hljs-attr, .hljs-keyword, .hljs-built_in { color: #a9d7ff; }
.hljs-comment { color: #b2bda9; }
.gallery { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.gallery img { width: min(40%, 15rem); margin: 0; border: 1px solid var(--rule); border-radius: .65rem; }
.byline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1rem; color: var(--muted); font-size: .92rem; }
.toc { border-left: 1px solid var(--rule); padding-left: 1.2rem; margin-bottom: 2rem; }
.toc ul { margin-block: .25rem; }
.toc .subheading { margin-left: 1.25rem; }
.footer { border-top: 1px solid var(--rule); }
.footer-inner { padding-block: 2rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: center; }
.footer p { font-size: .875rem; color: var(--muted); }
.contact-email { font-size: clamp(1rem, 3vw, 1.4rem); overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 2.35rem; }
  .hero-aside dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 620px) {
  .header-inner { flex-wrap: wrap; gap: .25rem; padding-top: .8rem; }
  .site-nav { width: 100%; justify-content: space-between; }
  .site-nav a { font-size: .84rem; }
  .hero { padding-top: 3.65rem; }
  .hero h1 { font-size: clamp(2.15rem, 8.7vw, 3.7rem); }
  .hero h1 span { text-wrap: balance; }
  .work-grid, .product-feature { grid-template-columns: 1fr; }
  .work-item + .work-item { padding-left: 0; border-left: 0; }
  .product-visual { border-left: 0; border-top: 1px solid var(--rule); }
  .row > a, .row > div { grid-template-columns: minmax(0, 1fr) auto; }
  .row .muted { grid-row: 2; grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .site-nav a { transition: color .15s ease, border-color .15s ease; }
}
