@font-face {
  font-family: "Recursive";
  font-style: normal;
  font-weight: 300 1000;
  font-display: swap;
  src: url("assets/fonts/recursive-latin.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: "Recursive Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
  size-adjust: 115.36%;
  ascent-override: 82.35%;
  descent-override: 21.67%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Recursive Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"), local("Cousine");
  size-adjust: 99.98%;
  ascent-override: 95.02%;
  descent-override: 25%;
  line-gap-override: 0%;
}
:root {
  color-scheme: light;
  --canvas: #ecc7b3;
  --ink: #201d1d;
  --body: #424245;
  --hairline: rgba(15, 0, 0, 0.12);
  --hairline-strong: #646262;
  --surface-card: color-mix(in srgb, var(--ink) 8%, var(--canvas));
  --accent: #450209;
  --label-accent: #e58763;
  --board-face: #e58763;
  --board-back: oklch(0.3 0.001 85);
  --board-plate: oklch(0.27 0.001 85);
}

:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: oklch(0.23 0.004 85);
  --ink: oklch(0.916 0.013 87);
  --body: oklch(0.708 0.025 93);
  --hairline: oklch(0.32 0.007 68);
  --hairline-strong: oklch(0.54 0.014 76);
  --accent: #a27e87;
  --label-accent: #6f4d56;
  --board-face: var(--accent);
  --board-back: oklch(0.169 0.002 286);
  --board-plate: oklch(0.155 0.002 286);
}

.portrait {
  position: relative;
  isolation: isolate;
  pointer-events: none;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 32px;
  transform: rotate(-90deg);
}

.portrait-print {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

@media (scripting: none) {
  .portrait-print {
    display: block;
  }
}
.portrait.is-static .portrait-print {
  display: block;
}
.portrait.is-static canvas {
  visibility: hidden;
}

.portrait-xray-mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  clip-path: polygon(1.95% 0%, 100% 0%, 100% 99.27%, 58.59% 99.27%, 48.83% 99.07%, 39.06% 98.12%, 29.3% 96.12%, 19.53% 92.8%, 14.65% 90.59%, 9.77% 87.97%, 4.88% 84.93%, 1.95% 82.89%);
}

.portrait.is-xray-ripple-active .portrait-xray-mask {
  opacity: 1;
}

.portrait-xray,
.portrait-xray-ground {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate(-3.9%, 6%) perspective(900px) rotateX(11deg) rotateY(4.4deg) rotate(0.2deg) skew(0.8deg, 2.6deg) scale(1.188) scaleX(0.856) scaleY(1.037);
}

.portrait-xray-ground {
  background: var(--canvas);
  mask-image: url("assets/portrait/xray.webp"), url("assets/portrait/xray.webp"), url("assets/portrait/xray.webp"), url("assets/portrait/xray.webp");
  mask-position: center;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.portrait-xray {
  object-fit: contain;
  user-select: none;
}

:root[data-theme=light] .portrait-xray {
  mix-blend-mode: color-dodge;
}

.face,
.refl,
.lens-sheen,
.bfly-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bfly-gpu {
  position: absolute;
  left: -7.3%;
  top: 28.3%;
  width: 40%;
  height: 40%;
  pointer-events: none;
  transform-origin: 100% 50%;
  scale: 0.888;
}

.bfly-handoff {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.portrait[data-butterfly-renderer=webgpu] .bfly-cv {
  visibility: hidden;
}

.bfly-hit {
  position: absolute;
  pointer-events: auto;
  left: 2%;
  top: 41%;
  width: 21%;
  height: 19%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.bfly-hit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--accent);
  cursor: pointer;
}
.theme-switch:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.switch-track {
  position: relative;
  flex: none;
  width: 40px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.25s cubic-bezier(0.4, 1.4, 0.5, 1);
}
.switch-knob::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--canvas);
  border-radius: 50%;
  transition: width 0.25s cubic-bezier(0.4, 1.4, 0.5, 1), border-radius 0.25s ease;
}

.switch-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.bulb-rays {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.theme-switch[aria-checked=true] .switch-knob {
  transform: translateX(20px);
}
.theme-switch[aria-checked=true] .switch-knob::after {
  width: 2px;
  border-radius: 0;
}
.theme-switch[aria-checked=true] .bulb-glass {
  fill: currentColor;
}
.theme-switch[aria-checked=true] .bulb-rays {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .switch-knob,
  .switch-knob::after,
  .bulb-rays {
    transition: none;
  }
}
.not-found {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px;
}

.not-found-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 736px);
  text-align: center;
}
.not-found-copy:has(flip-board:defined) h1 {
  margin: clamp(22px, 3vh, 32px) 0 8px;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.flipwindow {
  width: 100%;
  border: 1px solid var(--hairline-strong);
  text-align: left;
}
.flipwindow:has(flip-board:not(:defined)) {
  display: none;
}

.flipwindow__bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline-strong);
  color: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.flipwindow__bar--foot {
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 0;
}

.flipwindow__request {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flipwindow__status {
  color: var(--accent);
}

.flipwindow__path {
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: none;
}

flip-board {
  display: block;
}

flip-board canvas {
  display: block;
  max-width: 100%;
  cursor: pointer;
}

.flipwindow__replay {
  appearance: none;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.flipwindow__replay:hover {
  color: var(--accent);
}
.flipwindow__replay:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  flip-board canvas {
    cursor: default;
  }
  .flipwindow__replay {
    visibility: hidden;
  }
}
@keyframes pulse-ring {
  from {
    width: var(--pulse-from);
    height: var(--pulse-from);
    opacity: 0.4;
  }
  to {
    width: var(--pulse-to);
    height: var(--pulse-to);
    opacity: 0;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 420 16px/1.5 "Recursive", "Recursive Mono Fallback", ui-monospace, monospace;
  font-variation-settings: "MONO" 1, "CASL" 0;
}

.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100dvh;
  padding: 0 32px 96px;
}
@media (max-width: 850px) {
  main {
    padding-inline: 48px;
  }
}
@media (max-width: 640px) {
  main {
    padding: 0 40px 96px;
  }
}

.carve {
  width: min(64ch, 100%);
  padding: 0 32px 32px;
  container-type: inline-size;
}
@media (max-width: 640px) {
  .carve {
    padding: 0 0 16px;
  }
}

.carve > .portrait {
  margin-top: -45%;
  position: sticky;
  top: -68cqi;
  z-index: 1;
}

h1 {
  margin: 0;
  font-family: "Recursive", "Recursive Fallback", system-ui, sans-serif;
  font-variation-settings: "MONO" 0, "CASL" 0;
  font-size: 38px;
  font-weight: 620;
  line-height: 1.5;
}
@media (max-width: 640px) {
  h1 {
    font-size: 28px;
  }
}
h1:focus {
  outline: none;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h2,
h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

h2 {
  margin-bottom: 24px;
  font-weight: 700;
}

h3 {
  font-weight: 500;
}

p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-thickness 0.15s ease;
}
a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

section {
  margin-top: 96px;
  scroll-margin-top: 32px;
}
@media (max-width: 850px) {
  section {
    margin-top: 64px;
  }
}
@media (max-width: 640px) {
  section {
    margin-top: 48px;
  }
}

.role {
  margin-bottom: 24px;
  color: var(--body);
}

.role-place {
  white-space: nowrap;
}

.role-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.fx-word {
  position: relative;
}

.lede {
  font-family: "Recursive", "Recursive Fallback", system-ui, sans-serif;
  font-variation-settings: "MONO" 0, "CASL" 0.18;
  font-size: 18px;
  font-weight: 400;
}

.bio-wrap {
  display: grid;
  margin-bottom: 16px;
}
.bio-wrap > * {
  grid-area: 1/1;
  margin: 0;
}

.bio-reserve {
  visibility: hidden;
}

.slot[role=button] {
  border-bottom: 1px dotted var(--body);
  cursor: pointer;
}
.slot[role=button]:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--ink);
}
.slot[role=button]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.slot.flutter {
  animation: slot-flutter 340ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .slot.flutter {
    animation: none;
  }
}

@keyframes slot-flutter {
  0%, 100% {
    opacity: 1;
    filter: contrast(1) saturate(1);
    text-shadow: 0 0 transparent;
  }
  45% {
    opacity: 0.15;
    filter: contrast(2.1) saturate(0.35);
    text-shadow: -0.07em 0 var(--body), 0.07em 0 var(--ink);
  }
}
.breakout {
  --breakout-out: calc(
    (
        max(
          100cqi,
          min(100cqi + 2 * 40px, 100vw - 2 * (96px + 32px))
        ) -
        100cqi
      ) /
      2
  );
  margin-inline: calc(-1 * var(--breakout-out));
}
@media (width < 900px) {
  .breakout {
    --breakout-out: 0px;
  }
}
.breakout > h2 {
  margin-inline: var(--breakout-out);
}

.projects {
  --gap: 32px;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (width < 900px) {
  .projects {
    --gap: 24px;
    grid-auto-flow: row;
  }
}
.projects li {
  --divider: var(--hairline);
  position: relative;
  z-index: 0;
}
.projects li + li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--gap) / -2);
  border-left: 1px solid var(--divider);
}
@media (width < 900px) {
  .projects li + li::before {
    top: calc(var(--gap) / -2);
    right: 0;
    bottom: auto;
    left: 0;
    border-top: 1px solid var(--divider);
    border-left: 0;
  }
}
.projects h3 {
  margin-bottom: 8px;
}
.projects h3 a {
  padding: 2px 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: var(--ink);
  color: var(--canvas);
  text-decoration: none;
}
.projects h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.projects h3 a:hover {
  color: var(--label-accent);
}
.projects h3 a:focus-visible {
  outline: none;
}
.projects h3 a:focus-visible::after {
  outline: 2px solid var(--ink);
  outline-offset: 8px;
}
.projects h3 a .external {
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.35em;
  vertical-align: -0.05em;
}
.projects p {
  margin: 0;
}

.projects-small {
  font-size: 12px;
}
.projects-small h3 {
  font-size: inherit;
}

.codes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  mix-blend-mode: color-burn;
}
:root[data-theme=dark] .codes {
  mix-blend-mode: normal;
}
.codes img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.contact-icons a {
  display: block;
  padding: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.contact-icons a:hover, .contact-icons a:focus-visible {
  background: var(--ink);
  color: var(--canvas);
}
.contact-icons a:focus-visible {
  border-radius: 0;
}
.contact-icons svg {
  display: block;
  width: 28px;
  height: 28px;
}

footer {
  --cap-height: 0.64;
  --cap-drop: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 16px;
  min-height: calc(var(--cap-height) * 0.5 * (100cqi + 2 * 32px) - 32px - var(--cap-drop));
}
@media (max-width: 640px) {
  footer {
    min-height: calc(var(--cap-height) * 0.5 * 100cqi - 16px - var(--cap-drop));
  }
}

.end-mark {
  position: relative;
  isolation: isolate;
  --pulse-from: 0.52em;
  --pulse-to: 1.14em;
}
.end-mark::before {
  content: "";
  position: absolute;
  top: calc(50% + 0.03em);
  left: 50%;
  z-index: -1;
  box-sizing: border-box;
  width: 0.52em;
  height: 0.52em;
  border: 0.07em solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.end-mark:hover::before, .end-mark:focus-visible::before {
  animation: pulse-ring 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .end-mark:hover::before, .end-mark:focus-visible::before {
    animation: none;
    width: calc((0.52em + 1.14em) / 2);
    height: calc((0.52em + 1.14em) / 2);
    opacity: 0.2;
  }
}
.end-mark {
  display: inline-block;
  color: var(--accent);
  font-family: Menlo, monospace;
  font-size: 64px;
  line-height: 1;
  text-decoration: none;
  border-radius: 50%;
}
.end-mark:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
