/* ==========================================================================
   Riley's Desktop: a classic-Mac-style portfolio
   Palette: charcoal · olive · paper (+ the orange "safelight" accent)
   Type: Fraunces (display) · Archivo (interface) · DM Mono (details)
   ========================================================================== */

:root {
  --charcoal: #1f201c;
  --charcoal-2: #2a2b26;
  --olive: #5c6337;
  --olive-deep: #434927;
  --olive-light: #9aa06c;
  --paper: #ede7d9;
  --paper-2: #e3dbca;
  --paper-3: #d6cdb8;
  --cream: #f5f0e5;
  --rule: #cdc3ac;
  --orange: #c65a2e;
  --ink-soft: #4b4c43;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, Menlo, monospace;

  --menubar-h: 46px;   /* same height as the page view's top bar */
  --bar-h: 28px;
  --radius: 7px;
  --hard: 3px 3px 0 var(--charcoal);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --sprocket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='10'%3E%3Crect x='7' y='.5' width='8' height='9' rx='1.8'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Desktop colors: visitors can switch these under View */
html[data-wallpaper="olive"]    { --desk: #434927; --desk-dot: rgba(245, 240, 229, .085); --desk-ink: #f5f0e5; --desk-soft: #c9cca2; }
html[data-wallpaper="charcoal"] { --desk: #1f201c; --desk-dot: rgba(245, 240, 229, .07);  --desk-ink: #f5f0e5; --desk-soft: #a8ad7c; }
html[data-wallpaper="paper"]    { --desk: #e3dbca; --desk-dot: rgba(31, 32, 28, .1);      --desk-ink: #1f201c; --desk-soft: #5c6337; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--desk);
  color: var(--charcoal);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
::selection { background: var(--olive); color: var(--cream); }

.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; z-index: 3000; top: 6px; left: 6px;
  padding: 8px 12px; background: var(--charcoal); color: var(--cream);
  font: 600 13px var(--f-ui); text-decoration: none; border-radius: 4px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.mono { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Startup screen ---------- */
.boot { display: none; }
.is-booting .boot {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background-color: var(--desk);
  background-image: radial-gradient(var(--desk-dot) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  transition: opacity .35s ease;
}
.boot.is-done { opacity: 0; pointer-events: none; }
.boot__box {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 44px 30px;
  background: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: 10px;
  box-shadow: var(--hard), 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.boot__icon svg { width: 96px; animation: bob 1.6s ease-in-out infinite alternate; }
.boot__title { font: 600 15px var(--f-ui); }
.boot__bar {
  width: 210px;
  height: 12px;
  overflow: hidden;
  border: 1.5px solid var(--charcoal);
  border-radius: 3px;
  background: var(--paper-2);
}
.boot__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-45deg, var(--olive) 0 6px, var(--olive-deep) 6px 12px);
  animation: boot-load 1.05s var(--ease) forwards;
}
@keyframes boot-load { to { width: 100%; } }

/* ---------- Menu bar ---------- */
.menubar {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  /* on edge-to-edge phone screens the bar grows to clear the status bar; elsewhere the inset is 0 */
  height: calc(var(--menubar-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  /* menus | the Desktop/Page switch, centered | clock */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  /* lines the name and clock up with the page view's top bar */
  padding-inline: clamp(2px, calc(3vw - 10px), 14px);
  background: var(--cream);
  border-bottom: 1.5px solid var(--charcoal);
  font: 600 13.5px/1 var(--f-ui);
  font-stretch: 94%;
  user-select: none;
}
.menubar__menus { display: flex; align-items: stretch; gap: 2px; }
.menubar__menus > li { position: relative; display: flex; align-items: center; }
.menubar__title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.menubar__title--app { font-weight: 800; }
.menubar__title[aria-expanded="true"],
.menubar__title:hover { background: var(--charcoal); color: var(--cream); }
.menubar__title:focus-visible { outline-offset: -3px; }
.menubar__menus { justify-self: start; }
.menubar__center { display: flex; align-items: center; padding-inline: 12px; }
.menubar__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: 10px;
}
.menubar__clock { display: flex; gap: 6px; align-items: baseline; font-variant-numeric: tabular-nums; }

/* Desktop ⇄ Page switch, centered in the menu bar here and in the page view's top bar */
.viewtoggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--paper-2);
  border: 1.5px solid var(--charcoal);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--charcoal);
}
.viewtoggle__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px;
  border-radius: 6px;
  color: var(--charcoal);
  font: 700 12.5px/1.2 var(--f-ui);
  font-stretch: 94%;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.viewtoggle__opt svg { width: 15px; height: 15px; }
.viewtoggle__opt[aria-current="page"] { background: var(--charcoal); color: var(--cream); }
.viewtoggle__opt:not([aria-current]):hover { background: var(--cream); }
.viewtoggle__opt:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.viewtoggle.is-hinting { animation: toggle-hint 1.1s ease-out 2; }
@keyframes toggle-hint {
  from { box-shadow: 2px 2px 0 var(--charcoal), 0 0 0 0 rgba(198, 90, 46, .6); }
  to   { box-shadow: 2px 2px 0 var(--charcoal), 0 0 0 12px rgba(198, 90, 46, 0); }
}
.menubar__clock small { font: 500 10.5px var(--f-mono); letter-spacing: .1em; color: var(--olive); }

.menu {
  position: absolute;
  top: calc(100% + 1.5px);
  left: 0;
  min-width: 220px;
  padding: 5px 0;
  background: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: 0 0 6px 6px;
  box-shadow: var(--hard);
  font: 500 13.5px/1.2 var(--f-ui);
  font-stretch: 96%;
}
.menu[hidden] { display: none; }
.menu__item {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 6px 18px 6px 26px;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
}
.menu__item:hover,
.menu__item:focus-visible { background: var(--charcoal); color: var(--cream); outline: none; }
.menu__item[aria-checked="true"]::before { content: "✓"; position: absolute; left: 9px; }
.menu__item[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.menu__item kbd { font: 500 11px var(--f-mono); opacity: .6; }
.menu__item--indent { padding-left: 40px; font-weight: 450; }
.menu__sep { height: 0; margin: 5px 0; border-top: 1.5px dotted rgba(31, 32, 28, .35); }
.menu__label { padding: 6px 18px 4px 26px; font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }

/* ---------- Desktop ---------- */
.desktop {
  position: fixed;
  inset: calc(var(--menubar-h) + env(safe-area-inset-top, 0px)) 0 0;
  overflow: hidden;
  background-color: var(--desk);
  background-image:
    radial-gradient(130% 100% at 50% 35%, transparent 55%, rgba(0, 0, 0, .16)),
    radial-gradient(var(--desk-dot) 1.2px, transparent 1.6px);
  background-size: auto, 22px 22px;
  transition: background-color .4s ease;
}

.hero {
  position: absolute;
  z-index: 1;
  top: 46%;
  left: var(--hero-x, calc(50% + 250px));
  translate: -50% -50%;
  width: max-content;
  max-width: 60vw;
  text-align: center;
  color: var(--desk-ink);
  pointer-events: none;
  user-select: none;
}
.hero__name {
  font-family: var(--f-display);
  font-size: var(--hero-size, clamp(3.2rem, 6.4vw, 7.4rem));
  font-weight: 380;
  line-height: .9;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 60, "WONK" 0;
}
.hero__role {
  margin-top: 18px;
  font: 500 12px var(--f-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--desk-soft);
}
.hero__hint {
  margin-top: 10px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  color: var(--desk-soft);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

/* Desktop icons: columns down the right edge, like the classic Finder.
   the rightmost is you (About, Résumé, Film, Contact, Trash), the next one in is your work */
.icons {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 8px;
  bottom: 12px;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
}
.icons__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 104px;
}
.icons__heading { display: none; }
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100px;
  padding: 7px 4px 6px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.icon__img { position: relative; }
.icon__img svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .28));
  transition: transform .18s var(--ease);
}
.icon:hover .icon__img svg { transform: translateY(-2px); }
.icon__label {
  max-width: 100%;
  padding: 1px 6px 2px;
  border-radius: 3px;
  background: var(--cream);
  color: var(--charcoal);
  font: 600 12.5px/1.3 var(--f-ui);
  font-stretch: 92%;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.icon.is-selected .icon__img svg { filter: brightness(.62) drop-shadow(0 3px 3px rgba(0, 0, 0, .28)); }
.icon.is-selected .icon__label { background: var(--charcoal); color: var(--cream); }
/* Classic Mac: an icon whose window is open shows as "hollow" */
.icon.is-open .icon__img::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, rgba(31, 32, 28, .38) 0 1.5px, transparent 1.5px 4px);
  pointer-events: none;
}
.icon--trash { margin-top: auto; }

/* ---------- Floating things ---------- */
.things { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.thing {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.thing.is-dragging { cursor: grabbing; z-index: 4; }
.thing.is-tidying { transition: transform .7s var(--ease); }
.thing__float {
  position: relative;
  z-index: 1;
  display: block;
  rotate: var(--tilt, 0deg);
  animation: bob var(--bob, 6s) ease-in-out var(--delay, 0s) infinite alternate;
}
.thing.is-dragging .thing__float { animation-play-state: paused; }
.thing svg {
  width: var(--w);
  height: auto;
  /* sticker outline + a soft shadow so the toys lift off the desktop */
  filter:
    drop-shadow(2px 0 0 var(--cream)) drop-shadow(-2px 0 0 var(--cream))
    drop-shadow(0 2px 0 var(--cream)) drop-shadow(0 -2px 0 var(--cream))
    drop-shadow(0 12px 12px rgba(0, 0, 0, .3));
  transition: scale .2s var(--ease);
}
.thing:hover .thing__float > svg, .thing:focus-visible .thing__float > svg { scale: 1.04; }
.thing.is-dragging .thing__float > svg { scale: 1.08; }
.thing:focus-visible { outline: none; }
.thing:focus-visible .thing__float { outline: 2px dashed var(--orange); outline-offset: 6px; border-radius: 8px; }
@keyframes bob {
  from { translate: 0 -5px; }
  to   { translate: 0 6px; }
}

@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* ---------- Toy effects: click a toy (js/shared.js → playToy) ---------- */
/* An extra drawing layer sitting exactly on the toy, for smoke, flashes and speed lines */
.thing__float .fx-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: none;
}
@keyframes fx-rumble {
  25% { translate: .6px -.7px; }
  75% { translate: -.6px .5px; }
}

/* Café racer: engine rumble + exhaust smoke */
[data-thing="caferacer"].is-playing .thing__float > svg { animation: fx-rumble .09s linear 26; }
.fx-puff {
  fill: #ece7da;
  transform-box: fill-box;
  transform-origin: center;
  animation: fx-puff var(--life, 1.2s) cubic-bezier(.2, .6, .35, 1) forwards;
}
.fx-puff--dark { fill: #c9c2b2; }
@keyframes fx-puff {
  0%   { translate: 0 0; scale: .45; opacity: 0; }
  10%  { opacity: .92; }
  100% { translate: var(--dx) var(--dy); scale: var(--s); opacity: 0; }
}

/* 911: the wheels spin up and back down, speed lines stream off the back */
.fx-wheel { transform-box: fill-box; transform-origin: center; }
[data-thing="porsche"].is-playing .fx-wheel { animation: fx-wheel 2.6s cubic-bezier(.45, .05, .3, 1); }
[data-thing="porsche"].is-playing .thing__float > svg { animation: fx-rumble .1s linear 24; }
@keyframes fx-wheel { to { rotate: 1800deg; } }
.fx-speed {
  fill: none;
  stroke: var(--cream);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 110 250;
  animation: fx-speed .42s linear infinite, fx-fade 2.6s ease both;
}
@keyframes fx-speed { to { stroke-dashoffset: -360; } }
@keyframes fx-fade {
  0%, 100% { opacity: 0; }
  12%, 78% { opacity: .95; }
}

/* Camera: flash, a little recoil, then the lamp blinks */
[data-thing="camera"].is-playing .thing__float > svg { animation: fx-snap .4s var(--ease); }
[data-thing="camera"].is-playing .fx-flash { animation: fx-flash-window .7s ease-out; }
[data-thing="camera"].is-playing .fx-lamp { animation: fx-lamp .3s steps(1) .55s 3; }
.fx-glow, .fx-rays { transform-box: fill-box; transform-origin: center; }
.fx-glow { animation: fx-glow .8s cubic-bezier(.2, .7, .3, 1) forwards; }
.fx-rays {
  fill: none;
  stroke: #fffdf3;
  stroke-width: 4.6;
  stroke-linecap: round;
  animation: fx-rays .6s cubic-bezier(.2, .7, .3, 1) forwards;
}
.fx-screenflash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #fffdf6;
  pointer-events: none;
  animation: fx-screenflash .45s ease-out forwards;
}
@keyframes fx-snap { 25% { scale: .93; } }
@keyframes fx-flash-window { 0%, 35% { fill: #fff; } }
@keyframes fx-lamp { 0% { fill: #ffd27a; } 50% { fill: var(--orange); } }
@keyframes fx-glow {
  0%   { scale: .15; opacity: 1; }
  30%  { scale: .8; opacity: 1; }
  100% { scale: 1.1; opacity: 0; }
}
@keyframes fx-rays {
  0%   { scale: .55; opacity: 1; }
  40%  { opacity: 1; }
  100% { scale: 1.45; opacity: 0; }
}
@keyframes fx-screenflash {
  0%, 15% { opacity: .38; }
  100%    { opacity: 0; }
}

/* Surfboard: a wave rises under it and it rides toward the roomier side (--dir: 1 or -1) */
.fx-wave {
  position: absolute;
  z-index: 0;
  left: calc(var(--w) * -3.3);
  top: calc(var(--w) * -0.21);
  width: calc(var(--w) * 6);
  pointer-events: none;
  transform-origin: 63.3% 100%;
  animation: fx-wave 3.4s cubic-bezier(.45, 0, .55, 1) both;
}
.fx-wave .fx-wave__art {
  display: block;
  width: 100%;
  height: auto;
  scale: var(--dir, 1) 1;
  transform-origin: 63.3% 50%;
  filter:
    drop-shadow(2px 0 0 var(--cream)) drop-shadow(-2px 0 0 var(--cream))
    drop-shadow(0 2px 0 var(--cream)) drop-shadow(0 -2px 0 var(--cream))
    drop-shadow(0 12px 12px rgba(0, 0, 0, .3));
}
.fx-spray circle { transform-box: fill-box; transform-origin: center; animation: fx-spray .7s ease-out infinite; }
.fx-spray circle:nth-child(2) { animation-delay: .23s; }
.fx-spray circle:nth-child(3) { animation-delay: .46s; }
[data-thing="surfboard"].is-playing .thing__float {
  animation:
    bob var(--bob, 6s) ease-in-out var(--delay, 0s) infinite alternate,
    fx-ride 3.4s cubic-bezier(.45, 0, .55, 1) both;
}
@keyframes fx-ride {
  0%   { translate: 0 0; rotate: var(--tilt, 0deg); }
  12%  { translate: calc(var(--dir, 1) * var(--w) * -0.2) calc(var(--w) * 0.25); rotate: calc(var(--dir, 1) * 100deg); }
  28%  { translate: calc(var(--dir, 1) * var(--w) * 0.35) calc(var(--w) * 0.5); rotate: calc(var(--dir, 1) * 108deg); }
  44%  { translate: calc(var(--dir, 1) * var(--w) * 0.8) calc(var(--w) * 0.55); rotate: calc(var(--dir, 1) * 76deg); }
  60%  { translate: calc(var(--dir, 1) * var(--w) * 1.1) calc(var(--w) * 0.15); rotate: calc(var(--dir, 1) * 84deg); }
  76%  { translate: calc(var(--dir, 1) * var(--w) * 1.5) calc(var(--w) * 0.4); rotate: calc(var(--dir, 1) * 102deg); }
  88%  { translate: calc(var(--dir, 1) * var(--w) * 1.4) calc(var(--w) * -0.2); rotate: calc(var(--dir, 1) * 60deg); }
  100% { translate: 0 0; rotate: var(--tilt, 0deg); }
}
@keyframes fx-wave {
  0%   { scale: 1 0; translate: 0 0; opacity: 1; }
  12%  { scale: 1 1; translate: 0 0; }
  88%  { scale: 1 1; translate: calc(var(--dir, 1) * var(--w) * 1.4) 0; opacity: 1; }
  100% { scale: 1 .1; translate: calc(var(--dir, 1) * var(--w) * 1.5) 0; opacity: 0; }
}
@keyframes fx-spray {
  from { translate: 0 0; opacity: 1; }
  to   { translate: 10px -16px; opacity: 0; }
}

/* Ball on the page view: a keepy-uppy (on the desktop it's kicked for real) */
[data-thing="soccer"].is-playing .thing__float { animation: fx-hop 1s cubic-bezier(.3, .7, .4, 1); }
@keyframes fx-hop {
  0%   { translate: 0 0; rotate: 0deg; }
  35%  { translate: 0 -48px; rotate: 220deg; }
  62%  { translate: 0 0; rotate: 360deg; }
  78%  { translate: 0 -12px; rotate: 380deg; }
  100% { translate: 0 0; rotate: 360deg; }
}

/* ---------- Windows ---------- */
.windows { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.win {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 120px;
  overflow: hidden;
  background: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 rgba(31, 32, 28, .45), 0 16px 34px -20px rgba(0, 0, 0, .45);
  pointer-events: auto;
  transform-origin: 50% 30%;
}
.win.is-active { box-shadow: var(--hard), 0 26px 56px -22px rgba(0, 0, 0, .55); }
.win.is-opening { opacity: 0; scale: .97; }
.win.is-shown { transition: opacity .16s ease, scale .2s var(--ease); }
.win.is-closing { opacity: 0; scale: .97; transition: opacity .14s ease, scale .14s ease; pointer-events: none; }
.win.is-animating { transition: transform .24s var(--ease), width .24s var(--ease), height .24s var(--ease); }
.win.is-pulse { animation: win-pulse .32s var(--ease); }
@keyframes win-pulse { 40% { scale: 1.012; } }
.win.is-dragging { user-select: none; }

.win__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--bar-h);
  padding-inline: 8px;
  background: var(--paper-2);
  border-bottom: 1.5px solid var(--charcoal);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.win.is-dragging .win__bar { cursor: grabbing; }
.win__stripes {
  flex: 1;
  min-width: 8px;
  height: 13px;
  background: repeating-linear-gradient(to bottom, var(--charcoal) 0 1.5px, transparent 1.5px 3.25px);
  opacity: .5;
}
.win:not(.is-active) .win__stripes { visibility: hidden; }
.win__title {
  max-width: 70%;
  overflow: hidden;
  padding-inline: 6px;
  font: 700 13px/1 var(--f-ui);
  font-stretch: 92%;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.win:not(.is-active) .win__title { color: rgba(31, 32, 28, .5); }
.win__btn {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  background: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: 3px;
  cursor: pointer;
}
.win__btn::before, .win__btn::after { content: ""; position: absolute; }
.win__close:hover::before, .win__close:hover::after,
.win__close:focus-visible::before, .win__close:focus-visible::after {
  left: 2px; right: 2px; top: 5.25px; height: 1.5px; background: var(--charcoal);
}
.win__close:hover::before, .win__close:focus-visible::before { transform: rotate(45deg); }
.win__close:hover::after, .win__close:focus-visible::after { transform: rotate(-45deg); }
.win__zoom::before { inset: 0 4.5px 4.5px 0; border-right: 1.5px solid var(--charcoal); border-bottom: 1.5px solid var(--charcoal); }
.win__shade::before { left: 0; right: 0; top: 4px; border-top: 1.5px solid var(--charcoal); }
.win__btn:active { background: var(--charcoal); }
.win:not(.is-active) .win__btn { opacity: .25; }

.win__toolbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 6px 12px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--charcoal);
  font: 500 12.5px var(--f-ui);
}
.win__toolbar .meta {
  min-width: 0;
  overflow: hidden;
  font: 500 11px var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
}
.win__toolbar .seg { flex: none; }
.toolbar-actions { display: flex; gap: 8px; }

.win__body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  container-type: inline-size;
  container-name: win;
}
.win__body:focus { outline: none; }
.win.is-collapsed { height: auto !important; min-height: 0; }
.win.is-collapsed .win__body,
.win.is-collapsed .win__toolbar,
.win.is-collapsed .win__grip { display: none; }
.win.is-collapsed .win__bar { border-bottom: 0; }

.win__grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 50%, var(--charcoal) 50% 56%, transparent 56% 66%, var(--charcoal) 66% 72%, transparent 72% 82%, var(--charcoal) 82% 88%, transparent 88%);
  opacity: .55;
}

/* Chunky classic scrollbars */
.win__body::-webkit-scrollbar { width: 15px; height: 15px; }
.win__body::-webkit-scrollbar-track {
  background: var(--paper-2) radial-gradient(rgba(31, 32, 28, .18) .8px, transparent 1px) 0 0 / 4px 4px;
  border-left: 1.5px solid var(--charcoal);
}
.win__body::-webkit-scrollbar-thumb {
  background: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: 4px;
}
.win__body::-webkit-scrollbar-corner { background: var(--paper-2); }
@supports not selector(::-webkit-scrollbar) {
  .win__body { scrollbar-color: var(--olive) var(--paper-2); }
}

/* Zoom-rect animation (open / close) */
.zoomrects { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.zoomrect {
  position: absolute;
  border: 1.5px solid var(--charcoal);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(245, 240, 229, .5);
}

/* ---------- Shared window content ---------- */
.pad { padding: 26px 28px 32px; }
.eyebrow {
  font: 500 11.5px var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--olive);
}
.display {
  font-family: var(--f-display);
  font-weight: 380;
  letter-spacing: -.025em;
  line-height: 1;
  font-variation-settings: "SOFT" 60, "WONK" 0;
  text-wrap: balance;
}
.display em { color: var(--olive); font-variation-settings: "SOFT" 100, "WONK" 1; }
.lead {
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.35;
  font-variation-settings: "SOFT" 80, "WONK" 0;
  text-wrap: pretty;
}
.prose { display: grid; gap: .9em; color: var(--ink-soft); text-wrap: pretty; }
.prose strong { color: var(--charcoal); }
.prose a, .link { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--olive-light); text-underline-offset: 2px; }
.prose a:hover, .link:hover { text-decoration-color: var(--orange); }
.h3 {
  font: 600 11.5px var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Classic push buttons; the default one gets the thick outer ring */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 16px;
  background: var(--cream);
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
  border-radius: 9px;
  font: 600 13.5px/1 var(--f-ui);
  font-stretch: 94%;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--paper-2); }
.btn:active { background: var(--charcoal); color: var(--cream); }
.btn--default { box-shadow: 0 0 0 2.5px var(--cream), 0 0 0 4px var(--charcoal); margin: 4px; }
.btn--small { min-height: 28px; padding: 4px 12px; font-size: 12.5px; border-radius: 7px; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Group box, like a System 7 dialog panel */
.groupbox {
  position: relative;
  padding: 18px 16px 14px;
  border: 1.5px solid var(--charcoal);
  border-radius: 6px;
}
.groupbox__label {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 0 6px;
  background: var(--cream);
  font: 600 11px var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bullets { display: grid; gap: 6px; }
.bullets li { position: relative; padding-left: 18px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.bullets li.todo::before { display: none; }

/* Key/value facts with dotted leaders */
.facts { display: grid; gap: 2px; }
.facts div {
  display: grid;
  grid-template-columns: auto minmax(16px, 1fr) auto;
  align-items: baseline;
  padding-block: 4px;
}
.facts div::before {
  content: "";
  grid-row: 1;
  grid-column: 2;
  margin-inline: 10px;
  border-bottom: 1.5px dotted var(--rule);
  translate: 0 -4px;
}
.facts dt { grid-row: 1; grid-column: 1; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { grid-row: 1; grid-column: 3; text-align: right; font-weight: 500; }


/* Placeholders that tell you what to write */
.todo {
  padding: 9px 12px;
  border: 1.5px dashed var(--olive-light);
  border-radius: 5px;
  background: rgba(154, 160, 108, .1);
  color: var(--olive);
  font: 500 12.5px/1.55 var(--f-mono);
}
.todo::before { content: "✎ "; color: var(--orange); }
li.todo { list-style: none; }
span.todo { display: inline-block; padding: 3px 9px; }
.todo-inline { display: block; color: var(--olive); font: 500 12px/1.5 var(--f-mono); }
.slot {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 14px;
  border: 1.5px dashed var(--olive-light);
  border-radius: 6px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(154, 160, 108, .1) 10px 11px);
  color: var(--olive);
  font: 500 11.5px/1.5 var(--f-mono);
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.photo {
  overflow: hidden;
  border: 1.5px solid var(--charcoal);
  border-radius: 5px;
  box-shadow: var(--hard);
  background: var(--paper-2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* project photos open full size when tapped */
.photo__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; overflow: hidden; }
.photo__zoom img { transition: scale .35s var(--ease); }
.photo__zoom:hover img { scale: 1.03; }
.photo__zoom:focus-visible { outline: 2px solid var(--orange); outline-offset: -4px; }

/* ---------- About ---------- */
.about { display: grid; gap: 26px; padding: 26px 28px 32px; }
.about__photo { width: 100%; }
/* single column (narrow windows, phones): a shorter crop so the intro stays near the top */
.about__photo .photo { aspect-ratio: 4 / 3; }
.about__photo .photo img { object-position: 50% 48%; }
.about__photo figcaption { margin-top: 12px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.about__main { display: grid; gap: 18px; align-content: start; }
.about__greeting { font-size: clamp(34px, 8cqi, 46px); }
.about__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
/* Work: the company folders, repeated inside the About window */
.about__work { grid-column: 1 / -1; display: grid; gap: 12px; padding-top: 22px; border-top: 1.5px solid var(--charcoal); }
.workrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 6px; }
.workrow__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 6px;
  text-align: center;
  transition: background-color .15s;
}
.workrow__item:hover { background: var(--paper); }
.workrow__item svg { width: 56px; height: 56px; transition: transform .18s var(--ease); }
.workrow__item:hover svg { transform: translateY(-2px); }
.workrow__name { font: 650 13px/1.25 var(--f-ui); font-stretch: 94%; }
.workrow__meta { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

/* Brand colors across the top of a company folder or project window */
.brand-band {
  height: 13px;
  background: linear-gradient(to bottom, var(--b1) 0 8px, var(--b2) 8px 11px, var(--b3) 11px 13px);
  border-bottom: 1.5px solid var(--charcoal);
}

/* Company overview: the top of a company folder (and of each company on the page view) */
.company { display: grid; gap: 18px; }
.company__head { display: flex; align-items: center; gap: 14px; }
.company__head svg { flex: none; width: 58px; height: 58px; }
.company__name { font-size: clamp(26px, 5.4cqi, 34px); }
.company__blurb { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.snapshot { display: grid; gap: 12px; padding-top: 20px; }
.snapshot__lead {
  font-family: var(--f-display);
  font-size: 17.5px;
  line-height: 1.4;
  font-variation-settings: "SOFT" 80, "WONK" 0;
  text-wrap: pretty;
}
.snapshot .bullets { font-size: 14.5px; line-height: 1.5; }

.folder-top { padding: 22px 24px 0; }
.folder-top__projects { margin-top: 24px; padding-top: 14px; border-top: 1.5px solid var(--charcoal); }
.folder-top + .finder-grid { padding-top: 12px; }
.folder-top + .finder-list { margin-top: 10px; }
.folder-empty { padding: 12px 24px 28px; }

@container win (min-width: 560px) {
  .about { grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); column-gap: 30px; }
  .about__photo { position: sticky; top: 0; align-self: start; }
  .about__photo .photo { aspect-ratio: 2 / 3; }
}

/* ---------- Projects (Finder) ---------- */
.seg { display: inline-flex; border: 1.5px solid var(--charcoal); border-radius: 6px; overflow: hidden; }
.seg button { padding: 3px 11px; font: 600 12px var(--f-ui); }
.seg button + button { border-left: 1.5px solid var(--charcoal); }
.seg button[aria-pressed="true"] { background: var(--charcoal); color: var(--cream); }
.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 18px 8px;
  padding: 22px 16px 28px;
}
.finder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 6px;
  text-align: center;
}
.finder-item svg { width: 64px; height: 64px; transition: transform .18s var(--ease); }
.finder-item:hover svg { transform: translateY(-2px); }
.finder-item__name { max-width: 100%; padding: 1px 6px; border-radius: 3px; font: 600 13px/1.3 var(--f-ui); }
.finder-item__meta { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.finder-item:focus-visible .finder-item__name,
.finder-item.is-selected .finder-item__name { background: var(--charcoal); color: var(--cream); }

.finder-list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.finder-list th {
  position: sticky;
  top: 0;
  padding: 7px 12px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--charcoal);
  font: 600 11px var(--f-mono);
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
}
.finder-list td { padding: 0; border-bottom: 1px solid var(--rule); }
.finder-list tr:hover td { background: var(--paper); }
.finder-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
}
.finder-list svg { width: 22px; height: 22px; flex: none; }
.finder-list td:not(:first-child) { padding: 8px 12px; color: var(--ink-soft); }

/* ---------- Project ---------- */
.project { display: grid; gap: 26px; padding: 28px 30px 36px; }
.project__head { display: grid; gap: 14px; }
.project__title { font-size: clamp(32px, 7cqi, 50px); }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px 20px;
  padding-top: 14px;
  border-top: 1.5px solid var(--charcoal);
}
.meta-grid dt { font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.meta-grid dd { margin-top: 3px; font-weight: 550; line-height: 1.35; }
.project__cover { aspect-ratio: 3 / 2; }
.project__cover.slot { aspect-ratio: 3 / 2; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border: 1.5px solid var(--charcoal); border-radius: 6px; background: var(--paper); }
.stat__value { font-family: var(--f-display); font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.stat__label { margin-top: 6px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.stat--word .stat__value { font-size: 25px; line-height: 1.15; padding-top: 6px; }   /* a word, like "Salesforce", instead of a number */
.sections { display: grid; gap: 22px; }
.section-row { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery figure { display: grid; gap: 6px; }
.gallery .photo { aspect-ratio: 4 / 3; box-shadow: none; }
.gallery figcaption { font-size: 12.5px; color: var(--ink-soft); }
.linklist { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.project__nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 18px; border-top: 1.5px solid var(--charcoal); }
.project__nav .btn { max-width: 36%; }
.btn__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@container win (min-width: 620px) {
  .section-row:not(.section-row--wide) { grid-template-columns: 150px minmax(0, 1fr); column-gap: 24px; }
}

/* ---------- Résumé: the PDF itself, on a desk ---------- */
.win--doc .win__body {
  background-color: #cfc6b1;
  background-image: radial-gradient(rgba(31, 32, 28, .12) 1px, transparent 1.3px);
  background-size: 16px 16px;
}
.pdf {
  position: relative;
  width: calc(100% - 40px);
  max-width: 860px;
  margin: 20px auto 28px;
}
.pdf__paper {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 612 / 792;   /* one US Letter page */
  background: #fff;
  border: 1.5px solid var(--charcoal);
  border-radius: 3px;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .5);
}
/* The browser's PDF viewer rings the page with a dark margin. The frame is a little
   bigger than the paper so that margin falls outside and gets trimmed off. */
.pdf__frame {
  position: absolute;
  top: -6px;
  left: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 16px);
  border: 0;
}
.pdf__paper img { display: block; width: 100%; height: 100%; }
/* a click on the page of a window that's in the back brings the window forward first */
.pdf__shield { position: absolute; inset: 0; display: none; }
.win:not(.is-active) .pdf__shield { display: block; }
.is-grabbing .pdf__frame { pointer-events: none; }
.pdf--preview { display: grid; justify-items: center; gap: 10px; }
.pdf--preview .pdf__paper { width: 100%; }
.pdf__hint { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.pdf--preview .btn svg { width: 16px; height: 16px; }

/* ---------- Film (the only place with film styling) ---------- */
.win--film { background: var(--charcoal); }
.win--film .win__body { background: var(--charcoal); color: var(--cream); }
.film { position: relative; padding: 26px 0 30px; }
.film::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: .08;
}
.film__head { display: grid; gap: 10px; padding: 0 26px 22px; }
.film__head .display { color: var(--cream); font-size: clamp(30px, 6cqi, 42px); }
.film__head .display em { color: var(--olive-light); }
.film__intro { max-width: 34em; color: #c4c1b0; }
.film__head .eyebrow { color: var(--olive-light); }
.roll { display: grid; gap: 10px; margin-top: 10px; }
.roll__label { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 26px; font: 500 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #a9a693; }
.roll__label > * { white-space: nowrap; }
.roll__label b { color: var(--cream); font-weight: 500; }
.strip-wrap { overflow-x: auto; padding: 0 26px 8px; scrollbar-width: thin; scrollbar-color: #55564b transparent; }
.strip {
  --hole: var(--charcoal);
  position: relative;
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 30px 12px 40px;
  background: #121310;
  border-radius: 2px;
}
.strip::before, .strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--hole);
  -webkit-mask: var(--sprocket) 0 0 / 22px 10px repeat-x;
  mask: var(--sprocket) 0 0 / 22px 10px repeat-x;
}
.strip::before { top: 10px; }
.strip::after { bottom: 10px; }
.frame {
  position: relative;
  display: block;
  padding: 0;
  cursor: zoom-in;
}
.frame img {
  height: clamp(150px, 26cqi, 210px);
  width: auto;
  max-width: none;
  border-radius: 1px;
  transition: filter .3s;
}
.frame:hover img { filter: brightness(1.08); }
.frame__code {
  position: absolute;
  left: 2px;
  bottom: -24px;
  font: 500 9px var(--f-mono);
  letter-spacing: .16em;
  color: rgba(232, 190, 122, .7);
  white-space: nowrap;
}
.film__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 18px 26px 0; color: #a9a693; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.film__foot a { color: var(--cream); }
.win--film .todo { background: rgba(154, 160, 108, .08); color: var(--olive-light); }

/* ---------- Contact (mail compose) ---------- */
.mail { display: grid; }
.mail__row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--rule);
}
.mail__row label, .mail__row .mail__key { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.mail__to { font-weight: 600; overflow-wrap: anywhere; }
.mail__to span { font-weight: 400; color: var(--ink-soft); }
.field {
  width: 100%;
  padding: 6px 8px;
  background: #fbf8f1;
  border: 1.5px solid var(--charcoal);
  border-radius: 4px;
  font-size: 14.5px;
}
.field:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
textarea.field { min-height: 150px; resize: vertical; line-height: 1.5; }
.mail__body { padding: 14px 16px; display: grid; gap: 12px; }
.mail__actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.mail__elsewhere { display: grid; gap: 12px; padding: 16px; border-top: 1.5px solid var(--charcoal); background: var(--paper); }
.mail__trap { display: none; }   /* spam trap: people never see it, bots fill it in */
.btn:disabled { opacity: .55; cursor: progress; }

/* ---------- Small utility windows ---------- */
.dialog { display: grid; justify-items: center; gap: 12px; padding: 24px 26px 26px; text-align: center; }
.dialog__icon svg { width: 72px; height: 72px; }
.dialog__title { font-family: var(--f-display); font-size: 26px; line-height: 1.1; }
.dialog .prose { justify-items: center; }
.info-lines { display: grid; gap: 2px; color: var(--ink-soft); font-size: 14px; }
.memory { display: grid; gap: 6px; width: 100%; text-align: left; font-size: 13px; color: var(--ink-soft); }
.swatches { display: flex; gap: 8px; }
.swatches span { width: 26px; height: 26px; border: 1.5px solid var(--charcoal); border-radius: 50%; }
.meter { width: 100%; height: 14px; border: 1.5px solid var(--charcoal); border-radius: 3px; overflow: hidden; background: var(--paper-2); }
.meter span { display: block; height: 100%; width: 88%; background: repeating-linear-gradient(-45deg, var(--olive) 0 6px, var(--olive-deep) 6px 12px); }
.steps { display: grid; gap: 10px; text-align: left; counter-reset: step; }
.steps li { position: relative; padding-left: 30px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--charcoal);
  border-radius: 50%;
  font: 600 11px var(--f-mono);
}

/* ---------- Photo viewer ---------- */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(18, 19, 16, .96);
  color: var(--cream);
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: pop .2s var(--ease); }
.lightbox::backdrop { background: transparent; }
.lightbox__bar, .lightbox__nav { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.lightbox__bar p { font: 500 11.5px var(--f-mono); letter-spacing: .1em; color: #a9a693; }
.lightbox__figure { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 0; padding: 0 16px; }
.lightbox__figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 170px);
  border: 10px solid #fbf8f1;
  border-bottom-width: 34px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}
.lightbox__figure figcaption { font: 500 11.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #c4c1b0; }

.noscript { position: fixed; inset: 0; z-index: 3000; display: grid; place-content: center; gap: 12px; padding: 24px; background: var(--paper); text-align: center; }

/* ---------- Phones: a home screen of icons, windows open full screen ---------- */
@media (max-width: 720px) {
  .menubar { padding-inline: 4px; }
  .menubar__title { padding: 7px 8px; }
  .menubar__menus > li.hide-sm { display: none; }
  .menubar__clock .day { display: none; }
  .menubar__right { gap: 10px; padding-inline: 8px; }
  .menubar__center { padding-inline: 6px; }
  /* icons only, except the view you can switch to keeps its name */
  .viewtoggle__opt { gap: 4px; padding: 2px 7px; }
  .viewtoggle__opt[aria-current] span { display: none; }
  /* résumé toolbar: the buttons need the room more than the file name */
  .win--doc .win__toolbar { justify-content: center; }
  .win--doc .win__toolbar .meta { display: none; }

  /* hero and icons sit in normal flow at the top; toys play in the space below */
  .hero { position: relative; top: auto; left: auto; translate: none; width: auto; max-width: none; margin: 26px 16px 0; }
  .hero__name { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .hero__role { margin-top: 12px; font-size: 11px; }
  .hero__hint { font-size: 15px; }

  .icons {
    position: relative;
    inset: auto;
    display: grid;
    gap: 6px;
    margin: 20px 6px 0;
  }
  .icons__col {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    width: auto;
    gap: 4px 2px;
  }
  .icons__heading {
    display: block;
    grid-column: 1 / -1;
    margin: 4px 0 0 6px;
    font: 500 10.5px var(--f-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--desk-soft);
  }
  .icon--trash { margin-top: 0; }
  .icon { width: 100%; padding-inline: 2px; }
  .icon__img svg { width: 44px; height: 44px; }
  .icon__label { font-size: 11px; padding-inline: 4px; }

  .win { border-radius: 0; border-inline: 0; border-bottom: 0; box-shadow: none !important; }
  .win__bar { height: 40px; cursor: default; }
  .win__btn { width: 22px; height: 22px; border-radius: 5px; }
  .win__close::before, .win__close::after { left: 3.5px !important; right: 3.5px !important; top: 8.75px !important; height: 1.5px !important; background: var(--charcoal); }
  .win__close::before { transform: rotate(45deg); }
  .win__close::after { transform: rotate(-45deg); }
  .win__zoom, .win__shade, .win__grip { display: none; }
  .win__title { font-size: 14px; }
  .pad, .about, .project { padding: 20px 18px 28px; }
  .mail__row { grid-template-columns: 64px minmax(0, 1fr); }
  .mail__row .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .thing__float, .boot__icon svg { animation: none; }
  .win.is-shown, .win.is-closing, .win.is-animating { transition: none; }
  .lightbox[open], .viewtoggle.is-hinting { animation: none; }
}
