/* ------------------------------------------------------------------ *
 * style.css — desktop shell on top of 98.css
 * Layout: teal desktop with icons + draggable windows, fixed taskbar,
 * Start menu, system tray (language + clock), and a shutdown screen.
 * ------------------------------------------------------------------ */

:root {
  --taskbar-height: 32px;
  --teal: #008080;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--teal);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  -webkit-font-smoothing: none;
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

/* ----------------------------- Desktop ---------------------------- */
#desktop {
  position: absolute;
  inset: 0 0 var(--taskbar-height) 0;
  overflow: hidden;
}

/* Icon grid in the top-left, flowing into columns */
#icon-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 88px);
  justify-content: start;
  align-content: start;
  gap: 4px;
  padding: 8px;
  pointer-events: none; /* only icons themselves are clickable */
}

.desktop-icon {
  pointer-events: auto;
  width: 80px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  cursor: pointer;
  color: #fff;
}

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

.desktop-icon span {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  padding: 0 2px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
}

.desktop-icon:focus,
.desktop-icon.selected {
  outline: none;
}

.desktop-icon.selected span {
  background: #010181;
  text-shadow: none;
}

.desktop-icon.selected img {
  filter: drop-shadow(0 0 0 #010181);
  opacity: 0.85;
}

/* ----------------------------- Windows ---------------------------- */
.window.app-window {
  position: absolute;
  min-width: 260px;
  max-width: 92vw;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.app-window .title-bar {
  cursor: move;
  display: flex;
  align-items: center;
}

.app-window .title-bar-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-window .title-bar img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.app-window .window-body {
  margin: 8px;
  max-height: 70vh;
  overflow: auto;
  cursor: default;
  user-select: text;
  -webkit-user-select: text;
}

/* ------------------------- Window content ------------------------- */
.cv-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.cv-section p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-head .pic {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
}

.profile-head .who b {
  font-size: 14px;
}

.job {
  display: flex;
  gap: 10px;
  padding: 8px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}

.job:last-child {
  margin-bottom: 0;
}

.job img.logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #808080;
  align-self: flex-start;
}

.job .job-body {
  min-width: 0;
}

.job .job-title {
  font-weight: bold;
}

.job .job-meta {
  font-size: 11px;
  color: #404040;
  margin: 2px 0 6px;
}

.job ul {
  margin: 0;
  padding-left: 18px;
}

.job ul li {
  margin-bottom: 4px;
  line-height: 1.4;
}

.skills-grid .skill-group {
  margin-bottom: 10px;
}

.skills-grid .skill-group b {
  display: block;
  margin-bottom: 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  font-size: 11px;
}

.list-rows {
  width: 100%;
  border-collapse: collapse;
}

.list-rows td {
  padding: 4px 6px;
  vertical-align: top;
}

.list-rows tr + tr td {
  border-top: 1px solid #c0c0c0;
}

.contact-table td:first-child {
  font-weight: bold;
  white-space: nowrap;
}

.contact-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.win-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.icon-blurb {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.icon-blurb img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

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

#start-button {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  min-width: 0;
}

#start-button.active {
  /* pressed look */
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px 0 0 #000, inset 2px 2px 0 0 #808080;
}

#taskbar-divider {
  width: 2px;
  align-self: stretch;
  margin: 2px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
}

#taskbar-windows {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  overflow: hidden;
}

.task-button {
  height: 24px;
  min-width: 120px;
  max-width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-align: left;
  justify-content: flex-start;
}

.task-button img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  flex: 0 0 16px;
}

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

.task-button.active {
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px 0 0 #000, inset 2px 2px 0 0 #808080;
  font-weight: bold;
}

#systray {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}

#lang-toggle {
  height: 18px;
  min-width: 0;
  padding: 0 6px;
  font-size: 11px;
}

#clock {
  font-size: 11px;
  min-width: 46px;
  text-align: center;
}

/* --------------------------- Start menu --------------------------- */
#start-menu {
  position: fixed;
  left: 4px;
  bottom: var(--taskbar-height);
  width: 200px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  z-index: 100001;
  display: flex;
}

#start-menu-banner {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  background: linear-gradient(#000080, #1084d0);
  color: #fff;
  padding: 8px 4px;
  font-size: 18px;
  letter-spacing: 1px;
}

#start-menu-banner b {
  color: #ffd966;
}

#start-menu-list {
  list-style: none;
  margin: 0;
  padding: 2px;
  flex: 1 1 auto;
}

#start-menu-list li {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

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

#start-menu-list li:hover {
  background: #000080;
  color: #fff;
}

#start-menu-list li.separator {
  height: 0;
  padding: 0;
  margin: 3px 2px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  cursor: default;
}

#start-menu-list li.separator:hover {
  background: transparent;
}

/* -------------------------- Shutdown screen ----------------------- */
#shutdown-screen {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: #000;
  color: #ffb000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}

#shutdown-text p {
  font-size: 20px;
  margin: 0 0 12px;
}

#shutdown-text #shutdown-sub {
  font-size: 13px;
  color: #c0c0c0;
}

/* ----------------------------- Responsive ------------------------- */
@media (max-width: 640px) {
  .window.app-window {
    left: 2vw !important;
    top: 8px !important;
    width: 96vw !important;
    max-width: 96vw;
  }

  .app-window .window-body {
    max-height: 65vh;
  }

  .app-window .title-bar {
    cursor: default;
  }

  .job {
    flex-direction: column;
  }

  .task-button {
    min-width: 44px;
    max-width: 44px;
  }

  .task-button span {
    display: none;
  }
}
