/* Layout: a period workstation, grey plastic windows on a blue dithered desk (the BeOS desktop blue that
   goes with its yellow window tabs). On a desktop it is one fixed screen: menu bar, his name as the
   wallpaper, one row of files along the bottom and windows on top. On a phone it is the same OS in
   handheld mode: a launcher panel, a bottom dock and full screen sheets.
   One look on purpose, so there is no dark variant; every color below is set explicitly. */
:root {
  --desk: #2f64a0;
  --dot: #2a5a91;
  --on-desk: #fcfbf7;
  --plastic: #d6d3ca;
  --plastic-2: #c2bfb5;
  --hi: #f7f6f1;
  --lo: #86837a;
  --paper: #fcfbf7;
  --ink: #151412;
  --ink-2: #4a4841;
  --tab: #ffc914;
  --screen: #151412;
  --on-screen: #ece9df;
  --screen-line: #3d3b35;

  --font-pixel: "Silkscreen", "Courier New", monospace;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bar-h: 34px;
  --dock-h: 74px;
  --bevel: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
  --bevel-in: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
  --drop: 3px 3px 0 var(--ink);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--desk); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--tab); color: var(--ink); }
img, video { max-width: 100%; }
svg { fill: currentColor; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.console :focus-visible { outline-color: var(--tab); }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- The machine ---------- */

.os {
  min-height: 100%;
  background-color: var(--desk);
  background-image: repeating-conic-gradient(var(--dot) 0 25%, transparent 0 50%);
  background-size: 4px 4px;
}

/* Bevel controls: one recipe for every pressable thing. */
.btn, .t-play, .embed-play, .close, .tile {
  border: 1px solid var(--ink);
  background: var(--plastic);
  box-shadow: var(--bevel);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.btn:active, .t-play:active, .embed-play:active, .close:active, .tile:active {
  box-shadow: var(--bevel-in);
  transform: translate(1px, 1px);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  font: 500 14px/1 var(--font-sans);
}
.btn svg { width: 16px; height: 16px; }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-default {
  background: var(--tab);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .65), inset -1px -1px 0 rgba(0, 0, 0, .28),
              0 0 0 2px var(--plastic), 0 0 0 4px var(--ink);
  margin-left: 6px;
}

/* ---------- Menu bar ---------- */

.bar {
  position: relative;
  z-index: 40;
  background: var(--plastic);
  border-bottom: 1px solid var(--ink);
  box-shadow: inset 0 1px 0 var(--hi);
}
.bar-in {
  display: flex; align-items: center; gap: 2px;
  min-height: var(--bar-h);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mark {
  flex: none;
  margin-right: 8px; padding: 0 5px;
  font: 700 16px/22px var(--font-pixel);
  letter-spacing: .04em;
  background: var(--ink); color: var(--tab);
}
.menus { display: flex; flex-wrap: wrap; align-items: stretch; align-self: stretch; }
.menu { position: relative; display: flex; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--bar-h); padding: 0 10px;
  font: 400 16px/1 var(--font-pixel);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink); background: transparent; border: 0;
  cursor: pointer;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--plastic); }
.menu-btn:focus-visible { outline-offset: -4px; }
.menu-btn .ico { width: 14px; height: 14px; }
.menu-btn[aria-controls] { display: none; }
.menu-list { display: flex; list-style: none; padding: 0; }
.menu-list a {
  display: block; padding: 8px 10px;
  font: 400 16px/1 var(--font-pixel); text-transform: uppercase; text-decoration: none;
}
.js .menu-btn[aria-controls] { display: inline-flex; }
.js .menu-list {
  display: none;
  position: absolute; left: 0; top: 100%; z-index: 2000;
  min-width: 220px; padding: 4px 0;
  background: var(--plastic);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel), var(--drop);
}
.js .menu.is-open .menu-list { display: block; }
.js .menu-list a { padding: 10px 16px; font: 500 15px/1.2 var(--font-sans); text-transform: none; }
.js .menu-list a:hover, .js .menu-list a:focus-visible { background: var(--ink); color: var(--plastic); outline: none; }
.clock {
  flex: none; margin-left: auto; padding-left: 12px;
  font: 500 13px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap;
}
.clock:empty, .clock-time:empty { display: none; }
.clock:has(.clock-time:empty) { display: none; }

/* ---------- Desk, the home screen ---------- */

.desk {
  position: relative;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px 48px;
}
.hello { display: grid; gap: 10px; color: var(--on-desk); }
.name {
  font: 700 clamp(44px, 20vw, 92px)/.9 var(--font-sans);
  letter-spacing: -.035em;
  color: var(--on-desk);
  margin-bottom: 6px;
}
.name span { display: block; }
.lead { font: 500 clamp(19px, 5.3vw, 22px)/1.3 var(--font-sans); max-width: 26ch; text-wrap: balance; }
.sub { font-size: 16px; line-height: 1.5; max-width: 40ch; }
.meta { display: flex; flex-direction: column; font: 400 13px/1.55 var(--font-mono); }

/* Files: on a phone, a launcher panel with a tab. */
.files { margin-top: 30px; }
.files-t {
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 12px;
  position: relative; z-index: 1; margin-bottom: -1px;
  font: 400 16px/1 var(--font-pixel); text-transform: uppercase;
  background: var(--tab);
  border: 1px solid var(--ink); border-bottom: 0;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6);
}
.files-list {
  list-style: none; padding: 0;
  background: var(--plastic);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel), var(--drop);
}
.files-list li + li { border-top: 1px solid var(--lo); }
.files-more { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; }
.files-list.files-more li + li { border-top: 0; }
.files-list.files-more li:nth-child(even) { border-left: 1px solid var(--lo); }
.files-list.files-more li:nth-child(n + 3) { border-top: 1px solid var(--lo); }
.file {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 12px;
  color: var(--ink); text-decoration: none;
}
.file:hover { background: var(--plastic-2); }
.file:active { background: var(--tab); }
.file:focus-visible { outline-offset: -4px; }
.file-thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink);
  background: var(--screen);
  overflow: hidden;
}
.file-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.file-len {
  position: absolute; right: 3px; bottom: 3px;
  padding: 2px 4px;
  font: 500 11px/1 var(--font-mono);
  background: var(--ink); color: var(--paper);
}
.file-text { display: grid; gap: 3px; min-width: 0; }
.file-name { font: 400 16px/1.15 var(--font-pixel); text-transform: uppercase; }
.file-info { font-size: 15px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.files-more .file { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.files-more .file-thumb { width: 40px; aspect-ratio: 1; border: 0; background: none; display: grid; place-items: center; }
.files-more .file-info { display: none; }
.glyph { width: 32px; height: 32px; }

/* ---------- Windows ---------- */

.win { display: flex; flex-direction: column; margin-top: 48px; }
/* The inner box is what moves and zooms, so focus and film playback never sit on a fixed element GSAP has to measure. */
.win-in { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.tab {
  align-self: flex-start;
  display: flex; align-items: center; gap: 8px;
  max-width: 100%;
  height: 34px; padding: 0 14px 0 4px;
  position: relative; z-index: 1; margin-bottom: -1px;
  background: var(--plastic-2);
  border: 1px solid var(--ink); border-bottom: 0;
  box-shadow: inset 1px 1px 0 var(--hi);
  touch-action: none;
}
.win.is-active .tab, .win:not(.is-open) .tab {
  background: var(--tab) repeating-linear-gradient(to bottom, transparent 0 3px, rgba(21, 20, 18, .1) 3px 4px);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6);
}
.close {
  display: none; place-items: center; flex: none;
  width: 26px; height: 26px; padding: 0;
}
.close svg { width: 14px; height: 14px; }
.tab-ico { width: 18px; height: 18px; flex: none; }
.tab-title {
  font: 400 16px/1 var(--font-pixel); text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 4px 6px; margin: 0 -6px;
  background: inherit;
}
.tab-title:focus-visible { outline-offset: 0; }
.frame {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--plastic);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel), var(--drop);
}
.pane { min-height: 0; }
.status {
  flex: none;
  padding: 6px 10px;
  font: 400 12px/1.45 var(--font-mono);
  color: var(--ink-2);
  border-top: 1px solid var(--ink);
  box-shadow: inset 0 1px 0 var(--hi);
}

/* IRIS: movie player */
.screen { display: flex; flex-direction: column; background: var(--screen); }
.film { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; background: var(--screen); object-fit: contain; cursor: pointer; }
.transport {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--plastic);
  border-top: 1px solid var(--ink);
  box-shadow: inset 0 1px 0 var(--hi);
}
.t-play {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; min-width: 84px; padding: 0 12px;
  font: 500 13px/1 var(--font-mono); text-transform: uppercase;
}
.t-play svg { width: 16px; height: 16px; }
.t-track {
  flex: 1; height: 14px; position: relative; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 var(--lo);
}
.t-fill {
  position: absolute; inset: 0;
  background: var(--tab);
  border-right: 1px solid var(--ink);
  transform: scaleX(0); transform-origin: left center;
}
.t-time { font: 500 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.notes { padding: 18px 18px 20px; background: var(--paper); font-size: 15px; line-height: 1.6; }
.checks { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.checks svg { width: 18px; height: 18px; margin-top: 3px; }

/* MenuElf: browser */
.toolbar {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ink);
}
.loc-label { font: 500 13px/1 var(--font-mono); text-transform: uppercase; white-space: nowrap; }
.loc {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 34px; padding: 4px 8px;
  font: 400 13px/1.3 var(--font-mono);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel-in);
  overflow-wrap: anywhere;
}
.loc svg { width: 16px; height: 16px; flex: none; }
.loc:hover { background: var(--tab); }
.page { background: var(--paper); padding: 26px 20px 30px; text-align: center; }
.page-h { font: 600 clamp(22px, 2.4vw, 27px)/1.2 var(--font-sans); text-wrap: balance; letter-spacing: -.01em; }
.page hr { border: 0; border-top: 1px solid var(--lo); border-bottom: 1px solid var(--hi); margin: 18px auto 20px; }
.embed { position: relative; max-width: 520px; margin: 0 auto; border: 1px solid var(--ink); background: var(--screen); }
.embed-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  font: 500 14px/1 var(--font-mono); text-transform: uppercase;
}
.embed-play:active { transform: translate(calc(-50% + 1px), calc(-50% + 1px)); }
.embed-play svg { width: 18px; height: 18px; }
.embed-play .len { color: var(--ink-2); }
.is-playing .embed-play { left: auto; top: auto; right: 8px; bottom: 8px; transform: none; min-height: 34px; padding: 0 10px; }
.page-p { text-align: left; max-width: 54ch; margin: 22px auto 0; font-size: 16px; line-height: 1.6; }

/* GenVolVis: console */
.console { display: grid; background: var(--screen); color: var(--on-screen); }
.viewport { position: relative; border-bottom: 1px solid var(--screen-line); }
.viewport .film { object-fit: cover; }
.vp-play {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  font: 500 13px/1 var(--font-mono); text-transform: uppercase;
  color: var(--on-screen); background: var(--screen);
  border: 1px solid var(--on-screen);
  cursor: pointer;
}
.vp-play:hover { background: var(--on-screen); color: var(--screen); }
.vp-play svg { width: 16px; height: 16px; }
.log { padding: 20px 18px 24px; font: 400 14px/1.65 var(--font-mono); }
.log > * + * { margin-top: 12px; }
.log-h { font: 500 15px/1.45 var(--font-mono); color: var(--tab); }
.steps { list-style: none; padding: 0; display: grid; gap: 8px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3ch minmax(0, 1fr); gap: 1ch; }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--tab); }
.steps { counter-reset: step; }
.log-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--on-screen); text-underline-offset: 3px; }
.log-link a:hover { color: var(--tab); }
.log-link svg { width: 16px; height: 16px; }
.console + .status, .win-console .status { color: var(--ink-2); }

/* Experience: list view */
.lv-head {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; column-gap: 12px;
  padding: 5px 12px 5px 52px;
  font: 500 12px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--ink);
  box-shadow: inset 0 -1px 0 var(--lo);
}
.lv { background: var(--paper); }
.lv-group + .lv-group { border-top: 1px solid var(--plastic-2); }
.lv-group summary {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  list-style: none; cursor: pointer;
}
.lv-group summary::-webkit-details-marker { display: none; }
.lv-group summary:hover { background: var(--plastic); }
.lv-group summary:focus-visible { outline-offset: -3px; }
.chev { width: 16px; height: 16px; flex: none; transition: transform .12s steps(2); }
.lv-group[open] > summary .chev { transform: rotate(90deg); }
.fold { width: 18px; height: 18px; flex: none; }
.lv-org { font: 600 15px/1.3 var(--font-sans); }
.lv-rows { list-style: none; padding: 0 0 10px; }
.lv-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px;
  padding: 6px 12px 6px 52px;
  font-size: 15px; line-height: 1.45;
}
.lv-when { font: 400 13px/1.45 var(--font-mono); color: var(--ink-2); }
.lv-what { color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* Contact: alert box */
.alert { padding: 22px 20px 22px; }
.alert-body { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.alert-ico { width: 44px; height: 44px; }
.alert-msg { display: grid; gap: 10px; }
.alert-h { font: 600 18px/1.35 var(--font-sans); text-wrap: pretty; }
.addr {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 4px; padding: 6px 6px 6px 10px;
  font: 400 14px/1.3 var(--font-mono);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel-in);
  overflow-wrap: anywhere;
}
.alert-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* ---------- Dock ---------- */

.dock {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 32px;
}
.dock-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-width: 72px; height: 64px; padding: 6px 4px 5px;
}
.tile:hover { background: var(--hi); }
/* 16 px poster crops shown at exactly 2x, so every pixel stays square. */
.tile-px { width: 32px; height: 32px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--ink); display: block; }
.tile-ico { width: 28px; height: 28px; }
.tile-label { font: 500 12px/1 var(--font-sans); white-space: nowrap; }
.tile.is-open::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 10px; height: 4px; margin-left: -5px;
  background: var(--ink);
}

/* ---------- Zoom rectangles drawn between a file and its window ---------- */

.zoomrect { position: fixed; z-index: 3000; pointer-events: none; border: 2px dotted var(--on-desk); }

/* ---------- Scrollbars inside windows ---------- */

.pane::-webkit-scrollbar, .notes::-webkit-scrollbar, .log::-webkit-scrollbar { width: 16px; height: 16px; }
.pane::-webkit-scrollbar-track, .notes::-webkit-scrollbar-track, .log::-webkit-scrollbar-track {
  background: repeating-conic-gradient(var(--plastic-2) 0 25%, var(--plastic) 0 50%) 0 0 / 4px 4px;
  border-left: 1px solid var(--ink);
}
.pane::-webkit-scrollbar-thumb, .notes::-webkit-scrollbar-thumb, .log::-webkit-scrollbar-thumb {
  background: var(--plastic);
  border: 1px solid var(--ink);
  box-shadow: var(--bevel);
}
@supports not selector(::-webkit-scrollbar) {
  .pane, .notes, .log { scrollbar-color: var(--lo) var(--plastic-2); }
}

/* ---------- No script: one long, readable document ---------- */

html:not(.js) .win { max-width: 820px; }
html:not(.js) .desk { max-width: 860px; margin-inline: auto; }
html:not(.js) .dock { max-width: 860px; margin-inline: auto; }

/* ---------- Script on, handheld mode ---------- */

@media not all and (min-width: 960px) and (min-height: 600px) {
  .menu-wide { display: none; }
  .js .desk { padding-bottom: calc(var(--dock-h) + 40px + env(safe-area-inset-bottom, 0px)); }
  .js .win { display: none; }
  .js .win.is-open {
    display: flex;
    position: fixed; z-index: 50;
    left: 0; right: 0; top: 0;
    bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
    margin: 0;
  }
  .js .win.is-open .win-in {
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background: var(--desk);
  }
  .js .win.is-open :is(.toolbar, .transport, .status, .notes, .log, .alert) { padding-left: 16px; padding-right: 16px; }
  .js .win.is-open .lv-group summary { padding-left: 16px; padding-right: 16px; }
  .js .win.is-open .lv-row { padding-left: 40px; padding-right: 16px; }
  .js .win.is-open .tab {
    align-self: stretch;
    height: 52px; padding: 0 12px 0 6px;
    border-left: 0; border-right: 0;
  }
  .js .win.is-open .tab::after {
    content: ""; margin-left: auto; flex: none;
    width: 36px; height: 8px;
    border-block: 2px solid var(--ink);
  }
  .js .win.is-open .tab-title { font-size: 16px; }
  .js .close { display: grid; width: 40px; height: 40px; }
  .js .close svg { width: 16px; height: 16px; }
  .js .win.is-open .frame { flex: 1; border-left: 0; border-right: 0; box-shadow: var(--bevel); }
  .js .win.is-open .pane { flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .js .win.is-open .player { background: var(--paper); }
  .js .win.is-open .alert { display: flex; flex-direction: column; justify-content: center; }
  .js.sheet-open, .js.sheet-open body { overflow: hidden; }

  .js .dock {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: var(--plastic);
    border-top: 1px solid var(--ink);
    box-shadow: inset 0 1px 0 var(--hi);
  }
  /* All seven items, each tile as wide as its label needs, together filling the row. */
  .js .dock-list { display: flex; flex-wrap: nowrap; gap: 3px; }
  .js .dock-list li { flex: 1 1 auto; min-width: 0; }
  .js .tile { width: 100%; min-width: 0; height: 60px; padding: 5px 1px 4px; gap: 5px; overflow: hidden; }
  .js .tile-ico { width: 28px; height: 28px; }
  .js .tile-label { font-size: 11px; }
  .js .tile.is-open { background: var(--tab); }
  .js .tile.is-open::after { display: none; }
}

@media (max-width: 380px) {
  .clock-place { display: none; }
  .file { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .js .dock-list { gap: 3px; }
  .js .tile { padding-inline: 1px; }
  .js .tile-label { font-size: 10px; }
}
@media (max-width: 340px) {
  .js .tile { height: 48px; }
  .js .tile-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (min-width: 640px) {
  .lv-row { grid-template-columns: minmax(0, 1fr) 8.5rem; column-gap: 12px; }
  .lv-what { grid-column: 1 / -1; }
  .player { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .screen { justify-content: space-between; }
  .film { flex: 1; min-height: 0; }
  .console { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "log view"; }
  .viewport { grid-area: view; border-bottom: 0; border-left: 1px solid var(--screen-line); }
  .viewport .film { height: 100%; aspect-ratio: auto; min-height: 240px; }
  .log { grid-area: log; }
}
@media (max-width: 639px) {
  .lv-head { display: none; }
  .lv-row { padding-left: 36px; }
  .alert-actions .btn { flex: 1 1 auto; }
  .alert-actions .btn-default { order: -1; margin: 0 4px 0 0; }
}

/* ---------- Script on, desktop mode ---------- */

@media (min-width: 960px) and (min-height: 600px) {
  .js, .js body { height: 100%; overflow: hidden; }
  .js .os { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .js .desk { padding: 0; overflow: hidden; }
  /* Every item lives in the one row of files along the bottom, so the dock is for phones only. */
  .js .dock { display: none; }

  .js .hello { position: absolute; left: 40px; top: 30px; right: 32px; gap: 12px; pointer-events: none; }
  .js .hello > * { pointer-events: auto; }
  /* As large as the desk allows: the width, or the height left over once the text and the files fit. */
  .js .name { font-size: clamp(64px, min(24vw, calc((100vh - 450px) * .55)), 260px); margin-bottom: 14px; }
  .js .lead { font-size: clamp(22px, 1.9vw, 28px); max-width: none; }
  .js .sub { font-size: 18px; max-width: none; }
  .js .meta { flex-direction: row; flex-wrap: wrap; column-gap: 3ch; font-size: 13px; margin-top: 2px; }

  .js .files {
    position: absolute; left: 32px; bottom: 22px; right: 32px;
    margin: 0;
    display: flex; align-items: flex-start; gap: 18px;
  }
  .js .files-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; border: 0; }
  .js .files-list, .js .files-more {
    display: flex; align-items: flex-start; gap: 18px; margin: 0; min-width: 0;
    background: none; border: 0; box-shadow: none;
  }
  /* Seven equal slots in one row: three films, then Experience, Contact, GitHub and LinkedIn. */
  .js .files-proj { flex: 3 1 0; max-width: calc(3 * 176px + 2 * 18px); }
  .js .files-more { flex: 4 1 0; max-width: calc(4 * 176px + 3 * 18px); }
  .js .files-list li { flex: 1 1 0; min-width: 0; max-width: 176px; }
  .js .files-list li + li, .js .files-list.files-more li { border: 0; }
  .js .file {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    width: 100%; padding: 6px 4px;
    text-align: center;
  }
  .js .file:hover, .js .file:active { background: none; }
  .js .file-thumb { width: min(136px, 100%); box-shadow: var(--drop); }
  .js .files-more .file-thumb { width: min(136px, 100%); height: auto; aspect-ratio: 16 / 9; box-shadow: none; }
  .js .glyph { width: 56px; height: 56px; color: var(--on-desk); }
  .js .file-text { padding: 3px 7px 5px; background: var(--paper); gap: 2px; max-width: 100%; }
  .js .files-more .file-info { display: block; }
  .js .file-info { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
  .js .file:hover .file-text, .js .file:focus-visible .file-text { background: var(--tab); }
  .js .file:focus-visible { outline-color: var(--on-desk); outline-offset: 2px; }
  /* An open window greys out its file with a dither, the way old desktops marked an opened icon. */
  .js .file.is-open .file-thumb::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-conic-gradient(rgba(21, 20, 18, .55) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  }

  .js .win {
    display: none;
    position: absolute; left: 0; top: 0; margin: 0;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }
  .js .win.is-open { display: flex; }
  .js .close { display: grid; }
  .js .tab { cursor: grab; }
  .js .tab:active { cursor: grabbing; }
  .js .frame { flex: 1 1 auto; }
  .js .pane { flex: 1 1 auto; overflow: auto; }
  .js .win-player { width: 900px; }
  .js .player { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .js .win-browser { width: 640px; }
  .js .win-console { width: 780px; }
  .js .win-list { width: 620px; }
  .js .win-alert { width: 500px; }
  .js .player { overflow: hidden; }
  .js .notes, .js .log { overflow: auto; }
}

@media (min-width: 960px) and (min-height: 600px) and (max-width: 1180px) {
  .js .files, .js .files-list, .js .files-more { gap: 10px; }
  .js .files-proj { max-width: calc(3 * 176px + 2 * 10px); }
  .js .files-more { max-width: calc(4 * 176px + 3 * 10px); }
  .js .glyph { width: 48px; height: 48px; }
}

/* ---------- Reduced motion: final states, no blinking ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
