@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --personal-ground: #eef2ec;
  --personal-ink: #2c3b35;
  --personal-secondary: #56695e;
  --personal-link: #3b6357;
  --link-thought-machine: #7825b5;
  --link-best: #985315;
  --link-pg: #003da6;
  --link-geekbot: #196c73;
  --link-cern: #003b71;
  --link-github: #24292f;
  --link-linkedin: #0a66c2;
  --personal-accent: #3b6357;
  --personal-selection: #d2dfd3;
  --moustache-glass: #eef2eccc;
  --moustache-edge: #ffffffb3;
  --moustache-hover: #ffffffd9;
  --moustache-shadow: #2c3b351a;
  --document-code-ground: #dfe7de;
  --theme-control-ground: #e4ebe2;
  --theme-control-edge: #718477;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --personal-ground: #1d2622;
  --personal-ink: #e2e9df;
  --personal-secondary: #a5b4aa;
  --personal-link: #a5cdb9;
  --link-thought-machine: #c79be9;
  --link-best: #e2b273;
  --link-pg: #8ab4f8;
  --link-geekbot: #85c9ce;
  --link-cern: #a5c4e8;
  --link-github: #d5dcdf;
  --link-linkedin: #85bdf3;
  --personal-accent: #a5cdb9;
  --personal-selection: #425b4d;
  --moustache-glass: #26362ed9;
  --moustache-edge: #bacdc233;
  --moustache-hover: #31473ad9;
  --moustache-shadow: #00000033;
  --document-code-ground: #26342c;
  --theme-control-ground: #26342c;
  --theme-control-edge: #71897a;
}
/* CSS also follows the system preference when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --personal-ground: #1d2622;
    --personal-ink: #e2e9df;
    --personal-secondary: #a5b4aa;
    --personal-link: #a5cdb9;
    --link-thought-machine: #c79be9;
    --link-best: #e2b273;
    --link-pg: #8ab4f8;
    --link-geekbot: #85c9ce;
    --link-cern: #a5c4e8;
    --link-github: #d5dcdf;
    --link-linkedin: #85bdf3;
    --personal-accent: #a5cdb9;
    --personal-selection: #425b4d;
    --moustache-glass: #26362ed9;
    --moustache-edge: #bacdc233;
    --moustache-hover: #31473ad9;
    --moustache-shadow: #00000033;
    --document-code-ground: #26342c;
    --theme-control-ground: #26342c;
    --theme-control-edge: #71897a;
  }
}

body.personal-home {
  margin: 0;
  min-height: 100svh;
  background: var(--personal-ground);
  color: var(--personal-ink);
  font: 400 clamp(20px, 1.5625vw, 24px)/1.6667 "Courier Prime", monospace;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--personal-secondary) var(--personal-ground);
}
.personal-home *, .personal-home *::before, .personal-home *::after { box-sizing: border-box; }
.personal-home ::selection { background: var(--personal-selection); color: var(--personal-ink); }
/* Narrow and short windows pull the introduction up; large canvases keep its original inset. */
.personal-page { width: min(35.5em, calc(100% - 96px)); margin-inline: auto; padding-block: clamp(72px, min(calc(35vw - 285px), calc(60svh - 360px)), 10.5em) 4em; }
.personal-page h1 { margin: 0; font: 700 2.166667em/1.2 "Courier Prime", monospace; letter-spacing: -.03em; text-wrap: balance; }
.personal-role { margin: 0; color: var(--personal-secondary); font-size: 1.166667em; line-height: 1.4; }
.personal-introduction { display: flow-root; margin-top: 2.666667em; }
.personal-greeting { margin: 0 0 1.142857em; font-size: 1.166667em; line-height: 1.4; letter-spacing: -.03em; }
.personal-page p { padding: 0; }
.personal-biography { margin: 0; }
.personal-community { clear: both; max-width: 28.333333em; margin: 2.666667em 0 0; letter-spacing: -.02em; }
.personal-portrait { float: right; display: block; width: 172px; height: 227px; margin: -14px 0 24px 28px; border-radius: 12px; object-fit: cover; object-position: center; }
.personal-profiles { display: flex; flex-wrap: wrap; gap: 12px 1.5em; margin-top: 1.666667em; }
.personal-home a { color: var(--personal-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-skip-ink: auto; }
/* Brand-inspired link hues are deepened for readable text on the sage ground. */
.personal-home .link-thought-machine { color: var(--link-thought-machine); }
.personal-home .link-best { color: var(--link-best); }
.personal-home .link-pg { color: var(--link-pg); }
.personal-home .link-geekbot { color: var(--link-geekbot); }
.personal-home .link-cern { color: var(--link-cern); }
.personal-home .link-github { color: var(--link-github); }
.personal-home .link-linkedin { color: var(--link-linkedin); }
.personal-home a:hover { text-decoration-thickness: 2px; }
.personal-home :focus-visible { outline: 2px solid var(--personal-link); outline-offset: 6px; border-radius: 2px; }
.personal-profiles a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; white-space: nowrap; }
.personal-profiles svg { width: 20px; height: 20px; flex: none; color: var(--personal-ink); }
.personal-skip { position: absolute; top: 12px; left: 24px; transform: translateY(-200%); padding: 8px 12px; background: var(--personal-ground); z-index: 2; }
.personal-skip:focus { transform: none; }
@media (max-width: 700px) {
  body.personal-home { font-size: 18px; line-height: 1.6667; }
  .personal-page { width: calc(100% - 48px); padding-block: 48px 64px; }
  .personal-page h1 { font-size: clamp(28px, 8vw, 34px); line-height: 1.2; }
  .personal-role { font-size: 20px; line-height: 1.5; margin-top: 4px; }
  .personal-introduction { margin-top: 44px; }
  .personal-greeting { font-size: 20px; line-height: 1.5; margin-bottom: 24px; }
  .personal-portrait { width: clamp(88px, 26.67vw, 112px); height: auto; aspect-ratio: 172 / 227; margin: -4px 0 18px 18px; border-radius: 8px; }
  .personal-community { margin-top: 36px; }
  .personal-profiles { margin-top: 28px; gap: 12px 28px; }
}
@media print {
  body.personal-home { color: #000; background: #fff; }
  .personal-page { padding-block: 24px; width: 100%; }
  .personal-skip { display: none; }
}
.personal-photo { position: relative; float: right; width: 7.166667em; margin: -.583333em 0 1em 1.166667em; }
.personal-photo .personal-portrait { float: none; width: 100%; height: auto; aspect-ratio: 172 / 227; margin: 0; }
.moustache-button { position: absolute; right: -16px; bottom: -16px; display: grid; place-items: center; width: 52px; height: 48px; padding: 0; border: 1px solid transparent; border-radius: 14px; color: var(--personal-accent); background: transparent; overflow: visible; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Keep the glass in its own layer so it cannot crop the elastic illustration. */
.moustache-button::before { content: ""; position: absolute; inset: -1px; border: 1px solid var(--moustache-edge); border-radius: inherit; background: var(--moustache-glass); box-shadow: 0 4px 16px var(--moustache-shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color 180ms ease-out; pointer-events: none; }
.moustache-button[hidden] { display: none; }
.moustache-button:hover::before { background: var(--moustache-hover); }
.moustache-button svg { display: block; transform-origin: center; }
@media (max-width: 700px) {
  .personal-photo { width: clamp(88px, 26.67vw, 112px); margin: -4px 0 24px 18px; }
  .moustache-button { right: -8px; bottom: -14px; width: 44px; height: 44px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .moustache-button::before { transition: none; } }
@media print { .moustache-button { display: none; } }

.moustache-button.is-springy svg { position: absolute; }
.moustache-button.is-springy { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.moustache-button.is-springy:active { cursor: grabbing; }
body.personal-home.moustache-mode, body.personal-home.moustache-mode * { cursor: url('/assets/moustache-cursor.svg') 16 12, auto; }
.touch-moustache { position: fixed; top: 0; left: 0; width: 32px; height: 24px; pointer-events: none; z-index: 5; }
.play-status { position: fixed; bottom: 20px; left: 50%; z-index: 4; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 10px 14px; transform: translateX(-50%); border: 1px solid var(--theme-control-edge); border-radius: 8px; background: var(--personal-ground); color: var(--personal-ink); font-size: 16px; line-height: 1.4; text-align: center; pointer-events: none; }
.play-status:empty { display: none; }
.playful-404 { display: block; position: relative; isolation: isolate; width: 220px; height: 136px; margin: 48px 0 0; padding: 0; border: 0; background: transparent; color: var(--personal-ink); font: inherit; cursor: pointer; }
.playful-404[hidden] { display: none; }
.playful-404 .error-number { position: absolute; top: 32px; inset-inline: 0; z-index: 2; background: var(--personal-ground); font-size: 96px; line-height: 1; letter-spacing: -.05em; pointer-events: none; user-select: none; }
.playful-404 svg { position: absolute; top: 8px; left: 80px; z-index: 1; color: var(--personal-accent); transform: translateY(8px); transition: transform 240ms cubic-bezier(.16,1,.3,1), opacity 120ms ease-out; }
.playful-404:is(:hover, :focus-visible, [aria-pressed="true"]) svg { transform: translateY(-16px) rotate(-8deg); }
.playful-404:not([hidden]) + h1 { margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { .playful-404 svg { transition: opacity 100ms ease-out; } }
@media print { .playful-404, .play-status, .touch-moustache { display: none; } }

.personal-document { width: min(72ch, calc(100% - 48px)); margin-inline: auto; padding-block: 64px 96px; font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.personal-document h1 { margin: 48px 0 36px; font-size: clamp(28px, 5vw, 40px); font-weight: 400; line-height: 1.25; }
.personal-document h2, .personal-document h3, .personal-document h4 { margin: 48px 0 16px; font-size: 24px; font-weight: 400; line-height: 1.4; }
.personal-document p, .personal-document ul, .personal-document ol { margin: 0 0 24px; }
.personal-document li + li { margin-top: 8px; }
.personal-document pre { overflow-x: auto; padding: 16px; background: var(--document-code-ground); }
.personal-document code { font: inherit; }
.personal-document blockquote { margin: 32px 0; padding-inline: 24px; color: var(--personal-secondary); }
.document-home { display: inline-flex; align-items: center; min-height: 44px; }

.theme-control { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--personal-ink); cursor: pointer; }
.theme-control[hidden] { display: none; }
.theme-control::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--theme-control-edge); border-radius: 6px; background: var(--theme-control-ground); }
.theme-control:hover::before { border-color: var(--personal-link); }
.theme-control:focus-visible { outline-offset: -4px; }
.theme-control svg { position: relative; grid-area: 1 / 1; width: 16px; height: 16px; pointer-events: none; }
.theme-icon-sun, :root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
@media (max-width: 700px) { .theme-control { top: 4px; right: 12px; } }
@media print {
  :root[data-theme], :root:not([data-theme]) {
    color-scheme: light;
    --personal-ground: #eef2ec;
    --personal-ink: #2c3b35;
    --personal-secondary: #56695e;
    --personal-link: #3b6357;
    --link-thought-machine: #7825b5;
    --link-best: #985315;
    --link-pg: #003da6;
    --link-geekbot: #196c73;
    --link-cern: #003b71;
    --link-github: #24292f;
    --link-linkedin: #0a66c2;
    --personal-accent: #3b6357;
    --personal-selection: #d2dfd3;
    --moustache-glass: #eef2eccc;
    --moustache-edge: #ffffffb3;
    --moustache-hover: #ffffffd9;
    --moustache-shadow: #2c3b351a;
    --document-code-ground: #dfe7de;
    --theme-control-ground: #e4ebe2;
    --theme-control-edge: #718477;
  }
  .theme-control { display: none; }
}

/* Elastic toy: the illustration deforms, while its small glass mount stays put. */
.moustache-button svg { overflow: visible; pointer-events: none; }
.moustache-button.is-loose { position: fixed; inset: 0 auto auto 0; width: 60px; height: 60px; z-index: 10; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; will-change: transform; }
.moustache-button.is-loose::before { display: none; }
.moustache-button.is-loose svg { width: 48px; height: 32px; }
.personal-photo.moustache-away::after { content: ""; position: absolute; right: -12px; bottom: -12px; width: 44px; height: 44px; border: 1px dashed var(--personal-secondary); border-radius: 14px; pointer-events: none; }
.personal-photo.moustache-home-ready::after { background: var(--personal-selection); border-style: solid; }
.moustache-reset { position: fixed; z-index: 11; bottom: 20px; right: 20px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--theme-control-edge); border-radius: 8px; background: var(--personal-ground); color: var(--personal-ink); font: 16px/1.4 "Courier Prime", monospace; cursor: pointer; }
.moustache-reset[hidden] { display: none; }
body:has(.moustache-reset:not([hidden])) .play-status { bottom: 80px; }
@media print { .moustache-reset, .personal-photo.moustache-away::after { display: none; } }
