/* Old Window View: the whole portfolio as a late 90s desktop. Everything here is scoped to
   .w98 so the site's own styles stay as they are. A homage to the era's desktops in general:
   no real company's logo or name appears. */
.w98 {
  --w-face: #C0C0C0;
  --w-light: #FFFFFF;
  --w-mid: #DFDFDF;
  --w-shadow: #808080;
  --w-dark: #0A0A0A;
  --w-title: #000080;
  --w-title-2: #1084D0;
  --w-title-off: #808080;
  --w-desk: #2F7F7A;
  --w-select: #000080;
  --w-font: Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--w-desk);
  color: #000;
  font: 12px/1.35 var(--w-font);
  overflow: hidden;
}
.w98 *, .w98 *::before, .w98 *::after { box-sizing: border-box; }
.w98 button { font: inherit; color: inherit; }

/* raised and sunken edges, the era's two bevels */
.w98-raised { background: var(--w-face); box-shadow: inset -1px -1px var(--w-dark), inset 1px 1px var(--w-light), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-mid); }
.w98-sunken { background: #FFF; box-shadow: inset -1px -1px var(--w-light), inset 1px 1px var(--w-shadow), inset -2px -2px var(--w-mid), inset 2px 2px var(--w-dark); }

/* the desktop */
.w98-desk { position: fixed; inset: 0 0 32px 0; overflow: hidden; }
.w98-icons { position: absolute; top: 12px; left: 8px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 86px); gap: 6px 10px; height: calc(100% - 24px); align-content: start; }
.w98-icon { width: 84px; padding: 4px 2px; border: 1px dotted transparent; background: none; display: grid; justify-items: center; gap: 4px; color: #FFF; text-align: center; cursor: pointer; }
.w98-icon span { padding: 0 2px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); line-height: 1.2; }
.w98-icon:focus-visible, .w98-icon.is-picked { border-color: #FFF; outline: none; }
.w98-icon.is-picked span { background: var(--w-select); text-shadow: none; }
.w98-glyph { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }

/* windows */
.w98-win { position: absolute; display: flex; flex-direction: column; min-width: 240px; max-width: calc(100vw - 16px); max-height: calc(100% - 16px); padding: 3px; }
.w98-win[hidden] { display: none; }
.w98-win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; max-height: none; }
.w98-bar { display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 2px 0 4px; color: #FFF; background: linear-gradient(90deg, var(--w-title), var(--w-title-2)); font-weight: 700; cursor: move; user-select: none; touch-action: none; }
.w98-win:not(.is-active) .w98-bar { background: linear-gradient(90deg, var(--w-title-off), #B5B5B5); color: #DFDFDF; }
.w98-bar .w98-glyph { width: 16px; height: 16px; }
.w98-bar-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w98-btn { width: 18px; height: 16px; padding: 0; border: 0; display: grid; place-items: center; cursor: pointer; font: 700 11px/1 var(--w-font); color: #000; }
.w98-btn:active { box-shadow: inset 1px 1px var(--w-dark), inset -1px -1px var(--w-light), inset 2px 2px var(--w-shadow), inset -2px -2px var(--w-mid); }
.w98-menu { display: flex; gap: 12px; padding: 3px 6px; }
.w98-menu span::first-letter { text-decoration: underline; }
.w98-body { flex: 1; min-height: 0; overflow: auto; margin-top: 2px; padding: 10px; }
.w98-status { margin-top: 2px; padding: 2px 6px; font-size: 11px; color: #222; }

/* a folder: files as icons on white */
.w98-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px 6px; align-content: start; }
.w98-file { border: 1px dotted transparent; background: none; padding: 4px 2px; display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer; line-height: 1.2; }
.w98-file:focus-visible, .w98-file:hover { border-color: var(--w-select); outline: none; }
.w98-file span { overflow-wrap: anywhere; }

/* a document */
.w98-doc { display: grid; gap: 10px; max-width: 640px; }
.w98-doc h2 { margin: 0; font: 700 18px/1.2 var(--w-font); }
.w98-doc .w98-meta { margin: 0; color: #444; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.w98-doc p { margin: 0; }
.w98-doc ul { margin: 0; padding-left: 18px; }
.w98-pic { border: 0; padding: 2px; }
.w98-pic .frame { border: 0; }
.w98-pic img, .w98-photo { display: block; width: 100%; height: auto; }
.w98-push { justify-self: start; display: inline-block; padding: 5px 14px; color: #000; text-decoration: none; cursor: pointer; border: 0; }
.w98-push:active { box-shadow: inset 1px 1px var(--w-dark), inset -1px -1px var(--w-light), inset 2px 2px var(--w-shadow), inset -2px -2px var(--w-mid); }
.w98-push:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.w98-note { font-family: "Courier New", ui-monospace, monospace; white-space: pre-wrap; margin: 0; padding: 8px; line-height: 1.45; }

/* PixelVault, the pixel tool, running in a window */
.w98-pv { display: grid; gap: 10px; }
.w98-pv-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.w98-pv-out { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w98-pv-out figure { margin: 0; display: grid; gap: 4px; }
.w98-pv-out canvas, .w98-pv-out img { width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; display: block; }
.w98-pv-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.w98-pv-thumbs button { width: 56px; height: 42px; padding: 2px; border: 0; cursor: pointer; }
.w98-pv-thumbs button[aria-pressed="true"] { outline: 2px solid var(--w-select); }
.w98-pv-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w98-pv-real { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.w98-pv-real figure { margin: 0; display: grid; gap: 3px; font-size: 11px; }
.w98-pv-real img { width: 100%; height: auto; display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; }

/* the taskbar, with the red home box */
.w98-tasks { position: fixed; left: 0; right: 0; bottom: 0; height: 32px; display: flex; align-items: center; gap: 4px; padding: 3px 3px 3px 3px; z-index: 9000; }
.w98-start { height: 24px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 4px; border: 0; cursor: pointer; font-weight: 700; color: #FFF; background: #D81E1E; box-shadow: inset -1px -1px var(--w-dark), inset 1px 1px #FF8C8C, inset -2px -2px #8E1010, inset 2px 2px #F25757; }
.w98-start[aria-expanded="true"] { box-shadow: inset 1px 1px var(--w-dark), inset -1px -1px #FF8C8C, inset 2px 2px #8E1010; }
.w98-start .w98-glyph { width: 16px; height: 16px; }
.w98-taskbtns { flex: 1; min-width: 0; display: flex; gap: 3px; overflow: hidden; }
.w98-task { flex: 0 1 160px; min-width: 40px; height: 24px; padding: 0 6px; border: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.w98-task.is-active { box-shadow: inset 1px 1px var(--w-dark), inset -1px -1px var(--w-light), inset 2px 2px var(--w-shadow); background: #E4E4E4; font-weight: 700; }
.w98-clock { height: 24px; padding: 0 10px; display: grid; place-items: center; }
.w98-startmenu { position: fixed; left: 3px; bottom: 30px; width: 230px; padding: 3px; display: flex; z-index: 9100; }
.w98-startmenu[hidden] { display: none; }
.w98-startmenu-side { width: 24px; background: linear-gradient(0deg, #8E1010, #D81E1E); color: #FFF; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; padding: 8px 0; text-align: right; letter-spacing: .04em; }
.w98-startmenu ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.w98-startmenu li button, .w98-startmenu li a { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: none; color: #000; text-decoration: none; cursor: pointer; text-align: left; }
.w98-startmenu li button:hover, .w98-startmenu li a:hover, .w98-startmenu li button:focus-visible, .w98-startmenu li a:focus-visible { background: var(--w-select); color: #FFF; outline: none; }
.w98-startmenu hr { border: 0; border-top: 1px solid var(--w-shadow); border-bottom: 1px solid var(--w-light); margin: 3px 2px; }

/* the way back, in the portfolio's own style */
.w98-return { position: fixed; top: 12px; right: 12px; z-index: 9200; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  border: 2px solid #111; background: #FFF; color: #111; text-decoration: none;
  font: 500 .8125rem/1 "DM Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.w98-return:hover, .w98-return:focus-visible { background: #D81E1E; color: #FFF; outline: none; }

/* boot */
.w98-boot { position: fixed; inset: 0; z-index: 9500; background: #000; color: #C0C0C0; display: grid; place-items: center; cursor: pointer;
  font: 16px/1.5 "Courier New", ui-monospace, monospace; }
.w98-boot[hidden] { display: none; }
.w98-boot-in { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px; }
.w98-boot .w98-glyph { width: 64px; height: 64px; }
.w98-boot-bar { width: 220px; height: 14px; border: 2px solid #C0C0C0; padding: 2px; }
.w98-boot-bar i { display: block; height: 100%; width: 0; background: #2F9E4F; }
@media (prefers-reduced-motion: no-preference) {
  .w98-boot-bar i { animation: w98-load 1.2s steps(12) forwards; }
}
@keyframes w98-load { to { width: 100%; } }

/* phone: one window at a time, full width, no dragging */
@media (max-width: 700px) {
  .w98-icons { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-template-rows: none; height: auto; right: 8px; top: 66px; }
  .w98-icon { width: auto; }
  .w98-win { left: 4px !important; right: 4px; top: 60px !important; width: auto !important; height: calc(100% - 68px) !important; }
  .w98-bar { cursor: default; }
  .w98-pv-out { grid-template-columns: 1fr; }
  .w98-return { top: 8px; right: 8px; min-height: 40px; padding: 0 .8rem; }
  .w98-task { flex-basis: 90px; }
}
