:root { color-scheme:light; --ink:#232a40; --paper:#fff9e9; --silver:#e4dfcf; --blue:#324570; font:16px/1.5 system-ui,sans-serif; color:var(--ink); }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:#b6b4a8; }
button,a { font:inherit; }
button {
  --face:var(--silver); --bevel:inset 1px 1px white,inset -1px -1px #99998a;
  --pressed-face:#cbc6b6;
  cursor:pointer; color:var(--ink); border:1px solid var(--ink); border-radius:0;
  background:var(--face); box-shadow:var(--bevel);
}
button:is(:active,.held) {
  background:var(--pressed-face); box-shadow:inset 2px 2px #77796d,inset -1px -1px white;
  translate:1px 1px;
}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible { outline:3px solid #db682d; outline-offset:2px; }
.system-bar,.taskbar,.titlebar { display:flex; align-items:center; }
.system-bar,.taskbar { justify-content:space-between; background:var(--silver); padding:0 .8rem; gap:.5rem; min-height:42px; font:.9rem/1.2 ui-monospace,monospace; }
.system-bar { border-bottom:2px solid var(--ink); }
.system-bar h1 { font:bold 1.05rem/1.2 ui-monospace,monospace; display:flex; gap:.55rem; align-items:center; margin:0; }
#clock { border-left:1px solid #969486; padding-left:.8rem; white-space:nowrap; }
.selection-box { position:absolute; pointer-events:none; z-index:2147483647; border:1px dotted #fff; background:#405d983d; outline:1px solid #344575; }
.workspace { grid-area:2 / 1; isolation:isolate; min-height:0; position:relative; overflow:hidden; background:#414976 url('../images/perth-skyline.png') center / cover no-repeat; image-rendering:pixelated; }
.files { position:absolute; inset:1rem .8rem auto; pointer-events:none; display:grid; justify-items:start; gap:.55rem; }
.files .game-icon { position:absolute; right:0; top:0; }
.files button { pointer-events:auto; display:grid; justify-items:center; align-content:center; gap:.35rem; width:5.3rem; min-height:4.6rem; border:1px solid transparent; --face:transparent; --bevel:none; --pressed-face:#253a65; color:white; font:bold .9rem/1.2 ui-monospace,monospace; text-shadow:1px 1px #182139,0 0 4px #182139; }
.files button:hover,.files button:focus-visible,.files button.selected { --face:#24325bac; border:1px dotted white; }
.files img { width:44px; height:44px; image-rendering:pixelated; }
.window { position:absolute; top:12%; left:16%; width:min(27rem,67%); max-height:82%; display:flex; flex-direction:column; border:2px solid var(--ink); background:var(--paper); box-shadow:5px 5px 0 #1e253bcf; image-rendering:auto; }
.titlebar { padding:3px; gap:4px; background:var(--blue); color:white; cursor:move; touch-action:none; user-select:none; }
.workspace .window:not(.foreground) .titlebar { background:#586176; }
.titlebar h2 { flex:1; display:flex; align-items:center; gap:.65rem; margin:0 .35rem; font:bold .9rem/1.4 ui-monospace,monospace; }
.titlebar h2::after { content:""; flex:1; height:9px; background:repeating-linear-gradient(#bac0cf 0 1px,transparent 1px 4px); }
.titlebar button { width:32px; height:30px; font:1.25rem/1 monospace; }
.content { overflow:auto; overscroll-behavior:contain; padding:clamp(1rem,2.3vw,2.2rem); }
.content h3 { margin:.1rem 0; font:bold clamp(1.12rem,2vw,1.45rem)/1.25 ui-monospace,monospace; color:var(--blue); }
.content p { margin:.9rem 0; }
.content .byline,.meta { font:.85rem/1.55 ui-monospace,monospace; color:#50566a; }
.profile-heading { margin-bottom:1.2rem; }
.content .byline { margin:.4rem 0 0; }
.content a { color:#273e75; text-underline-offset:3px; }
.content details { border-bottom:1px solid #b6b6a8; padding:.8rem 0; }
.content details + section { padding-top:.8rem; }
.content summary { font-weight:650; cursor:pointer; }
.content h4 { margin:.9rem 0 .15rem; }
.content ul { padding-left:1.25rem; }
.content li + li { margin-top:.45rem; }
.contact-list { display:grid; gap:.85rem; }
.taskbar { min-width:0; justify-content:flex-start; grid-area:3 / 1; border-top:2px solid var(--ink); padding:.25rem .4rem; }
.taskbar button { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; min-height:34px; min-width:36px; padding:.25rem .4rem; }
.taskbar img { width:22px; height:22px; image-rendering:pixelated; }
#show-desktop { flex:none; padding:0 calc(.3rem + 2px); }
#show-desktop img { width:28px; height:28px; }
#tasks { display:flex; align-items:center; gap:.25rem; min-height:38px; overflow-x:auto; scrollbar-width:none; padding:2px; }
#tasks button { flex:none; white-space:nowrap; }
#tasks [aria-pressed=true] { --bevel:inset 1px 1px #77796d; --face:#faf6e7; }
@media(max-width:640px) {
 .workspace { background-size:cover; background-position:68% center; }
 .titlebar button { width:42px; height:38px; }
 .files { inset:.35rem .25rem auto; grid-template-columns:repeat(6,minmax(0,1fr)); align-items:start; gap:0; }
 .files .game-icon { position:static; }
 .files button { width:100%; min-width:0; min-height:4rem; padding-inline:1px; gap:.15rem; font-size:.78rem; }
 .window { left:4%; top:5.6rem; width:92%; max-height:calc(100% - 6rem); }
 .taskbar button { padding:.3rem .4rem; }
 .content { padding:1rem; }
}
@media(max-height:500px) and (min-width:641px) { .files { grid-template-columns:repeat(2,5.3rem); } .window { left:26%; top:4%; max-height:92%; } }
.screen { height:100vh; height:100dvh; display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
desk-model { display:block; margin:.75rem 0; }
desk-model:defined { height:clamp(140px,22vh,200px); background:radial-gradient(ellipse at 50% 65%,#51566e,#292e48 75%); color:#fff9e9; border:2px inset var(--silver); }
desk-model canvas { width:100%; height:100%; display:block; image-rendering:pixelated; }
.jump { font:inherit; border:0; padding:0; --face:transparent; --bevel:none; text-decoration:underline; text-underline-offset:3px; color:#273e75; }
.skill-links { display:flex; flex-wrap:wrap; gap:.25rem .85rem; margin:.4rem 0 1rem; }
.content [tabindex="-1"]:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.drive-launch { padding:.4rem .65rem; font:.87rem/1.3 ui-monospace,monospace; }
.drive-launch { display:block; margin:.65rem 0; }
#drive-game { inset:0; margin:0; width:100%; max-width:none; height:100dvh; max-height:none; padding:0; border:0; background:var(--paper); color:var(--ink); box-shadow:5px 5px #202438; }
#drive-game[open] { display:flex; flex-direction:column; }
#drive-game::backdrop { background:#19233ba6; }
#drive-game .titlebar { cursor:default; }
#drive-game [data-restart],#drive-game [data-toggle-controls] { width:auto; padding:0 .65rem; font:.82rem ui-monospace,monospace; }
.track { position:relative; flex:1; min-height:6rem; background:#242b40; border:2px inset var(--silver); }
.drive-view { height:100%; }
.sensor { position:absolute; right:.5rem; top:.5rem; width:clamp(118px,22vw,184px); max-height:80%; overflow:auto; background:#142321; color:#b7e6cc; border:2px outset var(--silver); font:.78rem/1.3 ui-monospace,monospace; }
.sensor header { display:flex; justify-content:space-between; padding:.2rem .4rem; }
.radar { display:block; width:100%; height:auto; image-rendering:pixelated; }
@media(max-height:500px) { .sensor { width:120px; } }

.drive-view canvas { width:100%; height:100%; display:block; image-rendering:pixelated; }
.drive-controls { display:none; position:absolute; inset:auto max(.65rem,env(safe-area-inset-right)) max(.75rem,env(safe-area-inset-bottom)) max(.65rem,env(safe-area-inset-left)); justify-content:space-between; pointer-events:none; }
.drive-controls div { display:flex; gap:.3rem; align-items:end; }
.drive-controls button { pointer-events:auto; touch-action:none; user-select:none; width:clamp(45px,12vw,66px); height:54px; padding:0; font:bold .85rem ui-monospace,monospace; }
.drive-controls [data-drive=forward] { height:66px; }
#drive-game.touch-drive .drive-controls { display:flex; }

.drive-status { max-width:50%; font:.78rem/1.2 ui-monospace,monospace; }
.drive-status:empty { display:none; }

.drive-popup.window { position:fixed; inset:0; margin:auto; width:min(22rem,calc(100% - 2rem)); height:fit-content; padding:3px; color:var(--ink); background:var(--silver); }
.drive-popup:not([open]) { display:none; }
.drive-popup::backdrop { background:#18213940; }
.prompt-body { display:flex; align-items:center; gap:1rem; padding:1rem; }
.prompt-body img { image-rendering:pixelated; }
.prompt-body p { margin:0; }
.drive-popup footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:.45rem; padding:0 .75rem .75rem; }
.drive-popup footer button { padding:.4rem .7rem; font:.87rem ui-monospace,monospace; }
#drive-game button:focus-visible { outline:2px dotted currentColor; outline-offset:-4px; }
#drive-game .drive-view:focus { outline:none; }

.drive-controls, .drive-controls button { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; }
.drive-controls button::before { content:""; display:inline-block; width:0; height:0; border:7px solid transparent; border-bottom:11px solid currentColor; border-top:0; }
.drive-controls [data-drive=left]::before { transform:rotate(-90deg); }
.drive-controls [data-drive=right]::before { transform:rotate(90deg); }
.drive-controls [data-drive=reverse]::before { transform:rotate(180deg); }
