/* Percalus — XP desktop portfolio. Layered on top of vendored xp.css. */

:root {
  --taskbar-h: 36px;
  --xp-blue: #245edb;
  --xp-blue-deep: #1941a5;
  --hot-pink: #ff4fa8;
  --grass: #52a625;
  --note-yellow: #ffffd5;
  --pixel-display: "Perfect DOS VGA 437 Win", "Pixelated MS Sans Serif", monospace;
  --pixel-sans: "Pixelated MS Sans Serif", Tahoma, sans-serif;
  --ui-font: Tahoma, "Segoe UI", Verdana, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--ui-font);
}

/* ---------- desktop ---------- */

#desktop {
  position: fixed;
  inset: 0 0 var(--taskbar-h) 0;
  overflow: hidden;
  user-select: none;
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wallpaper svg,
.wallpaper img,
.wallpaper video {
  width: 100%;
  height: 100%;
  display: block;
}
.wallpaper img,
.wallpaper video {
  object-fit: cover;
  object-position: center;
}
/* reduced-motion: hold the still poster instead of the loop */
@media (prefers-reduced-motion: reduce) {
  .wallpaper-video {
    background: url("../assets/hero-poster.jpg?v=2") center / cover no-repeat;
  }
}
.clouds {
  animation: cloud-drift 120s ease-in-out infinite alternate;
}
@keyframes cloud-drift {
  from { transform: translateX(-40px); }
  to   { transform: translateX(60px); }
}

/* ---------- hero text ---------- */

.hero-text {
  position: absolute;
  top: 13%;
  right: 5%;
  z-index: 1;
  text-align: right;
  color: #fff;
  text-shadow: 1px 2px 0 rgba(10, 30, 90, 0.55);
  pointer-events: none;
}
.hero-text h1 {
  font-family: var(--pixel-display);
  font-size: clamp(56px, 8.5vw, 118px);
  line-height: 0.92;
  margin: 0;
  font-weight: 400;
  letter-spacing: 2px;
}
.hero-text .hero-sub {
  font-family: var(--pixel-display);
  font-size: clamp(17px, 1.8vw, 25px);
  margin: 12px 0 0;
}
.hero-text .hero-handle {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 14px;
  font-family: var(--pixel-sans);
  font-size: 13px;
  color: #fff;
  background: rgba(20, 40, 120, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  text-shadow: none;
  backdrop-filter: blur(2px);
}
/* the handle is a real link — re-enable clicks the .hero-text wrapper disables */
.hero-text .hero-handle {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hero-text a.hero-handle:hover {
  background: rgba(255, 79, 168, 0.55);
  border-color: rgba(255, 255, 255, 0.85);
}

/* ---------- desktop icons ---------- */

#icon-grid {
  position: absolute;
  top: 18px;
  left: 14px;
  right: 14px;
  bottom: 48px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 14px;
  pointer-events: none; /* container spans the desktop; only icons catch clicks */
}
.desktop-icon { pointer-events: auto; }
.desktop-icon.dragging { opacity: 0.75; }
.icon-recycle {
  position: absolute;
  right: 4px;
  bottom: 2px;
}
.desktop-icon {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  width: 92px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 3px;
}
.desktop-icon img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(1px 2px 1px rgba(10, 30, 90, 0.4));
}
.desktop-icon span {
  font-family: var(--pixel-sans);
  font-size: 13px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(10, 30, 90, 0.85);
  line-height: 1.15;
}
.desktop-icon:hover img { filter: drop-shadow(1px 2px 1px rgba(10,30,90,.4)) brightness(1.08); }
.desktop-icon:active,
.desktop-icon.selected {
  background: rgba(49, 106, 197, 0.45);
  border: 1px dotted rgba(255, 255, 255, 0.8);
}
.desktop-icon:focus-visible {
  outline: none;
  background: rgba(49, 106, 197, 0.45);
  border: 1px dotted #fff;
}

/* rubber-band marquee selection */
.marquee {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(49, 106, 197, 0.28);
  pointer-events: none;
}

/* ---------- windows ---------- */

#windows {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none; /* windows themselves re-enable */
}

.app-window {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  max-width: calc(100vw - 20px);
  box-shadow: 4px 6px 16px rgba(10, 25, 70, 0.4);
  animation: win-open 130ms ease-out;
}
@keyframes win-open {
  from { transform: scale(0.92); opacity: 0.4; }
  to   { transform: scale(1); opacity: 1; }
}
.app-window .title-bar { cursor: default; }
.app-window .title-bar-text {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.title-bar-icon { width: 16px; height: 16px; flex: none; }

/* dim inactive windows (xp.css has no inactive state) */
.app-window.inactive .title-bar { filter: saturate(0.45) brightness(1.12); }
.app-window.inactive { box-shadow: 3px 4px 10px rgba(10, 25, 70, 0.25); }

.app-window.maximized {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
}
.app-window.minimized { display: none; }

/* bottom-right resize grip (XP status-bar dots) */
.resize-grip {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 18px;
  height: 18px;
  z-index: 6;
  cursor: nwse-resize;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cg fill='%23ffffff'%3E%3Crect x='10' y='2' width='2' height='2'/%3E%3Crect x='10' y='6' width='2' height='2'/%3E%3Crect x='6' y='6' width='2' height='2'/%3E%3Crect x='10' y='10' width='2' height='2'/%3E%3Crect x='6' y='10' width='2' height='2'/%3E%3Crect x='2' y='10' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%238a96a8'%3E%3Crect x='9' y='1' width='2' height='2'/%3E%3Crect x='9' y='5' width='2' height='2'/%3E%3Crect x='5' y='5' width='2' height='2'/%3E%3Crect x='9' y='9' width='2' height='2'/%3E%3Crect x='5' y='9' width='2' height='2'/%3E%3Crect x='1' y='9' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") no-repeat bottom 2px right 2px;
}
.app-window.maximized .resize-grip { display: none; }

.app-window {
  max-height: calc(100vh - var(--taskbar-h) - 28px);
}
.app-window .window-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  margin: 0 3px 3px;
  position: relative;
}
.explorer-addressbar, .explorer-status { flex: none; }
.explorer-content { flex: 1; overflow: auto; }
.contact-body { overflow: auto; }

/* ---------- explorer chrome ---------- */

.explorer-addressbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: #efedde;
  border-bottom: 1px solid #d6d2bc;
  font-size: 12px;
}
.explorer-addressbar .address-label { color: #6f6d62; }
.explorer-addressbar .address-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.explorer-addressbar .address-field img { width: 14px; height: 14px; }

.explorer-content { padding: 12px 14px 16px; }
.explorer-blurb {
  margin: 0 0 12px;
  font-size: 12px;
  color: #444;
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px 10px;
}
.file-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.file-tile:hover {
  background: #e8f0fb;
  border-color: #bcd4f1;
}
.file-tile .thumb {
  width: 96px;
  height: 72px;
  border: 1px solid #9aa5b8;
  box-shadow: 2px 2px 0 rgba(60, 80, 120, 0.18);
}
.file-tile figcaption {
  font-size: 11px;
  color: #1a1a1a;
  font-family: var(--pixel-sans);
  max-width: 118px;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* placeholder thumbnails in her palette */
.thumb.t1 { background: linear-gradient(135deg, #ff4fa8, #ff9ad2 55%, #ffd6ec); }
.thumb.t2 { background:
  repeating-conic-gradient(#5e9fe0 0 25%, #fff 0 50%) 0 0 / 24px 24px; }
.thumb.t3 { background: linear-gradient(180deg, #1b53b8, #5e9fe0 60%, #8ed04e 60.5%, #2c6e12); }
.thumb.t4 { background: radial-gradient(circle at 30% 30%, #ffffd5, #ffbb00 65%, #f65314); }
.thumb.t5 { background:
  repeating-linear-gradient(45deg, #2b1d8f 0 12px, #4434c9 12px 24px); }
.thumb.t6 { background: linear-gradient(160deg, #52a625, #a8e060 50%, #ff4fa8 50.5%, #ff9ad2); }

/* real work thumbnails */
.thumb-img {
  display: block;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

/* project folder tiles — cover reads as a little stack, name as a folder label */
.project-tile .thumb-img {
  box-shadow: 3px 3px 0 #fff, 4px 4px 0 #9aa5b8;
}
.project-tile { margin-right: 4px; }
.project-tile figcaption {
  font-weight: 700;
  color: #1b2f8a;
  text-align: center;
  font-family: var(--ui-font);
}

/* image viewer window */
.viewer-body {
  padding: 10px;
  background: #6b6f7a;
  text-align: center;
}
.viewer-body img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 560px);
  margin: 0 auto;
  border: 1px solid #3c3f47;
  background: #fff;
}
.viewer-caption {
  margin: 8px 0 2px;
  font-size: 12px;
  color: #f0f0f3;
  font-family: var(--pixel-sans);
}

/* press & talks */
.press-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.press-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid #d4d9e4;
  border-radius: 3px;
  background: #fdfdfe;
  text-decoration: none;
  color: #1a1a1a;
}
.press-card:hover {
  background: #e8f0fb;
  border-color: #bcd4f1;
}
.press-card img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border: 1px solid #9aa5b8;
  flex: none;
}
.press-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.press-meta b { font-size: 12px; line-height: 1.3; }
.press-meta small { font-size: 11px; color: #57606e; }
/* blog folder & articles */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-file {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid #d4d9e4;
  border-radius: 3px;
  background: #fdfdfe;
  font-family: var(--ui-font);
  text-align: left;
  color: #1a1a1a;
  cursor: pointer;
}
.blog-file:hover {
  background: #e8f0fb;
  border-color: #bcd4f1;
}
.blog-file img { width: 30px; height: 30px; flex: none; }

.blog-article {
  overflow: auto;
  padding: 18px 22px 24px;
  font-size: 13px;
  line-height: 1.65;
}
.blog-article h2 {
  font-family: var(--pixel-display);
  font-size: 23px;
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 6px;
  color: #1b2f8a;
}
.blog-article h3 {
  font-size: 13.5px;
  margin: 18px 0 4px;
  color: #1b2f8a;
}
.blog-article p { margin: 0 0 11px; }
.blog-byline {
  font-size: 11px;
  color: #999;
  font-style: italic;
  border-bottom: 1px dotted #d8d8d8;
  padding-bottom: 10px;
  margin-bottom: 14px !important;
}

.press-podcast-label {
  margin: 12px 0 6px;
  font-size: 12px;
  color: #444;
}
.press-podcast {
  border: 0;
  border-radius: 8px;
  display: block;
}

/* about facts */
.about-facts {
  margin: 10px 0;
  padding-left: 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.explorer-status {
  padding: 3px 8px;
  background: #efedde;
  border-top: 1px solid #d6d2bc;
  font-size: 11px;
  color: #57554a;
}

/* tools list */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tool-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 4px;
  font-size: 13px;
  border-bottom: 1px dotted #d8d8d8;
}
.tool-list li small { color: #777; margin-left: auto; }
.tool-dot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 3px;
  background: var(--c, #999);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

/* ---------- paint ---------- */

.paint-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.paint-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #efedde;
  border-bottom: 1px solid #d6d2bc;
}
.paint-tools, .paint-sizes { display: flex; gap: 3px; }
.paint-tool, .paint-size {
  appearance: none;
  width: 32px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  border: 1px solid #aca899;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
}
.paint-tool:hover, .paint-size:hover { border-color: #003c74; }
.paint-tool.active, .paint-size.active {
  background: #fff2c8;
  border-color: #003c74;
  box-shadow: inset 1px 1px 2px rgba(120, 90, 0, 0.25);
}
.paint-size span {
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: #1a1a1a;
}
.paint-sep { width: 1px; height: 22px; background: #d6d2bc; }
.paint-actions { margin-left: auto; display: flex; gap: 6px; }
.paint-actions button {
  font-family: var(--ui-font);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  border: 1px solid #003c74;
  border-radius: 3px;
}
.paint-actions button:hover { background: linear-gradient(180deg, #fff, #fff0cf 45%, #f0d29a); }
.paint-canvas-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #6b6f7a;
  padding: 10px;
  display: grid;
  place-items: center;
}
.paint-canvas {
  display: block;
  background: #fff;
  border: 1px solid #3c3f47;
  cursor: crosshair;
  touch-action: none;
}
.paint-palette {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: #efedde;
  border-top: 1px solid #d6d2bc;
}
.paint-current {
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid #7f9db9;
  background: var(--cur, #000);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}
.paint-swatches {
  display: grid;
  grid-template-columns: repeat(8, 17px);
  gap: 3px;
}
.paint-swatch {
  appearance: none;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid #808080;
  background: var(--c);
  cursor: pointer;
}
.paint-swatch:hover { outline: 1px solid #003c74; }
.paint-status {
  flex: none;
  padding: 3px 8px;
  background: #efedde;
  border-top: 1px solid #d6d2bc;
  font-size: 11px;
  color: #57554a;
}

/* ---------- recycle bin ---------- */

.recycle-item .thumb { filter: saturate(0.5) brightness(0.97); }
/* recycle window lays out as a column so the action bar pins to the bottom,
   no matter how large the window is resized */
.explorer-content:has(.recycle-actions) {
  display: flex;
  flex-direction: column;
}
.explorer-content:has(.recycle-actions) .file-grid { flex: none; align-content: start; }
.recycle-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
}
.recycle-empty {
  font-family: var(--ui-font);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  border: 1px solid #003c74;
  border-radius: 3px;
}
.recycle-empty:hover { background: linear-gradient(180deg, #fff, #fff0cf 45%, #f0d29a); }

/* contact / about */
.contact-body { padding: 18px 20px 20px; font-size: 13px; line-height: 1.5; }
.contact-headline {
  font-family: var(--pixel-display);
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 12px;
  color: #1b2f8a;
}
.contact-links { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.contact-links a {
  font-family: var(--pixel-sans);
  font-size: 14px;
  color: #0026ff;
}
.contact-note { font-size: 11px; color: #999; font-style: italic; }

/* mail compose — Outlook Express "New Message" */
.mail-compose {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  font-family: var(--pixel-sans);
  font-size: 12px;
  background: #fff;
}
.mail-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 5px 8px;
  background: linear-gradient(180deg, #f6f6ef, #e7e4d5);
  border-bottom: 1px solid #aca899;
}
.mail-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pixel-sans);
  font-size: 12px;
  font-weight: 700;
  color: #1b2f8a;
  padding: 4px 14px 4px 9px;
  background: #ece9d8;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080, 1px 1px 0 #000;
  border-radius: 0;
  cursor: pointer;
}
.mail-send-btn:hover { background: #f4f2e6; }
.mail-send-btn:active {
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px 0 #808080;
}
.mail-send-btn[disabled] { color: #8a8674; cursor: default; box-shadow: none; border-color: #cfccbe; }
.mail-send-icon { font-size: 14px; color: #c79a00; }
.mail-toolbar-hint { color: #6b6750; font-size: 11px; }

.mail-headers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
  padding: 8px 10px;
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
}
.mail-row { display: flex; align-items: center; gap: 8px; margin: 0; }
.mail-label {
  flex: 0 0 52px;
  text-align: right;
  color: #1b1b1b;
}
.mail-field {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--pixel-sans);
  font-size: 12px;
  padding: 3px 5px;
  background: #fff;
  color: #111;
  border: 1px solid;
  border-color: #404040 #dfdfdf #dfdfdf #404040;
  border-radius: 0;
}
.mail-field:focus { outline: 1px dotted #1b2f8a; outline-offset: -3px; }
.mail-readonly {
  background: #ece9d8;
  color: #444;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  cursor: default;
}
.mail-optional { flex: 0 0 auto; color: #8a8674; font-size: 11px; font-style: italic; }

.mail-message {
  flex: 1 1 auto;
  min-height: 132px;
  margin: 0;
  padding: 9px 10px;
  resize: none;
  font-family: var(--pixel-sans);
  font-size: 13px;
  line-height: 1.45;
  color: #111;
  background: #fff;
  border: 0;
  border-radius: 0;
}
.mail-message:focus { outline: 1px dotted #1b2f8a; outline-offset: -4px; }
.mail-footer {
  flex: none;
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 11px;
  color: #8a8674;
  background: #ece9d8;
  border-top: 1px solid #aca899;
}
.mail-footer a { color: #0026ff; }
.mail-botcheck { display: none !important; }

/* book window */
.book-body { padding: 18px 20px 20px; text-align: center; overflow: auto; }
.book-cover {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 14px;
  border: 1px solid #9aa5b8;
  box-shadow: 3px 4px 10px rgba(20, 40, 90, 0.28);
}
.book-title {
  font-family: var(--pixel-display);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 8px;
  color: #1b2f8a;
}
.book-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 14px;
}
.book-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}
.book-price {
  font-family: var(--pixel-display);
  font-size: 26px;
  color: #1b2f8a;
}
.book-btn {
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ff85c6 0%, #ff4fa8 48%, #e6398f 52%, #ff4fa8 100%);
  border: 1px solid #a32468;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55),
              inset -1px -2px 3px rgba(120, 10, 60, 0.35),
              2px 2px 4px rgba(40, 10, 40, 0.25);
}
.book-btn:hover { filter: brightness(1.06); }
.book-btn:active { box-shadow: inset 1px 1px 4px rgba(120, 10, 60, 0.5); }
.book-note { font-size: 11px; color: #999; font-style: italic; margin: 2px 0 0; }

/* case-study tile (a .txt file in a project folder) */
.doc-tile .thumb-img {
  object-fit: contain;
  background: #fff;
  padding: 6px;
}

/* notepad window for the case-study .txt */
.notepad-menu {
  flex: none;
  display: flex;
  gap: 14px;
  padding: 3px 8px;
  background: #ece9d8;
  border-bottom: 1px solid #d6d2bc;
  font-size: 12px;
  color: #333;
}
.notepad-menu span { cursor: default; }
.notepad-body {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: 12px 14px;
  background: #fff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- about: setup wizard ---------- */
.wizard {
  flex: 1;
  display: flex;
  min-height: 320px;
}
.wizard-banner {
  flex: none;
  width: 120px;
  display: flex;
  align-items: flex-end;
  padding: 14px 12px;
  background: linear-gradient(160deg, #2f6fd4 0%, #2458b8 42%, #1c3f93 100%);
  position: relative;
  overflow: hidden;
}
.wizard-banner::after {
  content: "";
  position: absolute;
  left: -20px; right: -20px; top: -12px; height: 78px;
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(180deg, #8ec06f, #5aa53a 60%, #3f8f24);
  opacity: 0.55;
}
.wizard-banner-title {
  position: relative;
  font-family: var(--pixel-display);
  font-size: 26px;
  line-height: 1.02;
  color: #fff;
  text-shadow: 1px 2px 0 rgba(10, 30, 90, 0.45);
}
.wizard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.wizard-body { flex: 1; overflow: auto; padding: 16px 18px; }
.wizard-label {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2f71cd;
  font-weight: 700;
}
.wizard-title {
  font-family: var(--pixel-display);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 400;
  margin: 0 0 10px;
  color: #1b2f8a;
}
.wizard-text { font-size: 13px; line-height: 1.6; color: #2a2a2a; }
.wizard-text b { color: #1b2f8a; }
.wizard-cta-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.wizard-cta {
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ff85c6 0%, #ff4fa8 48%, #e6398f 52%, #ff4fa8 100%);
  border: 1px solid #a32468;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5);
}
.wizard-cta-ghost {
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  color: #1b3c7a;
  border: 1px solid #7f9db9;
  box-shadow: none;
}
.wizard-cta:hover { filter: brightness(1.05); }
.wizard-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: #efedde;
  border-top: 1px solid #d6d2bc;
}
.wizard-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7c2ad;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15);
}
.wizard-dot.done { background: #2f71cd; }
.wizard-nav { display: flex; gap: 8px; flex: none; }
.wizard-back, .wizard-next {
  font-family: var(--ui-font);
  font-size: 12.5px;
  padding: 5px 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  border: 1px solid #003c74;
  border-radius: 3px;
}
.wizard-back:hover, .wizard-next:hover { background: linear-gradient(180deg, #fff, #fff0cf 45%, #f0d29a); }
.wizard-back:disabled { color: #aaa; border-color: #bbb; cursor: default; background: #eee; }
.wizard-next { font-weight: 700; min-width: 86px; }

/* ---------- win98 gray dialogs ---------- */

.window.win98 {
  font-family: var(--pixel-sans);
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  border-radius: 0;
  box-shadow: 1px 1px 0 #000, 5px 6px 14px rgba(0, 0, 0, 0.35);
  padding: 2px;
}
.window.win98 .title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  border-radius: 0;
  padding: 2px 3px 2px 6px;
  height: auto;
  filter: none !important;
}
.window.win98 .title-bar-text {
  color: #fff;
  font-family: var(--pixel-sans);
  font-weight: 700;
  font-size: 12px;
  text-shadow: none;
}
.window.win98 .title-bar-controls button {
  width: 16px;
  height: 14px;
  min-width: 0;
  border-radius: 0;
  background: #c0c0c0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7'%3E%3Cpath d='M0 0h2l2 2 2-2h2L5 3.5 8 7H6L4 5 2 7H0l3-3.5z' fill='%23000'/%3E%3C/svg%3E") center no-repeat;
  border: 1px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
.window.win98 .title-bar-controls button:active {
  border-color: #404040 #dfdfdf #dfdfdf #404040;
}
.window.win98 .window-body {
  background: #c0c0c0;
  margin: 0;
  padding: 14px 16px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  overflow: visible;
}
.win98 .dialog-icon { font-size: 30px; line-height: 1; }
.win98 .dialog-text { flex: 1; }
.win98 .dialog-text p { margin: 0 0 6px; }
.win98 .dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 10px;
  background: #c0c0c0;
}
.win98 .dialog-buttons button {
  font-family: var(--pixel-sans);
  font-size: 12px;
  min-width: 76px;
  padding: 4px 12px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080, 1px 1px 0 #000;
  border-radius: 0;
  cursor: pointer;
}
.win98 .dialog-buttons button:active {
  border-color: #404040 #dfdfdf #dfdfdf #404040;
  box-shadow: none;
}
.win98 .dialog-buttons button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* ---------- taskbar ---------- */

#taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  z-index: 9999;
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg,
    #1f2f86 0%, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%,
    #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%,
    #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
  box-shadow: 0 -1px 0 #0c2c8a;
}

#start-button {
  appearance: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 22px 0 12px;
  margin-right: 10px;
  color: #fff;
  font-family: "Trebuchet MS", var(--ui-font);
  font-size: 19px;
  font-weight: 700;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  background: linear-gradient(180deg,
    #4cae38 0%, #71d04f 8%, #5dc141 20%, #45a82e 45%,
    #3d9e27 55%, #399523 80%, #2e7e1b 95%);
  border-radius: 0 12px 12px 0;
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.4),
              inset -4px -3px 6px rgba(20, 80, 10, 0.5),
              2px 0 4px rgba(0, 0, 0, 0.3);
}
#start-button svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}
#start-button:hover { filter: brightness(1.08); }
#start-button:active, #start-button[aria-expanded="true"] { filter: brightness(0.92); }

#task-buttons {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px;
  overflow: hidden;
}
.task-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  height: 28px;
  min-width: 0;
  max-width: 170px;
  flex: 0 1 170px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #fff;
  font-family: var(--ui-font);
  font-size: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4e8df0 0%, #3a78e8 45%, #2e69dd 50%, #3a77e4 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35), inset -1px -1px 1px rgba(0, 20, 90, 0.4);
  white-space: nowrap;
}
.task-btn img { width: 16px; height: 16px; flex: none; }
.task-btn span { overflow: hidden; text-overflow: ellipsis; }
.task-btn.active {
  background: linear-gradient(180deg, #1c50b8 0%, #2156bd 50%, #2c63cd 100%);
  box-shadow: inset 1px 1px 3px rgba(0, 10, 60, 0.6);
}

#tray {
  display: flex;
  align-items: center;
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg,
    #0c59b9 0%, #139ee9 4%, #18b5f2 8%, #139beb 12%, #1290e8 16%,
    #0d8dea 24%, #0d8dea 64%, #0d9fee 78%, #0d9fee 86%, #0f9bed 92%, #02448c 100%);
  box-shadow: inset 2px 0 3px rgba(0, 20, 80, 0.4);
}
#clock {
  color: #fff;
  font-size: 12px;
  font-family: var(--ui-font);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

/* language switch (EN | МК), sits in the system tray left of the clock */
#lang-toggle {
  display: flex;
  align-items: center;
  margin-right: 12px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0, 28, 86, 0.30);
  box-shadow: inset 1px 1px 2px rgba(0, 18, 70, 0.55),
              inset -1px -1px 1px rgba(255, 255, 255, 0.14);
}
#lang-toggle button {
  appearance: none;
  border: none;
  cursor: pointer;
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: transparent;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35);
  transition: background 0.12s ease, color 0.12s ease;
}
#lang-toggle button + button { box-shadow: inset 1px 0 0 rgba(0, 18, 70, 0.4); }
#lang-toggle button:hover { color: #fff; }
#lang-toggle button.active {
  color: #1c3e8c;
  background: linear-gradient(180deg, #ffffff 0%, #e8f0ff 55%, #d2e2ff 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

/* ---------- start menu ---------- */

#start-menu {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 9500;
  width: 392px;
  max-width: calc(100vw - 8px);
  border-radius: 7px 7px 0 0;
  background: #4282d6;
  padding: 2px;
  box-shadow: 3px -3px 14px rgba(0, 10, 60, 0.5);
  font-family: var(--ui-font);
}
#start-menu[hidden] { display: none; }

.menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #3a80e0 0%, #2764c8 50%, #1d54b8 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
}
.menu-header img {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: #fff;
}

.menu-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: #fff;
  border-top: 2px solid #e8a93c;
  min-height: 280px;
}
.menu-left { padding: 8px 4px; background: #fff; }
.menu-right {
  padding: 8px 4px;
  background: #d3e5fa;
  border-left: 1px solid #95bdee;
}

.menu-item {
  appearance: none;
  border: none;
  background: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  font-family: var(--ui-font);
  font-size: 12.5px;
  color: #1a1a1a;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
}
.menu-item img { width: 26px; height: 26px; flex: none; }
.menu-item span { display: flex; flex-direction: column; line-height: 1.25; }
.menu-item small { color: #7a7a7a; font-size: 10.5px; }
.menu-item:hover, .menu-item:focus-visible {
  background: #2f71cd;
  color: #fff;
  outline: none;
}
.menu-item:hover small, .menu-item:focus-visible small { color: #cfe0f8; }
.menu-right .menu-item { font-weight: 700; color: #1b3c7a; }
.menu-right .menu-item:hover, .menu-right .menu-item:focus-visible { color: #fff; }
.menu-sep {
  height: 1px;
  margin: 5px 8px;
  background: linear-gradient(90deg, transparent, #c9c9c9, transparent);
}

.menu-footer {
  display: flex;
  justify-content: flex-end;
  padding: 6px 10px;
  border-radius: 0 0 0 0;
  background: linear-gradient(180deg, #3a80e0 0%, #2764c8 60%, #1d54b8 100%);
}
#log-off {
  appearance: none;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-family: var(--ui-font);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
}
#log-off:hover { background: rgba(255, 255, 255, 0.18); }
.logoff-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(160deg, #f8b16a, #e25141 60%, #b22a1c);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.6);
  position: relative;
}
.logoff-icon::after {
  content: "";
  position: absolute;
  inset: 4px 6px;
  border: 2px solid #fff;
  border-top: none;
  border-radius: 0 0 4px 4px;
}

/* ---------- clippy ---------- */

#clippy {
  position: absolute;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  animation: clippy-pop 280ms ease-out;
  transition: left 1.1s ease-in-out, top 1.1s ease-in-out; /* tour walks */
}
#clippy[hidden] { display: none; }

/* bubble hides while Clippy walks between tour stops */
.clippy-bubble {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#clippy.bubble-hidden .clippy-bubble {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
#clippy.walking .clippy-img {
  animation: clippy-waddle 0.45s ease-in-out infinite;
}
@keyframes clippy-waddle {
  0%, 100% { transform: rotate(-7deg) translateY(-2px); }
  50%      { transform: rotate(7deg) translateY(-5px); }
}
@keyframes clippy-pop {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.clippy-bubble {
  position: relative;
  width: 248px;
  background: var(--note-yellow);
  border: 1px solid #9c945c;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--pixel-sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: #222;
  box-shadow: 3px 4px 10px rgba(40, 40, 0, 0.25);
}
.clippy-bubble::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  background: var(--note-yellow);
  border-right: 1px solid #9c945c;
  border-bottom: 1px solid #9c945c;
  transform: rotate(45deg) skew(8deg, 8deg);
}
.clippy-bubble p { margin: 0 0 6px; }
.clippy-title { font-weight: 700; }
.clippy-actions { display: flex; gap: 7px; margin-top: 9px; }
.clippy-actions button {
  font-family: var(--pixel-sans);
  font-size: 11.5px;
  padding: 4px 9px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #ecebe5 45%, #d8d0bf);
  border: 1px solid #003c74;
  border-radius: 3px;
}
.clippy-actions button:hover { background: linear-gradient(180deg, #fff, #fff0cf 45%, #f0d29a); }
.clippy-img {
  width: 74px;
  height: 88px;
  margin-right: 28px;
  filter: drop-shadow(2px 3px 3px rgba(0, 20, 60, 0.35));
  animation: clippy-bounce 3.2s ease-in-out infinite;
}
@keyframes clippy-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-7px) rotate(-4deg); }
}

/* ---------- mobile ---------- */

@media (max-width: 767px) {
  .hero-text {
    top: auto;
    bottom: 18%;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 14px;
  }
  .hero-text h1 { font-size: clamp(44px, 13vw, 64px); }

  #icon-grid {
    top: 14px;
    left: 8px;
    right: 8px;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .desktop-icon { width: auto; }
  .icon-recycle { position: static; } /* joins the grid on phones */
  .resize-grip { display: none; }

  #clippy { left: auto !important; top: auto !important; right: 10px; bottom: 8px; transition: none; }
  .clippy-bubble { width: min(240px, 72vw); }
  .clippy-img { width: 56px; height: 67px; margin-right: 18px; }

  #start-menu { width: calc(100vw - 8px); }
  .menu-columns { min-height: 240px; }

  #task-buttons { display: none; } /* taskbar stays minimal on phones */
  #tray { margin-left: auto; } /* no task buttons to fill the gap — push the tray right */
  #start-button { font-size: 17px; padding: 0 16px 0 10px; }

  .file-grid { grid-template-columns: repeat(2, 1fr); }
  .wizard-banner { width: 84px; padding: 12px 8px; }
  .wizard-banner-title { font-size: 21px; }
}
