* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #008080;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

/* Desktop */
.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 48px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: pointer;
  user-select: none;
  padding: 4px;
}

.desktop-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.desktop-icon span {
  color: white;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 1px #000;
  line-height: 1.2;
}

.desktop-icon:hover span {
  background: #000080;
  color: white;
}

/* Windows */
.win-window {
  position: fixed;
  min-width: 380px;
  max-width: 600px;
  z-index: 10;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}

.win-window .title-bar {
  cursor: move;
}

.win-window .window-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.page-content h2 {
  margin-top: 0;
  font-size: 14px;
}

.page-content p, .page-content ul {
  font-size: 12px;
  line-height: 1.6;
}

.page-content ul {
  padding-left: 20px;
}

/* Portfolio grid */
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio-item {
  width: 100%;
}

.portfolio-item .title-bar {
  cursor: default;
}

.portfolio-item .window-body p {
  font-size: 11px;
  margin: 4px 0;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
  box-shadow: inset 0 1px #dfdfdf;
  z-index: 100;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 12px;
  padding: 4px 8px;
  height: 36px;
  cursor: pointer;
}

.start-btn img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

/* Start Menu */
.start-menu {
  position: fixed;
  bottom: 48px;
  left: 6px;
  width: 200px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  z-index: 200;
}

.start-menu-header {
  background: linear-gradient(to bottom, #000080, #1084d0);
  color: white;
  font-weight: bold;
  font-size: 13px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 4px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.start-menu ul {
  list-style: none;
  margin: 0;
  padding: 4px 4px 4px 32px;
}

.start-menu ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

.start-menu ul li img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.start-menu ul li:hover {
  background: #000080;
  color: white;
}

.start-menu ul li.divider {
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 4px 0;
  padding: 0;
  pointer-events: none;
}

/* Taskbar window buttons */
.taskbar-windows {
  display: flex;
  gap: 4px;
  flex: 1;
}

.taskbar-btn {
  font-size: 11px;
  padding: 4px 8px;
  height: 32px;
  min-width: 100px;
  text-align: left;
  cursor: pointer;
}

/* Clock */
.taskbar-clock {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
  white-space: nowrap;
}

/* Contact form */
.field-row-stacked input,
.field-row-stacked textarea {
  width: 100%;
  font-size: 12px;
}

.field-row-stacked label {
  font-size: 12px;
  margin-bottom: 2px;
}

/* Shutdown overlay */
#shutdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.shutdown-dialog {
  width: 340px;
}

.shutdown-dialog p {
  font-size: 12px;
  margin: 0;
}

/* Active window gets higher z-index */
.win-window.active {
  z-index: 50;
}
