/* ==========================================================
   kev_bot.me — desktop edition
   Every page lives in an early-2000s style window on top of an
   animated, dithered background. Layout + behavior: assets/site.js
   ========================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/pixelify-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("/assets/fonts/vt323-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Luna "Olive Green" window chrome */
  --frame: #8a9e5b;
  --frame-edge: #44541c;
  --frame-inner: #56692a;
  --titlebar: linear-gradient(180deg, #dbe5b8 0%, #a7bc77 7%, #90a85e 38%, #809951 86%, #809951 91%, #6f8844 94%, #536a28 96%, #536a28 100%);
  --title-shadow: #2f3d0e;
  --select: #5e7a2c;
  --face: #ece9d8;
  --ink: #161616;
  --link: #0b3ea8;
  --shadow: 0 16px 40px rgba(0, 0, 0, .38), 0 3px 9px rgba(0, 0, 0, .28);

  --font-ui: Tahoma, Verdana, "Segoe UI", "DejaVu Sans", Geneva, sans-serif;
  --font-title: "Trebuchet MS", Tahoma, "Segoe UI", "DejaVu Sans", sans-serif;
  --font-pixel: "Pixelify Sans", "Courier New", monospace;
  --font-bios: "VT323", "Courier New", monospace;

  --titlebar-h: 36px;
  --frame-w: 7px;

  /* Subpage window timing. site.js reads these too, so the dimmed, pixelated
     scene behind the window (and its shadow + grain) change in step with it. */
  --win-open: .64s;    /* opening: scales up from 0% at the center */
  --win-close: .44s;   /* closing: scales back down to 0% */
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  background: #000;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--ink);
  /* Shown before (or without) the animated canvas */
  background: radial-gradient(circle at 50% 50%, #fdc69c 0%, #d3f1a8 50%, #a6ebc8 100%);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;   /* no double-tap zoom on taps; pinch zoom still works */
}
/* With JavaScript the animated canvas is the background; black underneath
   means nothing bright can flash before it appears. */
html.js body { background: #000; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

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

/* ==========================================================
   DESKTOP LAYERS
   ========================================================== */
#bg {
  position: fixed;
  left: 0; top: 0;
  z-index: 0;
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1);
}
html:not(.js) #bg { display: none; }
.is-booted #bg { opacity: 1; }

#desktop {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
}
.home-wrap {
  position: relative;
  margin: auto;                 /* centers, but still scrolls if taller than the screen */
  padding: 40px 14px;
}
.home-snap {                    /* pixel/blur stand-in for the HOME window during effects */
  position: absolute;
  pointer-events: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.home-snap[hidden] { display: none; }

/* Behind an open window: a light tint, then a layer that rises up as the
   window floats in, holding the shadow and the film grain. Both are masked by
   the same --fade gradient (clear down to halfway, strongest at the bottom),
   so the grain always matches the shadow exactly. The grain flickers by
   jumping sideways only: the gradient is the same all the way across, so it
   never moves, and the browser can shift the layer without redrawing it. */
#backdrop {
  --fade: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .32) 66%, rgba(0, 0, 0, .71) 84%, #000 100%);
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: rgba(4, 8, 30, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--win-close) cubic-bezier(.65, 0, .35, 1), visibility 0s linear var(--win-close);
}
#backdrop.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--win-open) cubic-bezier(.33, 1, .68, 1), visibility 0s;
}
.backdrop-fade {             /* stays in place: it fades in and out with #backdrop */
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.backdrop-fade::before {          /* the shadow */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 10, .62);       /* shadow color at the very bottom */
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}
.backdrop-grain {
  position: absolute;
  inset: 0 -96px;
  background-image: var(--grain, none);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
  background-size: 256px 256px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity .2s linear;
  animation: grain .64s steps(1, end) infinite paused;
}
#backdrop.is-on .backdrop-grain {
  opacity: 1;
  transition: opacity var(--win-open) cubic-bezier(.33, 1, .68, 1) .04s;
  animation-play-state: running;
}
@keyframes grain {                /* sideways jumps only (see above) */
  0%     { transform: translateX(0); }
  12.5%  { transform: translateX(-53px); }
  25%    { transform: translateX(37px); }
  37.5%  { transform: translateX(-81px); }
  50%    { transform: translateX(66px); }
  62.5%  { transform: translateX(-19px); }
  75%    { transform: translateX(89px); }
  87.5%  { transform: translateX(-71px); }
}

/* ==========================================================
   WINDOW CHROME
   ========================================================== */
.window {
  display: flex;
  flex-direction: column;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-radius: 8px 8px 0 0;
  padding: 0 var(--frame-w) var(--frame-w);
  box-shadow: var(--shadow);
}
.titlebar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--titlebar-h);
  margin: 0 calc(var(--frame-w) * -1);
  padding: 0 7px 0 10px;
  background: var(--titlebar);
  border-radius: 7px 7px 0 0;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}
.title-icon { flex: none; width: 19px; height: 19px; }
/* drag a window by its title bar (site.js); it springs back to the center when let go */
.titlebar[data-drag] { cursor: grab; touch-action: none; }
.is-dragged > .titlebar[data-drag], .is-dragged > .titlebar[data-drag] * { cursor: grabbing; }
.titlebar[data-drag] .close { cursor: pointer; }
#desktop.is-dragging { overflow: hidden; }
.titlebar .title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font: 700 17px/1 var(--font-title);
  letter-spacing: .2px;
  text-shadow: 1px 1px var(--title-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.close {
  flex: none;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%);
  box-shadow: inset 0 -1px 2px 1px #da4600;
  cursor: pointer;
  transition: filter .12s ease-out;
}
.close svg { width: 13px; height: 13px; display: block; }
@media (hover: hover) { .close:hover { filter: brightness(1.15); } }
.close:active { filter: brightness(.85); }
.close:focus-visible { outline: 1px dotted #fff; outline-offset: 2px; }

.win-body {
  flex: 1;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--frame-inner);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  container-type: inline-size;
  container-name: win;
}
.win-body:focus { outline: none; }

/* XP-flavored scrollbars */
.win-body::-webkit-scrollbar { width: 17px; height: 17px; background: #f4f3ee; }
.win-body::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #e3eacb, #d2dcae 45%, #c0cd94);
  border: 1px solid #fff;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #a3b47a;
}
.win-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #edf2dc, #dee6c2 45%, #ccd8a6); }
@supports (-moz-appearance: none) {
  .win-body { scrollbar-color: #c9d5a1 #f4f3ee; }
}

/* ==========================================================
   HOME WINDOW
   ========================================================== */
.home-window { width: clamp(300px, 34vw, 500px); }
html.js #home:not(.is-shown) { opacity: 0; animation: failsafe-show 0s linear 20s forwards; }
.is-ghost { opacity: 0 !important; pointer-events: none !important; }
@keyframes failsafe-show { to { opacity: 1; } }

.home-body { padding: 28px 28px 20px; overflow: visible; }

.hello {
  margin: 4px 0 24px;
  font: 700 clamp(26px, 2.5vw, 36px)/1.15 var(--font-pixel);
  text-align: center;
  white-space: nowrap;
  color: #111;
}
.typed-wrap { display: inline-block; min-width: 1.15em; text-align: left; }
.cursor {
  display: inline-block;
  width: .1em;
  height: .92em;
  margin-left: .06em;
  vertical-align: -.1em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.page-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2px;
  font: 17px/1.3 var(--font-ui);
}
.page-list li { display: flex; align-items: center; gap: 8px; }
.bullet {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
}
.page-list a {
  display: block;
  padding: 4px 8px;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 1px;
}
.page-list a:focus-visible {
  background: var(--select);
  color: #fff;
  text-decoration: none;
  outline: none;
}
/* Hover effects only where a real pointer can hover — touch screens keep
   :hover "stuck" on whatever was tapped last. */
@media (hover: hover) {
  .page-list a:hover { background: var(--select); color: #fff; text-decoration: none; }
}

/* Icon tray: Instagram menu + email label */
.tray {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 40px);
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #d6d2c4;
}
.tray-item { position: relative; }
.tray-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #1c1c1c;
  font: 12px/1.25 var(--font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.tray-btn svg { width: 36px; height: 36px; display: block; transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.tray-btn .caption { padding: 1px 4px; }
.tray-btn:focus-visible { outline: none; }
.tray-btn:focus-visible .caption,
.tray-item.is-open .caption { background: var(--select); color: #fff; }

/* The drop-down itself (hidden by default, rolls down when open) */
.tray-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 5;
  margin: 0;
  list-style: none;
  transform: translate(-50%, -8px);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(-12px -12px 100% -12px);
  /* closing: brief grace period so the pointer can cross the gap, then roll up */
  transition:
    clip-path .16s cubic-bezier(.4, 0, 1, 1) .12s,
    transform .16s cubic-bezier(.4, 0, 1, 1) .12s,
    opacity .12s linear .16s,
    visibility 0s linear .28s;
}
.tray-menu::before {                  /* invisible bridge over the gap */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -10px;
  height: 10px;
}
.tray-item.is-open .tray-menu {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  clip-path: inset(-12px -12px -16px -12px);
  transition:
    clip-path .28s cubic-bezier(.22, 1, .36, 1),
    transform .28s cubic-bezier(.22, 1, .36, 1),
    opacity .14s cubic-bezier(.22, 1, .36, 1),
    visibility 0s;
}
.tray-item.is-open .tray-btn svg { transform: translateY(-2px); }
@media (hover: hover) {
  .tray-item:hover .tray-menu {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    clip-path: inset(-12px -12px -16px -12px);
    transition:
      clip-path .28s cubic-bezier(.22, 1, .36, 1),
      transform .28s cubic-bezier(.22, 1, .36, 1),
      opacity .14s cubic-bezier(.22, 1, .36, 1),
      visibility 0s;
  }
  .tray-item:hover .tray-btn svg { transform: translateY(-2px); }
  .tray-item:hover .caption { background: var(--select); color: #fff; }
}

/* XP-style menu */
ul.tray-menu {
  min-width: 128px;
  padding: 3px;
  background: #fff;
  border: 1px solid #a4a28f;
  box-shadow: 2px 3px 7px rgba(0, 0, 0, .3);
}
ul.tray-menu li {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .1s linear, transform .1s linear;
}
.tray-item.is-open ul.tray-menu li {
  opacity: 1;
  transform: none;
  transition: opacity .2s ease-out calc(70ms + var(--i, 0) * 45ms), transform .26s cubic-bezier(.22, 1, .36, 1) calc(70ms + var(--i, 0) * 45ms);
}
@media (hover: hover) {
  .tray-item:hover ul.tray-menu li {
    opacity: 1;
    transform: none;
    transition: opacity .2s ease-out calc(70ms + var(--i, 0) * 45ms), transform .26s cubic-bezier(.22, 1, .36, 1) calc(70ms + var(--i, 0) * 45ms);
  }
}
ul.tray-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px 7px 9px;
  color: #111;
  font: 14px/1.2 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
}
ul.tray-menu a:focus-visible { background: var(--select); color: #fff; outline: none; }
@media (hover: hover) { ul.tray-menu a:hover { background: var(--select); color: #fff; } }
.menu-icon { flex: none; width: 16px; height: 16px; }

/* XP-style tooltip for the email address */
.tray-label {
  padding: 5px 9px;
  background: #ffffe1;
  border: 1px solid #1c1c1c;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, .28);
  white-space: nowrap;
}
.tray-label a { color: #111; font: 12.5px/1.3 var(--font-ui); text-decoration: none; }
@media (hover: hover) { .tray-label a:hover { text-decoration: underline; } }

/* ==========================================================
   SUBPAGE WINDOWS
   ========================================================== */
.sub-window {
  position: fixed;
  inset: 0;
  z-index: 30;
  margin: auto;
  width: 80vw;
  height: 80vh;
  height: 80dvh;
  /* closed: scaled down to nothing at its center */
  transform: scale(0);
  opacity: 0;
  visibility: hidden;
  /* closing: snappy ease-out back down to the center */
  transition:
    transform var(--win-close) cubic-bezier(.22, 1, .36, 1),
    opacity var(--win-close) cubic-bezier(.33, 1, .68, 1),
    visibility 0s linear var(--win-close);
}
.sub-window.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  /* opening: snappy ease-out scale up from 0% at the center */
  transition:
    transform var(--win-open) cubic-bezier(.16, 1, .3, 1),
    opacity .24s cubic-bezier(.33, 1, .68, 1),
    visibility 0s;
}
/* ---------- Photo viewer: a window on top of the photos page ---------- */
.viewer-shade {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 14, 8, .34);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--win-close) cubic-bezier(.65, 0, .35, 1), visibility 0s linear var(--win-close);
}
.viewer-shade.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--win-open) cubic-bezier(.33, 1, .68, 1), visibility 0s;
}
.viewer-window {
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: auto;
  /* site.js sets the exact width/height so the inside matches the photo's shape */
  width: min(72vw, 1200px);
  height: 74vh;
  /* same scale-in / scale-out as the page windows */
  transform: scale(0);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--win-close) cubic-bezier(.22, 1, .36, 1),
    opacity var(--win-close) cubic-bezier(.33, 1, .68, 1),
    visibility 0s linear var(--win-close);
}
.viewer-window.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition:
    transform var(--win-open) cubic-bezier(.16, 1, .3, 1),
    opacity .24s cubic-bezier(.33, 1, .68, 1),
    visibility 0s;
}
/* the photo fills the window's inside edge to edge: no bars around it */
.viewer-body {
  position: relative;
  overflow: hidden;
  background: #1b1d18;
  color: #c9c6ba;
  font-size: 14px;
}
.viewer-body.is-loading::after {
  content: "Loading…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 13px var(--font-ui);
  color: #c9c6ba;
}
.viewer-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* same shape as the window, so nothing is actually cropped */
  opacity: 0;
  transition: opacity .3s cubic-bezier(.33, 1, .68, 1);
}
.viewer-img.is-loaded { opacity: 1; }
.viewer-ph { width: 100%; height: 100%; font-size: 13px; }

.win-status {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 100%;
  padding: 24px;
  font-size: 14px;
  text-align: center;
  color: #333;
}

/* Subpage files opened without JavaScript */
body.standalone .sub-window {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: none;
}

/* ==========================================================
   ERROR DIALOG (404)
   ========================================================== */
.dialog-window { width: min(380px, calc(100vw - 28px)); }
.dialog-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px 20px 18px;
  background: var(--face);
  font-size: 14px;
  line-height: 1.5;
}
.dialog-body svg { width: 34px; height: 34px; }
.dialog-body p { margin: 0; }
.dialog-actions { grid-column: 1 / -1; display: flex; justify-content: center; }

/* ==========================================================
   BIOS BOOT SCREEN
   ========================================================== */
#bios {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 26px 30px;
  overflow: hidden;
  background: #000;
  color: #aaa;
  font: 21px/1.18 var(--font-bios);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  /* leaving: a smooth fade from black, timed by site.js to the HOME entrance */
  transition: opacity var(--reveal, .5s) cubic-bezier(.37, 0, .63, 1);
  animation: failsafe-hide 0s linear 20s forwards;
}
#bios::after {                  /* faint CRT scanlines */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
}
#bios.is-done { opacity: 0; pointer-events: none; }
@keyframes failsafe-hide { to { opacity: 0; visibility: hidden; } }
.bios-screen { opacity: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; }
#bios.is-on .bios-screen { opacity: 1; }
.bios-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.bios-out, .bios-logo { margin: 0; font: inherit; white-space: pre-wrap; }
.bios-logo { flex: none; color: #55ffff; white-space: pre; line-height: 1.05; }
.bios-logo b { color: #ffff55; font-weight: inherit; }
.bios-foot { margin-top: auto; padding-top: 18px; }
.bios-foot p { margin: 0; }
.b-w { color: #fff; }
.b-y { color: #ffff55; }
.b-c { color: #55ffff; }
.b-g { color: #55ff55; }
.b-caret { display: inline-block; width: .55em; height: .14em; background: #aaa; vertical-align: -.05em; animation: blink .5s steps(1) infinite; }
html:not(.js) #bios { display: none; }

/* Part 2 of the boot: the splash logo, drawn pixel row by pixel row */
.splash {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  visibility: hidden;
}
#bios.is-splash .splash { visibility: visible; }
#bios.is-splash .bios-screen { visibility: hidden; }
.splash-logo {
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  transition: opacity .18s cubic-bezier(.4, 0, 1, 1);
}
#bios.is-leaving .splash-logo { opacity: 0; }   /* the logo fades to black first */
.splash-logo.is-smooth { image-rendering: auto; }

/* ==========================================================
   PAGE CONTENT (inside subpage windows)
   ========================================================== */
.page {
  min-height: 100%;
  font: 15px/1.6 var(--font-ui);
  color: var(--ink);
}
.page h1, .page h2 { font-family: var(--font-pixel); font-weight: 700; line-height: 1.1; }
.page a { color: var(--link); }

/* Image placeholders: drop an <img> inside to replace */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(0, 0, 0, .05) 12px 24px),
    #d4d0c8;
  color: #6b675e;
  font: 11px/1.4 var(--font-ui);
  text-align: center;
}
.ph span { word-break: break-all; }
.ph span::before {
  content: "IMAGE";
  display: block;
  margin-bottom: .3rem;
  font-size: 10px;
  letter-spacing: .2em;
  opacity: .7;
}
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* XP push button */
.btn {
  display: inline-block;
  min-width: 88px;
  padding: 7px 22px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe6 86%, #d6d0c5 100%);
  color: #000 !important;
  font: 13px/1.2 var(--font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) { .btn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; } }
.btn:active { background: linear-gradient(180deg, #cdcac3 0%, #e3e3db 8%, #e5e5de 94%, #f2f2f1 100%); box-shadow: none; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}
.about-cover {
  position: sticky;
  top: 0;
  height: var(--body-h, 100%);
  display: flex;
  align-items: flex-end;
  padding: 28px;
  overflow: hidden;
  color: #fff;
}
.about-cover .ph { position: absolute; inset: 0; place-items: start center; padding-top: 40%; }
.about-cover::after { content: ""; position: absolute; inset: 0; background: rgba(10, 18, 50, .45); }
.about-cover h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
}
.essay {
  max-width: 44em;
  padding: 30px clamp(18px, 3vw, 44px) 40px;
  font-size: 16px;
  line-height: 1.7;
}
.essay p { margin: 0 0 1.3em; }
.essay p:last-child { margin-bottom: 0; }

/* ---------- photos: kev_bot's shots ---------- */
.shots h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 1.25rem; }
.shots .btn { padding: 9px 26px; font-size: 15px; }
/* spacing eases off on short screens so the heading + whole reel fit in the window */
.shots-hero { text-align: center; padding: clamp(1.25rem, min(6vw, 5vh), 4.5rem) 20px clamp(1rem, min(4vw, 3.5vh), 2.75rem); }
.shots-hero h1 { margin: 0 0 .6rem; font-size: clamp(36px, min(7vw, 8vh), 76px); }
.shots-tagline { margin: 0 0 clamp(.9rem, 2.5vh, 1.75rem); font: italic 17px/1.4 var(--font-title); color: #555; }
/* the logo used as the photos page heading (kbsp_logo.png), centered */
.shots-hero .shots-logo { margin: 0; line-height: 0; }
.shots-logo img { display: inline-block; width: auto; height: clamp(70px, min(30vw, 15vh), 150px); }

.reel { display: grid; gap: 12px; overflow: hidden; padding: 4px 0; }
/* site.js moves the reel: it glides on its own, and a mouse drag or finger swipe moves it */
.reel-row { overflow: hidden; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.reel-row.is-dragging, .reel-row.is-dragging .ph { cursor: grabbing; }
.reel-track img { -webkit-user-drag: none; }
.standalone .reel-row { overflow-x: auto; }   /* without JavaScript: scroll it */
.reel-track {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;   /* speed: --reel-time per loop, set from site.toml (reel_speed x photos) */
}
/* one row, as tall as the two rows it replaced (2 x row height + the gap between them) */
/* site.js may lower this (--reel-h) so the heading + whole reel fit in the window without scrolling */
.reel-track .ph { flex: none; height: var(--reel-h, calc(clamp(150px, 24vw, 280px) * 2 + 12px)); cursor: zoom-in; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.reel-track .ph:focus-visible { outline: 3px solid var(--select); outline-offset: -3px; }
.reel-track .ph.tall { aspect-ratio: 3 / 4; }
.reel-track .ph.wide { aspect-ratio: 3 / 2; }
@media (hover: hover) { .reel-track .ph:hover { transform: scale(1.03); } }
/* opening the photos page: each photo scales up a little from its center and slides down
   into place, one after another (site.js sets --i). Uses scale/translate, so the reel's
   movement and the hover zoom (transform) aren't disturbed. */
.reel.is-entering .reel-track > .ph {
  animation: tile-in .6s cubic-bezier(.2, 1.25, .4, 1) both;
  animation-delay: calc(140ms + var(--i, 0) * 65ms);
}
@keyframes tile-in {
  from { opacity: 0; scale: .84; translate: 0 -30px; }
  to   { opacity: 1; scale: 1; translate: 0 0; }
}

.shots-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 24px;
}
.intro-photo { aspect-ratio: 4 / 5; }
.intro-box {
  min-height: 11rem;
  padding: 1.25rem 1.5rem;
  border: 2px dashed #aaa99f;
  background: #fffef4;
  font-size: 15px;
}
.intro-box p { margin: 0 0 1em; }
.intro-box p:last-child { margin-bottom: 0; }

.services { max-width: 62rem; margin: 0 auto; padding: 0 24px clamp(2.5rem, 6vw, 4.5rem); }
.service-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}
.service-list li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid #b9b8ad;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #f3f2ec);
  font: 700 18px/1.2 var(--font-title);
  color: #0a2a7c;
  transition: background .15s ease-out, border-color .15s ease-out;
}
@media (hover: hover) { .service-list li:hover { border-color: var(--select); background: #eef3e1; } }
.service-list .num { font: 400 11px var(--font-ui); letter-spacing: .14em; color: #85847a; }
.service-list li.ask { padding: 0; border-style: dashed; }
.service-list li.ask a {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.shots-cta {
  padding: clamp(2.5rem, 6vw, 4rem) 20px;
  background: linear-gradient(180deg, #7a9447, #4b6420);
  color: #fff;
  text-align: center;
}
.shots-cta h2 { color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
/* phone + email, side by side under the heading (stacked on narrow screens) */
.cta-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0 0 1.4rem; }
.cta-contact a {
  display: inline-flex; align-items: baseline; gap: 8px; color: #fff; text-decoration: none;
  font: 700 clamp(16px, 2vw, 19px)/1.3 var(--font-title); text-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
  overflow-wrap: anywhere;
}
.cta-contact a:hover, .cta-contact a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.cta-contact .cta-label { font: 400 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }

/* ---------- tinker ---------- */
.article { max-width: 62rem; margin: 0 auto; padding: 30px clamp(18px, 3vw, 44px) 40px; }
.article h2 { margin: 0 0 1rem; font-size: clamp(26px, 3.2vw, 36px); }
.article p { margin: 0 0 1.3em; font-size: 16px; line-height: 1.7; }
.article section + section { margin-top: 2.5rem; }
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
}
.split .ph { aspect-ratio: 3 / 4; }

/* ---------- music / skate ---------- */
.under-construction { display: grid; }
.construction {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 40px 20px;
  font-size: clamp(17px, 2.2vw, 22px);
  text-align: center;
}
.construction::before {
  content: "";
  width: min(280px, 70vw);
  height: 14px;
  background: repeating-linear-gradient(-45deg, #1a1a1a 0 10px, #ffcc00 10px 20px);
}
.construction p { margin: 0; }

/* ---------- narrow windows (container queries) ---------- */
@container win (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about-cover { position: relative; height: min(75cqw, calc(var(--body-h, 600px) * .62)); }
  .about-cover .ph { padding-top: 12%; }
  .split { grid-template-columns: 1fr; }
  .split .ph { max-width: 22rem; }
  .shots-intro { grid-template-columns: 1fr; }
  .intro-photo { max-width: 18rem; }
}
@container win (max-width: 480px) {
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-list li { min-height: 80px; padding: 10px 12px; font-size: 16px; }
  .service-list li.ask { grid-column: 1 / -1; }
  .service-list li.ask a { padding: 10px 12px; }
}

/* ==========================================================
   PHONES / TOUCH
   ========================================================== */
@media (max-width: 640px) {
  :root { --frame-w: 5px; }
  .home-window { width: min(calc(100vw - 28px), 440px); }
  .home-body { padding: 24px 18px 18px; }
  .sub-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
  }
  #bios { padding: 16px; font-size: 17px; }
  .bios-top { flex-direction: column-reverse; gap: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .sub-window {
    width: calc(100vw - 48px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
  }
}
@media (pointer: coarse) {
  :root { --titlebar-h: 40px; }
  .close { width: 33px; height: 31px; }
  .close svg { width: 14px; height: 14px; }
  .page-list a { padding: 7px 10px; }
}

/* Phones held sideways: compact HOME (two-column list) so it fits without scrolling */
@media (max-height: 500px) and (orientation: landscape) {
  .home-wrap { padding: 12px; }
  .home-window { width: min(540px, calc(100vw - 40px)); }
  .home-body { padding: 12px 22px 10px; }
  .hello { margin: 2px 0 8px; font-size: 24px; }
  .page-list { columns: 2; column-gap: 28px; }
  /* photos page: compact heading so the reel fits below it */
  .shots-hero { padding: 10px 16px 8px; }
  .shots-hero h1 { font-size: 28px; margin-bottom: 2px; }
  .shots-logo img { height: 48px; }
  .shots-tagline { font-size: 14px; margin-bottom: 8px; }
  .shots .shots-hero .btn { padding: 5px 18px; font-size: 13px; }
  .page-list li { break-inside: avoid; }
  .page-list a { padding-top: 4px; padding-bottom: 4px; }
  .tray { margin-top: 8px; padding-top: 8px; }
  .tray-btn { gap: 3px; }
  .tray-btn svg { width: 30px; height: 30px; }
}

/* Big monitors: let HOME grow toward ~30% of the screen, with larger type */
@media (min-width: 1800px) and (min-height: 900px) {
  .home-window { width: clamp(500px, 30vw, 680px); }
  .home-body { padding: 36px 40px 26px; }
  .hello { font-size: 44px; margin-bottom: 30px; }
  .page-list { font-size: 21px; }
  .page-list li { gap: 10px; }
  .bullet { width: 8px; height: 8px; }
  .tray { margin-top: 28px; padding-top: 20px; }
  .tray-btn { font-size: 13.5px; min-width: 84px; }
  .tray-btn svg { width: 44px; height: 44px; }
  ul.tray-menu { min-width: 150px; }
  ul.tray-menu a { font-size: 15.5px; }
  .tray-label a { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel.is-entering .reel-track > .ph { animation: none; }
  .cursor, .b-caret { animation: none; }
  .sub-window, .sub-window.is-open, .viewer-window, .viewer-window.is-open { transform: none; }
  .viewer-window { transition: opacity .15s linear, visibility 0s linear .15s; }
  .viewer-window.is-open { transition: opacity .15s linear, visibility 0s; }
  .backdrop-grain { animation: none; }
  .tray-menu, ul.tray-menu li, .tray-btn svg { transition-duration: 0s !important; transition-delay: 0s !important; }
  .sub-window { transition: opacity .15s linear, visibility 0s linear .15s; }
  .sub-window.is-open { transition: opacity .15s linear, visibility 0s; }
}
