#hello.compact #hello-copy { padding: 14px 16px; font-size: 18px; }
#hello.compact #hello-bar { margin-bottom: 12px; }
#hello.hover-preview { pointer-events: none; }
/* ===== Theme: change these to restyle the whole site ===== */
:root {
  --desktop: #7aa8b8;       /* soft vintage Windows blue */
  --desktop-glow: #a9d3d1;  /* lighter blue-green center glow */
  --desktop-edge: #4d7d85;  /* darker vintage teal edge */
  --paper: #c0c0c0;         /* classic Windows gray */
  --gold: #ffd400;
  --gold-soft: #fff1a8;
  --maroon: #547c82;        /* muted blue-green */
  --pixel: "Silkscreen", "Courier New", monospace;  /* labels, titles, buttons */
  --text: "VT323", "Courier New", monospace;        /* body text */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
html.scroll-page, body.site-body { height: auto; min-height: 100%; overflow: auto; }
body {
  font: 20px/1.25 var(--text); color: #000;
  cursor: url("pixel-cursor.svg") 1 1, auto;
  background: var(--desktop) radial-gradient(ellipse at center, var(--desktop-glow) 0%, var(--desktop) 55%, var(--desktop-edge) 100%);
}
/* CRT scanlines over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 10000; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.13) 0 1px, transparent 1px 3px);
}
button, a, input, textarea { cursor: url("pixel-cursor.svg") 1 1, auto; }
svg { width: 16px; height: 16px; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 14px; cursor: pointer; text-decoration: none;
  font: 12px var(--pixel); color: #000;
  background: var(--paper); border: 2px solid #000; box-shadow: 3px 3px 0 #000;
}
.btn:hover { background: var(--gold-soft); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }

/* ===== Boot screen ===== */
#boot {
  position: fixed; inset: 0; z-index: 9999; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #000; color: var(--paper); transition: opacity .4s;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-logo { width: 128px; height: 128px; }
#boot h1 { margin: 16px 0 0; font: 32px var(--pixel); letter-spacing: 2px; }
#boot h1 span { color: var(--gold); }
.boot-sub { margin: 4px 0 24px; color: #999; }
.boot-bar { width: 240px; height: 22px; padding: 3px; border: 2px solid var(--paper); }
.boot-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 13px); }
.boot-status { min-height: 1.25em; margin: 12px 0 0; color: var(--gold); }
.boot-status.blink { animation: blink .5s steps(2) infinite; }
.boot-hint { margin-top: 24px; font-size: 16px; color: #555; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Desktop ===== */
#desktop {
  position: fixed; inset: 0 0 calc(44px + env(safe-area-inset-bottom, 0px)) 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 0;
}

/* Headline with a glow that sweeps back and forth */
.welcome {
  margin: 0; padding: 0 16px 8px; width: 100%; text-align: center; white-space: normal; overflow-wrap: anywhere;
  font: normal clamp(16px, 4vw, 52px)/1 var(--text); letter-spacing: 1px;
  background: linear-gradient(90deg, var(--paper) 0 42%, #fff 47%, var(--gold) 50%, #fff 53%, var(--paper) 58% 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 8px rgba(245, 196, 0, .4));
  animation: sweep 3.5s ease-in-out infinite alternate;
}
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

.icons {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 0 16px;
  margin-top: 0;
}
.icon {
  width: min(140px, 24vw); padding: 0 2px; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font: 11px/1.4 var(--pixel); color: var(--paper);
}
.icon svg { width: 64px; height: 64px; transition: transform .1s steps(2); }
.icon:hover svg { transform: translateY(-3px); }
.icon span {
  max-width: 120px;
  padding: 2px 4px;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
  line-height: 1.3;
}
.icon.selected span { background: var(--gold); color: #000; text-shadow: none; }
.icon:focus-visible { outline: none; }
.icon:focus-visible span { outline: 2px dashed var(--gold); }

/* ===== Windows ===== */
.window {
  position: absolute; display: flex; flex-direction: column;
  width: min(460px, calc(100vw - 32px)); max-height: calc(100% - 16px);
  background: var(--paper); border: 2px solid #000; box-shadow: 6px 6px 0 rgba(0,0,0,.6);
}
.window[hidden] { display: none; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100%; height: 100%; max-height: none; box-shadow: none; }

.titlebar {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px; flex: none;
  font: 12px var(--pixel); color: #aaa; background: #2a2a2a; border-bottom: 2px solid #000;
  user-select: none; touch-action: none; cursor: default;
}
.window.active .titlebar, #hello .titlebar { background: #000; color: var(--gold); }
.titlebar svg { width: 20px; height: 20px; }
.titlebar .title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.titlebar .grip { flex: 1; height: 10px; opacity: .5; background: radial-gradient(currentColor 1px, transparent 1.5px) 0 0 / 4px 4px; }
.controls { display: flex; gap: 4px; }
.controls button {
  width: 20px; height: 20px; padding: 0; cursor: pointer;
  font: 12px/1 var(--pixel); color: inherit; background: transparent; border: 2px solid currentColor;
}
.controls button:hover { background: var(--gold); border-color: var(--gold); color: #000; }

.body { padding: 16px; overflow: auto; }
.body h2 { margin: 0 0 8px; font: 14px var(--pixel); color: var(--maroon); }
.body h2:not(:first-child) { margin-top: 20px; }
.body p { margin: 0 0 12px; }

.link-list { display: grid; gap: 10px; }
.link-list .btn { justify-content: flex-start; padding: 10px 14px; }

#contact-form { display: grid; gap: 10px; }
#contact-form label { display: grid; grid-template-columns: 80px 1fr; align-items: center; font: 11px var(--pixel); }
#contact-form input, #contact-form textarea {
  width: 100%; padding: 4px 8px; font: 20px var(--text); background: #fff; border: 2px solid #000; resize: vertical;
}
#contact-form .row { display: flex; justify-content: flex-end; }

/* ===== Welcome popup ===== */
#hello {
  position: fixed; left: 50%; top: 42%; z-index: 7000; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  background: var(--paper); border: 2px solid #000; box-shadow: 6px 6px 0 rgba(0,0,0,.6);
  cursor: pointer; transition: opacity .8s;
}
#hello[hidden] { display: none; }
#hello.fade { opacity: 0; }
#hello p { margin: 0; padding: 24px 20px; font-size: 26px; text-align: center; }
#hello-bar { height: 14px; margin: 0 20px 18px; padding: 2px; border: 2px solid #000; background: #fff; }
#hello-fill { width: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 13px); }

/* ===== Taskbar ===== */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5000;
  height: calc(44px + env(safe-area-inset-bottom, 0px)); padding: 0 6px env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; gap: 6px;
  background: #c0c0c0; border-top: 2px solid #fff; color: #000;
}
#taskbar .btn {
  height: 32px; padding: 0 10px; box-shadow: 2px 2px 0 #404040, inset 1px 1px 0 #fff;
  border-color: #808080; background: #c0c0c0; color: #000;
}
#taskbar .btn:active { transform: none; }
#taskbar #start-btn { background: #c0c0c0; color: #000; }
#taskbar #start-btn.pressed, #taskbar .btn.pressed { background: #a0a0a0; box-shadow: inset 2px 2px 0 #404040; }
#start-btn svg { width: 22px; height: 22px; }
#tasks { flex: 1; display: flex; gap: 6px; min-width: 0; overflow: hidden; }
#tasks .btn { flex: 0 1 180px; min-width: 44px; justify-content: flex-start; }
#tasks .btn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#location {
  flex: 0 1 280px; min-width: 120px; overflow: hidden; padding: 0 10px;
  color: #000; font: 12px var(--pixel); white-space: nowrap; text-overflow: ellipsis;
}
#tray { padding: 0 10px; font-size: 22px; color: #000; border-left: 2px solid #808080; }
#clock-wrap { position: relative; display: inline-block; outline: none; }
#clock-wrap:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }
#clock-tooltip {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 7000;
  width: max-content; max-width: 280px; padding: 6px 8px;
  color: #000; background: var(--paper); border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.6);
  font: 11px var(--pixel); white-space: nowrap;
  opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .1s, transform .1s;
}
#clock-wrap:hover #clock-tooltip, #clock-wrap:focus #clock-tooltip { opacity: 1; transform: translateY(0); }

/* ===== KING menu ===== */
#start-menu {
  position: fixed; left: 6px; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); z-index: 6000;
  display: flex; min-width: 250px;
  background: var(--paper); border: 2px solid #000; box-shadow: 6px 6px 0 rgba(0,0,0,.6);
}
#start-menu[hidden] { display: none; }
#start-menu .side { width: 34px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; background: var(--maroon); }
#start-menu .side span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font: 14px var(--pixel); color: var(--paper); }
#start-menu .side b { color: var(--gold); font-weight: normal; }
#start-menu ul { list-style: none; margin: 0; padding: 4px 0; flex: 1; }
#start-menu li button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px;
  border: 0; background: none; cursor: pointer; text-align: left; font: 12px var(--pixel);
}
#start-menu li button svg { width: 32px; height: 32px; }
#start-menu li button[data-open]::after { content: "\25B6"; margin-left: auto; font-size: 10px; }
#start-menu li button:hover, #start-menu li button:focus-visible { background: #000; color: var(--gold); outline: none; }
#start-menu .sep { margin: 4px 10px; border-top: 2px dashed #000; }

/* ===== Shutdown ===== */
#off {
  position: fixed; inset: 0; z-index: 9998; cursor: pointer; padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: #000; color: var(--gold); font: 16px var(--pixel);
}
#off[hidden] { display: none; }
#off .small { font: 20px var(--text); color: #777; }

/* ===== Standalone pages ===== */
.site-page {
  min-height: 100%; padding: 32px 16px 80px;
  display: flex; flex-direction: column; align-items: center;
}
.page-frame {
  width: min(720px, 100%); background: var(--paper); border: 2px solid #000;
  box-shadow: 6px 6px 0 rgba(0,0,0,.6);
}
.page-frame .titlebar { background: #000; color: var(--gold); }
.page-body { padding: 24px; }
.page-top { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.about-portrait {
  display: block; width: min(100%, 360px); max-height: 520px; margin: 0 auto 24px;
  object-fit: cover; border: 2px solid #000; box-shadow: 4px 4px 0 rgba(0,0,0,.55);
}
.page-body h1 { margin: 0 0 12px; font: 22px var(--pixel); color: var(--maroon); }
.page-body h2 { margin: 24px 0 10px; font: 14px var(--pixel); color: var(--maroon); }
.page-body p { margin: 0 0 14px; }
.portfolio-folder { margin-top: 16px; background: var(--paper); border: 2px solid #000; }
.folder-summary {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  cursor: pointer; list-style: none; font: 13px var(--pixel);
}
.folder-summary::-webkit-details-marker { display: none; }
.folder-summary::after { content: "\25B6"; margin-left: auto; font-size: 10px; }
.portfolio-folder[open] .folder-summary { color: var(--gold); background: #2a2a2a; }
.portfolio-folder[open] .folder-summary::after { content: "\25BC"; }
.folder-summary svg { width: 28px; height: 28px; }
.folder-content { padding: 0 16px 16px; }
.folder-content > p { margin-top: 16px; }
.portfolio-item { margin-top: 20px; padding-top: 16px; border-top: 2px dashed #000; }
.portfolio-item h2 { margin-top: 0; }
.artifact-date { margin-top: -4px; color: var(--maroon); font: 12px var(--pixel); text-transform: lowercase; }
.portfolio-preview {
  display: block; width: 100%; height: 520px; margin: 16px 0;
  object-fit: contain; background: #000; border: 2px solid #000;
}
.portfolio-carousel {
  margin-top: 18px;
  border: 2px solid #000;
  background: #dedede;
}
.carousel-viewport {
  position: relative;
  min-height: 720px;
  overflow: visible;
}
.carousel-slide {
  display: none;
  padding: 12px 12px 0;
  overflow: visible;
}
.carousel-slide.is-active { display: block; }
.carousel-slide h3 {
  margin: 0 0 8px;
  font: 18px var(--pixel);
  color: var(--maroon);
}
.carousel-slide .artifact-date {
  margin: 0 0 8px;
}
.carousel-slide .portfolio-preview {
  display: block;
  width: 100%;
  height: clamp(500px, 60vw, 700px);
  margin: 12px 0 0;
  border: 2px solid #000;
  background: #000;
  overflow: visible;
  transform: none;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 16px;
}
.carousel-button {
  width: 38px; height: 38px; border: 2px solid #000; background: var(--paper); box-shadow: 2px 2px 0 #000;
  cursor: pointer; font: 16px var(--pixel); color: #000;
}
.carousel-button:active { transform: translate(2px, 2px); box-shadow: none; }
.carousel-dots {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1;
}
.carousel-dot {
  width: 12px; height: 12px; border: 2px solid #000; background: #fff; cursor: pointer; padding: 0;
}
.carousel-dot.is-active { background: var(--gold); }
.page-links { display: flex; flex-wrap: wrap; gap: 10px; }
.booking-form { display: grid; gap: 12px; }
.booking-form label { display: grid; gap: 5px; font: 11px var(--pixel); }
.booking-form input, .booking-form textarea {
  width: 100%; padding: 6px 8px; font: 20px var(--text); color: #000;
  background: #fff; border: 2px solid #000; resize: vertical;
}
.date-window { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.booking-form .row { display: flex; justify-content: flex-end; }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }

/* ===== Phones ===== */
@media (max-width: 640px) {
  #desktop {
    justify-content: center;
    padding-top: 8px;
  }
  .welcome { padding: 0 12px 10px; font-size: clamp(18px, 8vw, 32px); line-height: 1.1; }
  .window { left: 8px !important; top: 8px !important; width: calc(100vw - 16px); }
  .icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 0;
    padding: 0 12px;
  }
  .icon {
    width: min(220px, 76vw);
    padding: 3px 0;
  }
  .icon svg { width: 72px; height: 72px; }
  .icon span {
    max-width: 180px;
    font-size: clamp(12px, 3.2vw, 16px);
    line-height: 1.35;
  }
  #tasks .btn { flex-basis: 44px; }
  #tasks .btn span { display: none; }
  #location { min-width: 0; padding: 0 4px; font-size: 10px; }
  #tray { flex: none; min-width: max-content; padding: 0 6px; font-size: 18px; white-space: nowrap; }
  .site-page { padding: 16px 10px 76px; }
  .page-body { padding: 16px; }
  .page-body h1 { font-size: 18px; overflow-wrap: anywhere; }
  .page-body h2 { font-size: 13px; overflow-wrap: anywhere; }
  .portfolio-preview { height: min(520px, 130vw); }
  .date-window { grid-template-columns: 1fr; gap: 10px; }
  .page-links .btn, .page-footer .btn { width: 100%; }
  .folder-content { padding-right: 10px; padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome { animation: none; background-position: 50% 0; }
}
