:root {
  --bg: #0b0b0b;
  --ui: #e7d8eb;
  --shadow: #808080;
  --hilite: #ffffff;
  --text: #111;
  --blue: #4287f5;
  --focus: #000000;
  --border: #000;
  --radius: 0px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 220, 110, 0.28), rgba(255, 220, 110, 0.28)),
    url("./assets/background3.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Arial,
    Helvetica,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}

.desktop {
  background: transparent;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--hilite);
  color: var(--text);
  padding: 8px 10px;
  border: 2px solid var(--border);
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  z-index: 99999;
}

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

.desktop {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
}

.muted {
  color: rgba(0, 0, 0, 0.7);
}

.desktop-surface {
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  max-width: 260px;
}

.icon {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #e7d8eb;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
  padding: 8px;
  border-radius: 2px;
  display: grid;
  justify-items: center;
  gap: 6px;
  cursor: pointer;
}
.icon img {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
}
.icon:focus-visible {
  outline: 2px solid var(--hilite);
  outline-offset: 2px;
}
.icon:hover {
  background: rgba(255, 255, 255, 0.08);
}
.icon span {
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
  word-break: break-word;
}

/* Desktop-only: draggable icons (absolute positioned) */
@media (min-width: 781px) {
  html.js .icon-grid {
    position: absolute;
    inset: 0;
    display: block;
    max-width: none;
  }

  html.js .icon {
    position: absolute;
    left: var(--ix, 14px);
    top: var(--iy, 14px);
    width: 132px;
    touch-action: none;
  }

  html.js .icon:hover {
    background: rgba(255, 255, 255, 0.09);
  }

  html.js .icon.is-dragging {
    opacity: 0.9;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.35));
  }
}

.windows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  left: var(--x, 40px);
  top: var(--y, 40px);
  width: min(var(--w, 600px), calc(100vw - 36px));
  background: #A5EFFA;
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

/* subtle 90s bevel */
.window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 1px 1px 0 var(--hilite),
    inset -1px -1px 0 var(--shadow);
}

.window[hidden] {
  display: none !important;
}

.window.is-minimized {
  display: none !important;
}

.window__titlebar {
  user-select: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px;
  color: #A5EFFA;
  background: #FAB2A5;
  border-bottom: 2px solid var(--border);
}

.window.is-focused .window__titlebar {
  filter: brightness(1.1);
}

.window__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
}

.window__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.winbtn {
  width: 26px;
  height: 22px;
  border: 2px solid var(--border);
  background: var(--ui);
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.winbtn:active {
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--hilite);
}
.winbtn:focus-visible {
  outline: 2px solid var(--hilite);
  outline-offset: 1px;
}

.window__body {
  padding: 12px 12px 14px;
  max-height: min(66vh, 520px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #FAB2A5 #A5EFFA;
}

.window__body::-webkit-scrollbar {
  width: 16px;
}
.window__body::-webkit-scrollbar-track {
  background: #A5EFFA;
  border-left: 2px solid var(--border);
}
.window__body::-webkit-scrollbar-thumb {
  background: #FAB2A5;
  border: 2px solid var(--border);
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
}
.window__body::-webkit-scrollbar-thumb:hover {
  background: #f8a090;
}
.window__body::-webkit-scrollbar-button:single-button {
  height: 16px;
  background: var(--ui);
  border: 2px solid var(--border);
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
}

h2 {
  margin: 0 0 10px;
  font-size: 18px;
}
h3 {
  margin: 14px 0 8px;
  font-size: 14px;
}
p {
  margin: 0 0 10px;
  line-height: 1.4;
}
ul {
  margin: 8px 0 12px;
  padding-left: 18px;
}
li {
  margin: 6px 0;
}

.callout {
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 10px;
  margin: 12px 0;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.card {
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 10px;
}

.list {
  display: grid;
  gap: 10px;
}

.clip {
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 10px;
}
.meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
}

.talkmeta {
  margin: 10px 0 6px;
  padding: 10px;
  border: 2px solid var(--border);
  background: var(--hilite);
}
.talkmeta h3 {
  margin-top: 0;
}

.bullets {
  list-style: square;
}

.folder {
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 6px 8px;
}
.folder + .folder {
  margin-top: 10px;
}
.folder > summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}
.folder > summary::-webkit-details-marker {
  display: none;
}
.folder > summary::before {
  content: "📁";
  font-size: 14px;
}
.folder[open] > summary::before {
  content: "📂";
}
.filelist {
  margin: 6px 0 2px;
  padding-left: 18px;
}
.filelist a {
  color: inherit;
  text-decoration: underline;
}
.filelist a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.filegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  padding: 8px 2px 2px;
}

.filecard {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.filecard--button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.filecard:focus-visible .thumbbox {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.filecard:hover .thumbbox {
  filter: brightness(1.02);
}

.thumbbox {
  width: 104px;
  height: 88px;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
  overflow: hidden;
}

.thumbimg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filename {
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  max-width: 120px;
  word-break: break-word;
}

.art-popup[hidden] {
  display: none !important;
}
.art-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
}
.art-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.art-popup__panel {
  position: relative;
  margin: 20px auto;
  width: min(92vw, 1100px);
  max-height: calc(100dvh - 40px);
  border: 2px solid var(--border);
  background: #111;
  color: #fff;
  padding: 10px 10px 12px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.art-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 26px;
  border: 2px solid var(--border);
  background: var(--ui);
  color: #111;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.art-popup__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  background: rgba(231, 216, 235, 0.92);
  color: #111;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  z-index: 2;
}
.art-popup__nav--prev {
  left: 8px;
}
.art-popup__nav--next {
  right: 8px;
}
.art-popup__img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 108px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.art-popup__title {
  margin-top: 8px;
  font-size: 12px;
  color: #ddd;
}

.mono {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    Liberation Mono,
    monospace;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 2px solid var(--border);
  background: var(--ui);
  color: var(--text);
  text-decoration: none;
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
  cursor: pointer;
  font-weight: 700;
}
.btn.secondary {
  background: var(--hilite);
}
.btn.accent {
  background: #FAB2A5;
  color: var(--text);
}
.btn.accent:hover {
  background: #A5EFFA;
}
.btn:active {
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--hilite);
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.contactbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 10px;
  margin: 10px 0 14px;
}
.contactbox__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.taskbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--ui);
  border-top: 2px solid var(--border);
}

.start {
  border: 2px solid var(--border);
  background: var(--ui);
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 800;
}
.start:active {
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--hilite);
}
.start:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.taskbar__tasks {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 2px;
}

.task {
  min-width: 140px;
  max-width: 240px;
  border: 2px solid var(--border);
  background: var(--hilite);
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset 1px 1px 0 var(--hilite);
}
.task.is-active {
  background: var(--ui);
}
.task:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.taskbar__tray {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tray-chip {
  display: inline-block;
  padding: 4px 6px;
  border: 2px solid var(--border);
  background: var(--hilite);
  font-size: 12px;
}

.taskbar-clock {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 2px;
  color: rgba(0, 0, 0, 0.9);
}

.noscript {
  position: fixed;
  inset: auto 10px 60px 10px;
  background: var(--hilite);
  border: 2px solid var(--border);
  padding: 10px;
  z-index: 99999;
}

/* No-JS fallback: show all windows stacked so content remains readable */
html:not(.js) .windows {
  position: static;
  pointer-events: auto;
  margin-top: 12px;
}
html:not(.js) .window {
  position: static;
  width: auto;
  margin: 10px 0;
}
html:not(.js) .window[hidden] {
  display: block !important;
}
html:not(.js) .noscript {
  position: static;
  inset: auto;
  margin: 10px 0 0;
}

/* Mobile: make windows flow like stacked panels */
@media (max-width: 780px) {
  .desktop {
    height: auto;
    min-height: 100dvh;
  }

  .desktop-surface {
    overflow: visible;
    padding-bottom: 70px;
  }

  .windows {
    position: static;
    pointer-events: auto;
    margin-top: 12px;
  }

  .window {
    position: static;
    width: auto;
    margin: 10px 0;
  }

  .window__titlebar {
    position: static;
  }

  .window__body {
    max-height: none;
  }

  .icon-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    max-width: none;
  }

  .task {
    min-width: 110px;
  }

  .taskbar__tasks {
    display: none;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  /* Keep taskbar visible while scrolling content */
  .taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    grid-template-columns: auto 1fr;
    gap: 8px;
  }

  .taskbar__tray {
    justify-self: end;
  }

  /* iOS Safari: fixed background can be janky */
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 420px) {
  .icon-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  /* no-op: we don't use transparency effects for wallpaper */
}


