/* Luna-inspired desktop. Colors and wallpaper are original recreations, not Microsoft assets. */

:root {
  --face: #ece9d8;
  --face-2: #f6f4ea;
  --ink: #111;
  --muted: #3d3d3d;
  --blue: #0054e3;
  --link: #0000cc;
  --taskbar: 30px;
  --task-space: calc(var(--taskbar) + env(safe-area-inset-bottom));
  --font: Tahoma, "Trebuchet MS", Verdana, "Liberation Sans", "Noto Sans", sans-serif;
  --display: "Trebuchet MS", Tahoma, Verdana, "Liberation Sans", "Noto Sans", sans-serif;
  color-scheme: light;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  background: #1a66c4;
}

button,
input { font: inherit; color: inherit; }

img { max-width: 100%; height: auto; }

h1, h2, h3, p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

a { color: var(--link); }

:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

::selection {
  background: #0a246a;
  color: #fff;
}

[hidden] { display: none !important; }

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 90;
  background: #fff;
  color: #000;
  border: 2px solid #003c74;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
}

.skip:focus { top: 8px; }

.bliss {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #3a8ed4 url("../assets/bliss.svg") center / cover no-repeat;
}

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

html.js body { height: 100%; overflow: hidden; }

html.js .desktop {
  position: fixed;
  z-index: 1;
  inset: 0 0 var(--task-space) 0;
}

html.js .icons {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 4px;
  bottom: 6px;
  width: 96px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  padding-bottom: 8px;
}

html.js .windows {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

html.js .windows > .window { pointer-events: auto; }

html.js .windows > .window:not(.is-open) { display: none; }

.windows > .window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 160px;
  background: var(--face);
  border: 3px solid #7a96df;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 2px 3px 8px rgba(0, 0, 20, 0.35);
  overflow: hidden;
}

.windows > .window.is-active { border-color: #0831d9; }

.windows > .window.is-max {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

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

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 88px;
  padding: 4px 4px 6px;
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
}

.desk-icon .label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 80px;
  padding: 1px 3px;
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 2px #000, 1px 0 2px #000, -1px 0 2px #000, 0 0 4px #000;
  overflow-wrap: anywhere;
}

.desk-icon .ico-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.ico { width: 32px; height: 32px; display: block; }
.ico-sm { width: 16px; height: 16px; flex: none; }

.shortcut {
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
}

.desk-icon[data-accent="lime"] .ico { color: #5f8a14; }
.desk-icon[data-accent="amber"] .ico { color: #d4920d; }
.desk-icon[data-accent="pink"] .ico { color: #d4538a; }
.desk-icon[data-accent="blue"] .ico { color: #2f74d0; }

.desk-icon.is-selected .ico-wrap,
.desk-icon:focus-visible .ico-wrap {
  background: rgba(11, 97, 255, 0.45);
  outline: 1px dotted #fff;
}

.desk-icon.is-selected .label,
.desk-icon:focus-visible .label {
  background: #0b61ff;
  outline: 1px dotted #fff;
  text-shadow: none;
}

#desktop-project-icons { display: contents; }

html.js #desktop-project-icons { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }

/* ----- title bar and chrome ----- */

.titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 3px 0 5px;
  flex: none;
  color: #fff;
  background: linear-gradient(180deg, #6a84b8 0%, #44598a 55%, #3c4e7c 100%);
  user-select: none;
  touch-action: manipulation;
}

.window.is-active > .titlebar,
.dialog.is-active > .titlebar {
  background: linear-gradient(
    180deg,
    #1c91ff 0%,
    #0a6ae8 8%,
    #0a5fe0 16%,
    #0856d4 46%,
    #095ad8 82%,
    #0c64e6 91%,
    #0752c8 96%,
    #0848b4 100%
  );
}

.titlebar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
}

.titlebar-controls { display: flex; gap: 2px; flex: none; }

.win-btn {
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  background: linear-gradient(180deg, #4e97f5 0%, #1d62d8 45%, #0c4ec2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 1px #08316b;
  position: relative;
  cursor: pointer;
}

.win-btn:hover { filter: brightness(1.12); }

.win-btn:active {
  filter: brightness(0.92);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px #08316b;
}

.win-btn:focus-visible {
  outline: 2px dotted #fff;
  outline-offset: -4px;
}

.win-btn span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 8px;
  transform: translate(-50%, -50%);
}

.win-min span {
  height: 2px;
  background: #fff;
  top: 68%;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.win-max span {
  border: 1.5px solid #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 #fff;
}

.win-max.is-restore span {
  border: 0;
  background:
    linear-gradient(#fff, #fff) 2px 0 / 8px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 2px 0 / 1.5px 6px no-repeat,
    linear-gradient(#fff, #fff) 9.5px 0 / 1.5px 6px no-repeat,
    linear-gradient(#fff, #fff) 2px 6px / 8px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 0 3px / 7px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 0 3px / 1.5px 7px no-repeat,
    linear-gradient(#fff, #fff) 7px 3px / 1.5px 7px no-repeat,
    linear-gradient(#fff, #fff) 0 10px / 7px 1.5px no-repeat;
}

.win-close span {
  background:
    linear-gradient(#fff, #fff) center / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 100% no-repeat;
  transform: translate(-50%, -50%) rotate(45deg);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

.address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  flex: none;
  background: linear-gradient(180deg, #f8f7f1, var(--face));
  border-bottom: 1px solid #aca899;
}

.address-label { font-size: 11px; padding-left: 2px; }

.address-field {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 6px;
  font-size: 12px;
  min-height: 22px;
}

.window-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  container-type: inline-size;
  background: var(--face);
  scrollbar-color: #c8c6b9 #f3f1e7;
  overscroll-behavior: contain;
}

.window-body:focus-visible {
  outline: 2px dotted #003c74;
  outline-offset: -4px;
}

.window-body::-webkit-scrollbar { width: 16px; height: 16px; }
.window-body::-webkit-scrollbar-track { background: #efece0; }
.window-body::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #fafaf8, #d9d6c8 55%, #c8c5b6);
  border: 1px solid #8d8b80;
}

.statusbar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 22px;
  flex: none;
  padding: 2px;
  background: var(--face);
  border-top: 1px solid #fff;
}

.status-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: 0 6px;
  font-size: 11px;
  border: 1px solid #aca899;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.resizer {
  width: 16px;
  flex: none;
  padding: 0;
  border: 0;
  background:
    linear-gradient(135deg, transparent 0 40%, #fff 40% 48%, transparent 48% 58%, #8d8b80 58% 66%, transparent 66%) right bottom / 12px 12px no-repeat,
    var(--face);
  cursor: nwse-resize;
}

.resizer:focus-visible { outline-offset: -2px; }

body.is-dragging,
body.is-dragging * { cursor: grabbing !important; user-select: none !important; }

@media (pointer: fine) and (min-width: 761px) {
  .titlebar { cursor: grab; }
}

/* ----- window content ----- */

.kicker,
.section-kicker {
  color: #3a3a3a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, .contact-link {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #083a8c;
}

h1 { font-size: 40px; line-height: 0.95; }

h2 { font-size: 22px; line-height: 1.1; }

.hero-copy > * + * { margin-top: 8px; }

.accent-bar {
  height: 2px;
  margin: 2px 0;
  background: transparent;
  border-top: 1px solid #aca899;
  border-bottom: 1px solid #fff;
}

.full-name,
.lede,
.section-lead,
.about-copy p,
.blurb { color: #1c1c1c; }

.section-lead { margin: 6px 0 12px; }

.bio-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #444;
}

.bio {
  min-height: 2.4em;
  margin: 0;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #7f9db9;
  font-size: 13px;
  line-height: 1.4;
  color: #111;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 0.9em;
  margin-left: 1px;
  transform: translateY(1px);
  background: #111;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.cta-row,
.actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cta-row { margin-top: 4px; }

.btn,
.contact-link,
.power-list button,
.start-foot button {
  touch-action: manipulation;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 14px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f3f2eb 42%, #e3e0d1 100%);
  box-shadow: inset 1px 1px 0 #fff;
  color: #000;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: linear-gradient(180deg, #fff, #e7f0fb 50%, #d5e4f8); }

.btn:active {
  background: linear-gradient(180deg, #d9d6c8, #f4f3ec);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.28);
}

.btn-primary {
  font-weight: 700;
  box-shadow: inset 1px 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.portrait { margin: 0; }

.portrait-frame {
  padding: 6px;
  background: #fff;
  border: 1px solid #7f9db9;
  box-shadow: inset 1px 1px 0 #d4d0c8;
}

.portrait-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.portrait figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: #333;
  text-align: center;
}

.toc { margin-top: 16px; }

.toc ol { list-style: none; border: 1px solid #7f9db9; background: #fff; }

.toc a {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 2px 8px;
  padding: 8px 8px;
  border-bottom: 1px solid #ece9d8;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toc a:last-child { border-bottom: 0; }

.toc-no { color: #083a8c; font-size: 12px; font-weight: 700; }
.toc-title { font-weight: 700; }
.toc-date { grid-column: 2; color: #444; font-size: 11px; }

.toc a:hover,
.toc a:focus-visible,
.toc a:hover .toc-no,
.toc a:hover .toc-date,
.toc a:focus-visible .toc-no,
.toc a:focus-visible .toc-date {
  background: #316ac5;
  color: #fff;
}

.project-list { display: grid; gap: 12px; }

.project {
  --accent: #5f8a14;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #aca899;
  border-left: 4px solid var(--accent);
}

.project[data-accent="amber"] { --accent: #d4920d; }
.project[data-accent="pink"] { --accent: #d4538a; }
.project[data-accent="blue"] { --accent: #2f74d0; }

.project.is-target { outline: 2px solid #0054e3; outline-offset: 1px; }

.project-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-width: 0;
  background: #0c0e14;
  border: 1px solid #7f9db9;
}

.project-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--img-pos, center);
  display: block;
}

.media-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  color: #ece9d8;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 22px),
    #1d3f73;
}

.media-fallback strong { font-family: var(--display); font-size: 1.3rem; }
.media-fallback span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.media-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  background: var(--face);
  border: 1px solid #003c74;
  color: #111;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 4px;
  color: #444;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  color: #083a8c;
  line-height: 1.1;
}

.points {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.points li { position: relative; padding-left: 14px; }

.points li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.55em;
}

.tag-row { list-style: none; margin-top: 12px; }

.tag {
  padding: 1px 6px;
  border: 1px solid #aca899;
  background: var(--face-2);
  color: #222;
  font-size: 11px;
}

.stack-line,
.private-note,
.tech-used {
  margin: 10px 0 0;
  color: #333;
  font-size: 12px;
  line-height: 1.45;
}

.actions { margin-top: 12px; }

.stack-grid { display: grid; gap: 12px; }

.stack-group {
  background: #fff;
  border: 1px solid #aca899;
  padding: 10px 12px 4px;
}

.stack-group h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 16px;
  color: #083a8c;
}

.stack-group ul { list-style: none; }

.stack-group li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 0;
  border-top: 1px solid #e4e0d2;
}

.tech-name { font-weight: 700; }

.about-grid { display: grid; gap: 14px; }

.about-copy p + p { margin-top: 10px; }

.about-copy strong { font-weight: 700; }

.fact-list {
  margin: 0;
  padding: 2px 12px;
  background: #fff;
  border: 1px solid #7f9db9;
}

.fact-list div { padding: 8px 0; border-top: 1px solid #e4e0d2; }
.fact-list div:first-child { border-top: 0; }

.fact-list dt { font-weight: 700; }

.fact-list dd {
  margin: 2px 0 0;
  color: #333;
  font-size: 12px;
}

.fine-print {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #fff;
  box-shadow: inset 0 1px 0 #aca899;
  color: #333;
  font-size: 12px;
}

.contact-panel { max-width: 40rem; }

.contact-link {
  display: inline-flex;
  max-width: 100%;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f3f2eb 42%, #e3e0d1 100%);
  box-shadow: inset 1px 1px 0 #fff;
  color: #083a8c;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-link span { font-family: var(--display); font-weight: 700; }

.window-body a:not(.btn):not(.contact-link):not(.toc a) { text-underline-offset: 2px; }

.noscript-note {
  margin: 10px 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #7f9db9;
}

.portrait { max-width: 240px; }

@container (min-width: 360px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 14px;
    align-items: start;
  }

  .portrait { max-width: none; }
}

@container (min-width: 520px) {
  .toc a { grid-template-columns: 2.6rem minmax(0, 1fr) auto; }
  .toc-date { grid-column: auto; }
}

@container (min-width: 640px) {
  .project {
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

@container (min-width: 560px) {
  .stack-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .about-grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

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

.start-menu {
  position: fixed;
  z-index: 50;
  left: 0;
  bottom: calc(var(--task-space) - 1px);
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  max-height: calc(100dvh - var(--task-space) - 8px);
  background: #fff;
  border: 2px solid #0c3d9e;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 0 14px rgba(0, 0, 30, 0.4);
  overflow: hidden;
}

.start-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #2a78ea, #1554c8);
  color: #fff;
}

.start-user img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid #fff;
  background: #fff;
}

.start-user p { margin: 0; }
.start-user strong { display: block; font-size: 15px; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35); }
.start-user span { display: block; font-size: 11px; }

.start-columns {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  min-height: 0;
  overflow: auto;
}

.start-left,
.start-right { padding: 4px 0 8px; }

.start-right {
  background: linear-gradient(180deg, #d3e5fb 0%, #b3cff6 48%, #8eb4ee 100%);
  border-left: 1px solid #9eb6de;
}

.start-label {
  margin: 4px 12px 2px;
  color: #5a5348;
  font-size: 11px;
  font-weight: 700;
}

.start-right .start-label { color: #1c3f73; }

.start-left a,
.start-right a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px;
  color: #111;
  text-decoration: none;
}

.start-left > a span,
#start-project-links a span { font-weight: 700; }
#start-project-links a span { font-weight: 400; }

#start-project-links a[data-accent="lime"] .ico { color: #5f8a14; }
#start-project-links a[data-accent="amber"] .ico { color: #d4920d; }
#start-project-links a[data-accent="pink"] .ico { color: #d4538a; }
#start-project-links a[data-accent="blue"] .ico { color: #2f74d0; }
#start-project-links a:hover .ico,
#start-project-links a:focus-visible .ico { color: #fff; }

.start-left a:hover,
.start-left a:focus-visible,
.start-right a:hover,
.start-right a:focus-visible {
  background: #316ac5;
  color: #fff;
  outline-offset: -2px;
}

.start-sep {
  height: 2px;
  margin: 4px 10px;
  background: #d6d3c8;
  border-bottom: 1px solid #fff;
}

.start-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px;
  background: linear-gradient(180deg, #3d86ee, #1a4fbe);
}

.start-foot button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.start-foot button:hover,
.start-foot button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
  outline-color: #fff;
}

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

.taskbar {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  height: var(--task-space);
  padding: 0 0 env(safe-area-inset-bottom);
  background: linear-gradient(180deg, #3f8af2 0%, #245edc 9%, #1d4ec4 46%, #1946b4 80%, #2458d4 100%);
  border-top: 1px solid #6aabff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.start-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  margin: 2px 4px 2px 0;
  padding: 0 16px 2px 8px;
  border: 2px solid #16390c;
  border-left: 0;
  border-radius: 0 16px 14px 0;
  background: radial-gradient(circle at 30% 20%, #8ed15a, #3d8e24 42%, #1d6812 78%);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.start-btn::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 10px;
  top: 2px;
  height: 42%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.start-btn > * { position: relative; z-index: 1; }

.start-btn .flag { width: 20px; height: 20px; display: block; }

.start-word {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
  padding-right: 2px;
}

.start-btn[aria-expanded="true"] {
  background: radial-gradient(circle at 30% 80%, #7ec24e, #2f7818 50%, #16540e 80%);
  box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.35);
}

.start-btn:focus-visible { outline: 2px dotted #fff; outline-offset: -4px; }

.quick-launch { display: flex; align-items: center; padding: 0 2px; }

.ql {
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  color: #fff;
  border-radius: 3px;
}

.ql:hover,
.ql:focus-visible { background: rgba(255, 255, 255, 0.18); outline-color: #fff; }

.tb-sep {
  width: 2px;
  align-self: stretch;
  margin: 4px 3px;
  background: rgba(8, 30, 90, 0.45);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.28);
}

.tasks {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 3px;
  padding: 0 2px;
  overflow: hidden;
}

.task-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 48px;
  max-width: 168px;
  min-width: 0;
  height: 24px;
  padding: 0 8px;
  border: 1px solid #0d2f78;
  border-radius: 3px;
  background: linear-gradient(180deg, #3d86ee, #1f57c8);
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.task-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #163e9c, #2a66d8);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.45);
}

.task-btn:focus-visible { outline: 2px dotted #fff; outline-offset: -3px; }

.tray {
  display: flex;
  align-items: center;
  height: 24px;
  margin-left: 4px;
  padding: 0 2px;
  border: 1px solid rgba(6, 24, 80, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(12, 40, 120, 0.35), rgba(90, 150, 240, 0.18));
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.28);
}

.clock {
  min-width: 76px;
  height: 22px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
}

.clock:focus-visible { outline: 2px dotted #fff; outline-offset: -3px; }

.show-desktop {
  display: grid;
  place-items: center;
  width: 14px;
  align-self: stretch;
  margin-left: 2px;
  border: 0;
  border-left: 1px solid rgba(8, 30, 90, 0.55);
  background: linear-gradient(180deg, #4b94f4, #1a4cbc);
  cursor: pointer;
}

.show-desktop::before {
  content: "";
  width: 8px;
  height: 7px;
  border: 1px solid #fff;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.show-desktop:hover,
.show-desktop:focus-visible { filter: brightness(1.15); outline: 2px dotted #fff; outline-offset: -3px; }

.clock-pop {
  position: fixed;
  z-index: 55;
  right: 18px;
  bottom: calc(var(--task-space) + 6px);
  min-width: 180px;
  padding: 10px 12px;
  background: #fffff4;
  border: 1px solid #003c74;
  border-radius: 6px;
  box-shadow: 2px 3px 10px rgba(0, 0, 20, 0.35);
  color: #111;
  font-size: 13px;
}

/* ----- dialogs ----- */

.scrim {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 20, 60, 0.28);
}

.dialog {
  position: relative;
  width: min(440px, 100%);
  background: var(--face);
  border: 3px solid #0831d9;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 3px 6px 18px rgba(0, 0, 20, 0.4);
  overflow: hidden;
}

.dialog-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow: visible;
}

.dialog-ico { width: 36px; height: 36px; flex: none; }

.power-list { display: grid; gap: 6px; margin-top: 10px; }

.power-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.power-list button:hover,
.power-list button:focus-visible {
  background: #316ac5;
  color: #fff;
  border-color: #003c74;
  outline-offset: -2px;
}

.power-list small { font-size: 12px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px 10px;
}

.off-screen {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: #000;
  color: #f08a2a;
  text-align: center;
}

.off-screen p {
  max-width: 22rem;
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.25;
}

/* ----- 404 ----- */

body.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 12px;
}

body.error-page .window {
  position: relative;
  width: min(460px, 100%);
  background: var(--face);
  border: 3px solid #0831d9;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 3px 6px 18px rgba(0, 0, 20, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.error-copy {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.error-copy h1 { font-size: 28px; margin-bottom: 6px; }

.error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ----- no-js document flow ----- */

html:not(.js) .desktop { position: relative; z-index: 1; padding: 12px 12px 8px; }

html:not(.js) .icons {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: auto;
  margin-bottom: 12px;
}

html:not(.js) .windows > .window {
  position: relative;
  width: min(920px, 100%);
  height: auto;
  margin: 0 auto 14px;
  left: auto;
  top: auto;
}

html:not(.js) .window-body { overflow: visible; }

html:not(.js) .taskbar { position: sticky; bottom: 0; }

html:not(.js) .resizer,
html:not(.js) .show-desktop { display: none; }

/* ----- narrow screens ----- */

@media (max-width: 760px) {
  :root { --taskbar: 48px; }

  html.js .icons {
    inset: 0;
    width: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    grid-auto-rows: minmax(92px, auto);
    justify-items: center;
    align-content: start;
    gap: 4px 2px;
    padding: 12px 8px 16px;
  }

  html.js #desktop-project-icons {
    display: contents;
    margin: 0;
  }

  .desk-icon { width: 92px; min-height: 88px; }
  .desk-icon .label { font-size: 12px; }

  html.js .windows > .window.is-open {
    position: fixed;
    left: 0 !important;
    top: 0 !important;
    right: 0;
    width: auto !important;
    height: auto !important;
    bottom: var(--task-space);
    border-radius: 0;
    border-width: 0 0 0 0;
    max-width: none;
  }

  html.js .windows > .window.is-open.is-active { border-width: 0; }

  .titlebar { height: 48px; padding-right: 4px; }
  .titlebar-text { font-size: 15px; }
  .win-btn { width: 44px; height: 40px; }
  .win-max { display: none; }
  .resizer { display: none; }

  .btn,
  .contact-link,
  .power-list button,
  .start-foot button,
  .start-left a,
  .start-right a {
    min-height: 44px;
  }

  .btn { font-size: 16px; padding: 8px 16px; }
  .contact-link { font-size: 18px; }

  .start-menu { width: 100vw; border-radius: 0; }
  .start-columns { grid-template-columns: 1fr; }
  .start-right { border-left: 0; border-top: 1px solid #9eb6de; }

  .task-btn {
    height: 40px;
    max-width: none;
    font-size: 13px;
  }

  .tasks.is-crowded .task-btn {
    flex: 0 0 44px;
    width: 44px;
    max-width: 44px;
    justify-content: center;
    padding: 0;
  }

  .tasks.is-crowded .task-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .start-btn { margin: 0 4px 0 0; }
  .show-desktop { width: 44px; flex: none; }
  .show-desktop::before { width: 16px; height: 12px; border-width: 2px; }

  .ql { width: 44px; height: 44px; }
  .clock { min-width: 76px; height: 40px; font-size: 13px; }
  .tray { height: 44px; }

  .start-word { font-size: 18px; }
  .start-btn .flag { width: 22px; height: 22px; }
}

@media (max-width: 420px) {
  h1 { font-size: 34px; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .caret { display: none; }
}

@media (prefers-contrast: more) {
  .window,
  .btn,
  .project,
  .address-field,
  .fact-list {
    border-width: 2px;
    border-color: #000;
  }
}

@media (forced-colors: active) {
  .bliss { display: none; }
  body { background: Canvas; color: CanvasText; }

  .titlebar,
  .taskbar,
  .start-btn,
  .start-user,
  .start-foot,
  .desk-icon .label,
  .task-btn {
    background: Highlight;
    color: HighlightText;
    text-shadow: none;
    forced-color-adjust: none;
  }

  .window,
  .btn,
  .dialog,
  .start-menu {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }

  .win-btn { background: ButtonFace; color: ButtonText; }
}

@media print {
  .bliss,
  .icons,
  .taskbar,
  .start-menu,
  .scrim,
  .off-screen,
  .clock-pop,
  .titlebar-controls,
  .address,
  .resizer,
  .skip { display: none !important; }

  html, body, .desktop, .windows, .windows > .window, .window-body {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .windows > .window {
    border: 1px solid #000;
    margin: 0 0 16px;
    break-inside: avoid;
  }
}
