:root {
  color-scheme: dark;
  --background: #101113;
  --surface: #18191d;
  --raised: #202126;
  --ink: #eeeae2;
  --muted: #aaa9a4;
  --line: #303136;
  --amber: #efbc65;
  --apps: #d6b476;
  --games: #91a5cc;
  --preservation: #91b5a3;
  --websites: #b09bc8;
  --audio: #c49c9f;
  --category-color: var(--apps);
  --category-surface: #1d1b18;
  --category-line: #38342c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, sans-serif;
  background: var(--background);
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--amber); color: var(--background); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; background: var(--amber); color: var(--background); padding: 12px 20px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { min-height: 82px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.identity { font-size: 27px; letter-spacing: -.08em; font-weight: 650; padding: 8px 4px 8px 0; }
.identity span { color: var(--amber); }
.site-header nav { display: flex; gap: 28px; font-size: 13px; color: var(--muted); }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; }
.site-header nav a:hover { color: var(--ink); }

/* This page starts with the person, rather than a product pitch. */
.profile { display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: start; gap: 32px; padding-block: 54px 40px; }
.portrait { width: 130px; aspect-ratio: 416 / 476; object-fit: cover; border-radius: 12px; border: 1px solid #655335; }
.profile-title { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 25px; }
h1 { font-size: clamp(32px,3.7vw,46px); font-weight: 550; letter-spacing: -.045em; line-height: 1.1; }
.availability { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; padding-top: 4px; }
.availability span { width: 6px; height: 6px; border-radius: 50%; background: #a6be9d; }
.role { font-size: 19px; line-height: 1.55; margin-top: 13px; max-width: 720px; color: #d8d5ce; }
.bio { color: var(--muted); font-size: 15px; line-height: 1.85; max-width: 740px; margin-top: 13px; }
.profile-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 25px; margin-top: 14px; font-size: 13px; }
.profile-links a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
.profile-links a:hover { color: var(--amber); }
.location { color: var(--muted); margin-right: 4px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
h2 { font-weight: 550; font-size: 21px; letter-spacing: -.025em; line-height: 1.4; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.experience { padding-bottom: 31px; }
.experience-grid { border-top: 1px solid var(--line); }
.experience-grid article { display: grid; grid-template-columns: 125px 210px minmax(0,1fr); gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.experience-date { color: var(--muted); font-size: 12px; line-height: 1.8; }
.experience-grid h3 { font-weight: 550; font-size: 15px; line-height: 1.6; }
.experience-grid p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.full-experience { margin-top: 20px; }
.full-experience > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 56px; width: 100%; padding: 14px 18px; color: var(--ink); background: var(--surface); border: 1px solid #585044; border-radius: 7px; list-style: none; font-size: 14px; font-weight: 550; transition: border-color .2s, background .2s; }
.full-experience > summary:hover { border-color: #948064; background: #1e1f23; }
.full-experience > summary::-webkit-details-marker { display: none; }
.full-experience > summary span { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; color: var(--apps); transition: transform .2s; font-size: 24px; font-weight: 400; }
.full-experience[open] > summary span { transform: rotate(45deg); }
.full-experience[open] > summary { margin-bottom: 20px; }
.career-columns { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 50px; padding: 25px 0; border-top: 1px solid var(--line); }
.career-columns h2 { font-size: 19px; margin-bottom: 20px; }
.career-entry { border-left: 1px solid var(--line); padding-left: 20px; margin-bottom: 28px; }
.career-entry h3 { font-size: 15px; font-weight: 550; margin-bottom: 10px; }
.career-role { margin-bottom: 9px; }
.career-role p { color: #d6d3cc; font-size: 13px; line-height: 1.6; }
.career-role span { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; }
.career-summary { color: var(--muted); line-height: 1.85; font-size: 12px; margin-top: 13px; }

/* Category boxes are the main navigation through the work. */
.portfolio { padding-top: 27px; border-top: 1px solid var(--line); }
.portfolio-heading { align-items: end; margin-bottom: 22px; }
.portfolio-heading h2 { font-size: 26px; }
.portfolio-heading p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 6px; }
.category-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 13px; }
.category-box { --rx: 0deg; --ry: 0deg; position: relative; display: flex; flex-direction: column; min-width: 0; padding: 21px 19px 23px; border: 1px solid var(--category-line); border-radius: 11px; background: var(--category-surface); transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, background .25s, box-shadow .25s; transform: perspective(650px) rotateX(var(--rx)) rotateY(var(--ry)); }
/* Colour identifies portfolio categories; projects and résumé rows stay neutral. */
.category-box[data-filter="apps"], #category-apps { --category-color: var(--apps); --category-surface: #1d1b18; --category-line: #38342c; }
.category-box[data-filter="games"], #category-games { --category-color: var(--games); --category-surface: #191c21; --category-line: #2d333d; }
.category-box[data-filter="preservation"], #category-preservation { --category-color: var(--preservation); --category-surface: #191f1c; --category-line: #2c3731; }
.category-box[data-filter="websites"], #category-websites { --category-color: var(--websites); --category-surface: #1d1a21; --category-line: #35303c; }
.category-box[data-filter="audio"], #category-audio { --category-color: var(--audio); --category-surface: #211a1b; --category-line: #3b3032; }
.category-box::before { content: ""; position: absolute; top: 0; left: 19px; width: 32px; height: 2px; border-radius: 0 0 2px 2px; background: var(--category-color); opacity: .7; }
.category-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--category-color); margin-bottom: 21px; }
.category-top svg { box-sizing: content-box; padding: 0; }
.category-count { font-size: 11px; font-weight: 400; color: var(--muted); background: #ffffff06; padding: 4px 7px; border-radius: 5px; }
.category-name { font-size: 15px; font-weight: 550; letter-spacing: -.02em; }
.category-description { color: var(--muted); font-size: 11px; line-height: 1.75; margin-top: 7px; max-width: 150px; }
.category-selection { position: absolute; right: 16px; bottom: 19px; font-size: 14px; color: var(--category-color); opacity: 0; transition: opacity .2s; }
.category-box[aria-current="true"] { border-color: var(--category-color); }
.category-box:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.category-box[aria-current="true"] .category-selection { opacity: 1; }
@media (hover:hover) and (pointer:fine) {
  .category-box:hover { transform: perspective(650px) translateY(-5px) rotateX(var(--rx)) rotateY(var(--ry)); border-color: var(--category-color); box-shadow: 0 12px 24px #0003; }
  .project-card:not([open]):hover { transform: translateY(-5px); border-color: var(--category-color); box-shadow: 0 14px 30px #0003; }
  .project-card:not([open]):hover .project-image img { transform: scale(1.035); }
  .project-card:hover .open-project { opacity: 1; transform: translate(0,0); }
}
.portfolio-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; min-height: 70px; margin-top: 8px; }
.portfolio-toolbar p { font-size: 13px; color: var(--muted); }
.portfolio-toolbar button { background: transparent; color: #d8d2c8; border: 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0 10px 10px; min-height: 44px; }
.portfolio-toolbar button:hover { color: var(--amber); }
.category-heading { font-size: 20px; margin-bottom: 23px; display: flex; align-items: center; gap: 15px; }
.category-heading span { font-weight: 400; font-size: 12px; color: var(--muted); }
.category-heading { color: var(--category-color); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.filtered .category-heading { display: none; }
.category-panel + .category-panel { margin-top: 50px; }
.filtered .category-panel + .category-panel { margin-top: 0; }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: start; }
.project-card { --category-color: var(--muted); --category-line: var(--line); --category-surface: var(--surface); position: relative; min-width: 0; border: 1px solid var(--category-line); border-radius: 11px; background: var(--category-surface); overflow: hidden; transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s; }
.project-card > summary { list-style: none; padding: 13px; border-radius: 10px; }
.project-card > summary::-webkit-details-marker { display: none; }
.project-card > summary:focus-visible { outline-offset: -4px; }
.project-image { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #101114; }
.project-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.project-monogram { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 44px; color: var(--amber); }
.open-project { position: absolute; top: 10px; right: 10px; background: #141518ed; color: var(--ink); border: 1px solid #ffffff26; height: 30px; width: 30px; display: grid; place-items: center; border-radius: 50%; opacity: 0; transform: translate(-3px,3px); transition: opacity .2s, transform .2s; }
.project-overview { display: block; padding: 18px 6px 2px; }
.project-type { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; min-height: 18px; }
.project-name { display: block; font-size: 19px; font-weight: 550; line-height: 1.4; letter-spacing: -.025em; margin-top: 6px; }
.project-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 48px; color: var(--muted); font-size: 13px; line-height: 1.85; margin-top: 9px; }
.project-more { display: flex; align-items: center; justify-content: space-between; color: var(--category-color); font-size: 11px; min-height: 42px; margin-top: 7px; }
.project-more > span { font-size: 20px; font-weight: 300; }
.project-card[open] { grid-column: 1 / -1; }
.project-card[open] > summary { max-width: 420px; }
.project-card > .project-content { padding: 0 25px 25px; }
.cards-enter .project-card { animation: box-in .4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--order) * 35ms); }
@keyframes box-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

/* Project detail window; the same content is an inline disclosure without JS. */
.modal-open { overflow: hidden; }
#project-dialog { --category-color: var(--muted); --category-line: var(--line); --category-surface: var(--surface); width: min(1000px,calc(100% - 40px)); max-height: 90dvh; padding: 0; color: var(--ink); background: var(--category-surface); border: 1px solid var(--category-line); border-radius: 11px; box-shadow: 0 35px 100px #0008; }
#project-dialog::backdrop { background: #060709cf; backdrop-filter: blur(5px); }
#project-dialog[open] { animation: dialog-in .22s cubic-bezier(.2,.7,.2,1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.dialog-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: start; justify-content: space-between; gap: 25px; padding: 25px 28px 22px; border-bottom: 1px solid var(--category-line); background: var(--category-surface); }
.dialog-heading p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 5px; }
.dialog-heading h2 { font-size: 27px; line-height: 1.3; }
.dialog-close { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; background: #ffffff06; border: 1px solid var(--category-line); border-radius: 7px; color: var(--ink); font-size: 29px; font-weight: 300; }
.dialog-close:hover { border-color: var(--category-color); }
#dialog-content { padding: 28px; }
.project-introduction { font-size: 16px; line-height: 1.8; max-width: 750px; }
.project-status { display: inline-block; font-size: 12px; padding: 6px 10px; color: var(--category-color); border: 1px solid var(--category-line); border-radius: 5px; margin-top: 15px; }
.evidence-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 16px; padding-left: 13px; border-left: 2px solid var(--category-color); }
.project-gallery { margin-top: 25px; }
.project-gallery figure + figure { margin-top: 20px; }
.project-gallery img { width: 100%; max-height: 56vh; aspect-ratio: 16 / 9; object-fit: contain; background: #101113; border: 1px solid var(--line); border-radius: 5px; }
.project-gallery figcaption { color: var(--muted); font-size: 12px; line-height: 1.75; padding-top: 11px; }
.project-gallery a { display: block; border-radius: 5px; }
.gallery-navigation { display: flex; align-items: center; gap: 15px; justify-content: space-between; margin-top: 14px; }
.gallery-navigation button { flex-shrink: 0; min-width: 44px; height: 44px; color: var(--category-color); border: 1px solid var(--category-line); background: #ffffff06; border-radius: 5px; font-size: 18px; }
.gallery-navigation p { color: var(--muted); font-size: 12px; text-align: center; }
.project-video { width: 100%; max-height: 60vh; background: #101113; margin-top: 25px; border-radius: 5px; }
.project-content h3 { font-size: 15px; font-weight: 550; margin-top: 28px; }
.project-highlights { padding-left: 19px; color: var(--muted); font-size: 14px; line-height: 1.9; margin: 14px 0 0; }
.project-highlights li + li { margin-top: 8px; }
.project-stack { font-size: 13px; color: var(--muted); line-height: 1.85; margin-top: 11px; }
.project-external { display: inline-flex; min-height: 45px; align-items: center; gap: 16px; padding: 10px 16px; border: 1px solid var(--category-line); color: var(--category-color); border-radius: 6px; font-size: 13px; margin-top: 25px; }

.contact { display: flex; justify-content: space-between; align-items: center; gap: 30px; border-top: 1px solid var(--line); padding-block: 35px; margin-top: 55px; }
.contact h2 { font-size: 19px; }
.contact p { color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 520px; margin-top: 9px; }
.contact-link { flex-shrink: 0; color: var(--amber); font-size: 14px; display: inline-flex; gap: 15px; min-height: 44px; align-items: center; }
.site-footer { border-top: 1px solid var(--line); padding-block: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.site-footer > a { display: flex; align-items: center; min-height: 44px; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 56px); }
  .profile { gap: 25px; }
  .profile-title { gap: 10px 20px; }
  .profile-title .availability { padding-top: 0; }
  .role { font-size: 17px; }
  .experience-grid article { grid-template-columns: 105px 180px minmax(0,1fr); gap: 18px; }
  .category-grid { gap: 10px; }
  .category-box { padding: 18px 14px 20px; }
  .category-name { font-size: 13px; }
  .category-description { font-size: 10px; }
  .category-selection { right: 10px; bottom: 12px; }
  .project-grid { gap: 16px; }
  .project-name { font-size: 17px; }
  .project-type { font-size: 10px; }
  .contact { align-items: start; }
  .contact-link { font-size: 12px; gap: 10px; }
}
@media (max-width: 800px) {
  .profile { grid-template-columns: 105px minmax(0,1fr); padding-block: 40px 30px; gap: 24px; }
  .portrait { width: 105px; }
  h1 { font-size: 33px; }
  .availability { font-size: 11px; }
  .role { font-size: 16px; margin-top: 14px; }
  .bio { font-size: 14px; }
  .profile-links { font-size: 12px; gap: 0 19px; }
  .experience-grid article { grid-template-columns: 100px minmax(0,1fr); gap: 4px 20px; align-items: start; }
  .experience-date { grid-row: 1 / span 2; }
  .experience-grid p { grid-column: 2; }
  .section-heading > span { font-size: 11px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .category-box { padding: 17px; }
  .category-top { margin-bottom: 13px; }
  .category-name { font-size: 15px; }
  .category-description { font-size: 11px; max-width: 155px; }
  .category-grid .category-box:nth-child(4), .category-grid .category-box:nth-child(5) { min-height: 130px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-name { font-size: 19px; }
  .project-type { font-size: 11px; }
  .career-columns { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 30px; }
  .contact { display: block; }
  .contact-link { margin-top: 16px; font-size: 14px; }
  .site-footer { flex-wrap: wrap; gap: 10px 20px; }
  .site-footer p:nth-child(2) { margin-left: auto; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 36px); }
  .site-header { min-height: 66px; }
  .identity { font-size: 25px; }
  .site-header nav { gap: 18px; font-size: 11px; }
  .profile { grid-template-columns: 1fr; gap: 20px; padding-block: 30px 29px; }
  .portrait { width: 86px; aspect-ratio: 1; object-position: center 27%; border-radius: 12px; }
  h1 { font-size: clamp(29px,7.8vw,38px); }
  .profile-title { display: block; }
  .availability { margin-top: 13px; }
  .role { font-size: 17px; line-height: 1.6; margin-top: 15px; }
  .bio { font-size: 14px; margin-top: 13px; }
  .profile-links { gap: 0 19px; margin-top: 13px; font-size: 12px; }
  .location { width: 100%; margin-bottom: 3px; }
  .section-heading { display: block; margin-bottom: 16px; }
  .section-heading > span { display: block; margin-top: 7px; font-size: 11px; line-height: 1.6; }
  h2 { font-size: 20px; }
  .experience { padding-bottom: 19px; }
  .experience-grid article { grid-template-columns: 82px minmax(0,1fr); gap: 4px 17px; padding: 17px 0; }
  .experience-date { font-size: 11px; }
  .experience-grid h3 { font-size: 14px; }
  .experience-grid p { font-size: 12px; line-height: 1.8; }
  .full-experience > summary { font-size: 13px; padding-inline: 15px; }
  .career-columns { grid-template-columns: 1fr; gap: 12px; }
  .career-entry { padding-left: 16px; }
  .portfolio { padding-top: 24px; }
  .portfolio-heading h2 { font-size: 24px; }
  .portfolio-heading p { font-size: 12px; max-width: 235px; }
  .portfolio-heading > span { font-size: 10px; margin-top: 11px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-box { padding: 17px 15px; border-radius: 10px; }
  .category-name { font-size: 14px; }
  .category-description { font-size: 10px; max-width: 120px; }
  .category-top { margin-bottom: 14px; }
  .category-top svg { width: 23px; height: 23px; }
  .category-count { font-size: 10px; padding: 4px 6px; }
  .category-selection { right: 12px; bottom: 12px; }
  .category-grid .category-box:last-child { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: 45px 1fr; gap: 0 16px; align-items: center; }
  .category-grid .category-box:last-child .category-top { grid-row: 1 / 3; margin: 0; }
  .category-grid .category-box:last-child .category-count { position: absolute; right: 16px; top: 20px; }
  .category-grid .category-box:last-child .category-description { max-width: none; margin-top: 3px; }
  .portfolio-toolbar { min-height: 67px; gap: 0 15px; margin-top: 5px; }
  .portfolio-toolbar p { font-size: 11px; }
  .portfolio-toolbar button { font-size: 10px; padding-left: 0; }
  .project-grid { gap: 15px; grid-template-columns: 1fr; }
  .project-card > summary { padding: 12px; }
  .project-image { aspect-ratio: 16 / 9; }
  .project-overview { padding: 17px 6px 2px; }
  .project-type { font-size: 11px; }
  .project-name { font-size: 21px; margin-top: 7px; }
  .project-description { font-size: 14px; min-height: 0; line-height: 1.8; }
  .project-more { font-size: 12px; margin-top: 10px; }
  .project-card[open] > summary { max-width: none; }
  .project-card > .project-content { padding: 0 18px 23px; }
  .category-heading { font-size: 19px; }
  .category-heading span { font-size: 11px; }
  .contact { padding-block: 27px; margin-top: 35px; }
  .contact h2 { font-size: 19px; }
  .contact p { font-size: 12px; }
  .contact-link { font-size: 12px; gap: 10px; overflow-wrap: anywhere; }
  .site-footer { display: block; font-size: 10px; padding-block: 25px 17px; }
  .site-footer p { line-height: 1.8; }
  .site-footer p:nth-child(2) { margin-top: 8px; }
  .site-footer > a { width: fit-content; margin-top: 4px; }
  #project-dialog { width: calc(100% - 16px); max-height: 94dvh; border-radius: 10px; }
  .dialog-heading { padding: 20px 17px; gap: 15px; }
  .dialog-heading p { font-size: 10px; }
  .dialog-heading h2 { font-size: 22px; }
  .dialog-close { width: 44px; height: 44px; }
  #dialog-content { padding: 20px 17px; }
  .project-introduction { font-size: 14px; }
  .evidence-note { font-size: 11px; }
  .project-gallery { margin-top: 21px; }
  .project-gallery figcaption { font-size: 11px; }
  .project-highlights { font-size: 13px; }
  .project-stack { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .category-box, .category-box:hover, .project-card:hover, .project-card:hover .project-image img { transform: none !important; }
}
