:root {
  --xp-blue: #245edb;
  --xp-blue-dark: #0b3ea8;
  --xp-blue-light: #68a9ff;
  --xp-green: #38a424;
  --xp-green-dark: #17730e;
  --xp-orange: #e56f37;
  --xp-cream: #ece9d8;
  --xp-panel: #f4f1df;
  --xp-panel-blue: #d9e8ff;
  --xp-text: #111;
  --xp-muted: #4f5f7a;
  --xp-shadow: 0 22px 55px #06255f80;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #4b92db;
  color: var(--xp-text);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
a {
  font: inherit;
}

button {
  color: inherit;
}

.boot-stage,
.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 16%, #fff8 0 1px, transparent 2px 100%),
    linear-gradient(180deg, #78c6ff 0%, #2c7ed4 46%, #5fb64b 47%, #2d8e2f 100%);
}

.boot-stage {
  display: grid;
  place-items: center;
}

.boot-box {
  width: min(640px, calc(100vw - 28px));
  min-height: 322px;
  overflow: hidden;
  border: 2px solid #0b3ea8;
  border-radius: 9px 9px 4px 4px;
  background: var(--xp-cream);
  box-shadow: var(--xp-shadow), inset 0 0 0 1px #fff8;
}

.boot-title,
.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding: 5px 10px;
  background:
    linear-gradient(180deg, #7bb7ff 0%, #2d7ff0 18%, var(--xp-blue) 52%, var(--xp-blue-dark) 100%);
  border-bottom: 1px solid #07338a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 1px 1px #06348c;
}

.boot-body {
  position: relative;
  min-height: 262px;
  padding: 24px 28px;
}

.boot-body h1 {
  margin: 0 0 12px;
  color: var(--xp-blue-dark);
  font-size: clamp(18px, 3vw, 26px);
}

.boot-body p,
.boot-status,
.eyebrow {
  color: var(--xp-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.boot-body p {
  padding-bottom: 12px;
  border-bottom: 1px solid #9bbbe9;
}

.boot-grid {
  position: absolute;
  inset: 102px 28px 62px;
  opacity: .18;
  background-image:
    linear-gradient(#2878d7 1px, transparent 1px),
    linear-gradient(90deg, #2878d7 1px, transparent 1px);
  background-size: 16px 16px;
}

.loading-row {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.loading-track {
  width: min(185px, 44vw);
  height: 19px;
  padding: 2px;
  background: #000;
  border: 1px solid #7f9db9;
}

.loading-fill {
  height: 100%;
  background:
    repeating-linear-gradient(90deg, #38a424 0 9px, #5bd241 9px 11px),
    var(--xp-green);
  transition: width .24s ease;
}

.boot-status {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(180deg, #fff, #d9e8ff);
  border-top: 1px solid #9bbbe9;
}

.desktop {
  background:
    radial-gradient(circle at 24% 18%, #ffffff90 0 1px, transparent 2px 100%),
    radial-gradient(ellipse at 68% 36%, #9ed9ff 0%, #4aa2ec 28%, transparent 56%),
    linear-gradient(180deg, #66b8fb 0%, #1d78d0 43%, #4cb342 44%, #168332 100%);
}

.desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, #baf47b80 0%, transparent 34%),
    radial-gradient(ellipse at 78% 72%, #0b5f2380 0%, transparent 42%),
    linear-gradient(8deg, transparent 0 58%, #ffffff2b 59% 61%, transparent 62% 100%);
  opacity: .9;
}

.scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 9999;
  opacity: .06;
  background: repeating-linear-gradient(180deg, transparent 0 3px, #fff 3px 4px);
}

.wallpaper-hud {
  position: absolute;
  right: 42px;
  top: 36px;
  width: min(360px, 52vw);
  color: #ffffff;
  text-align: right;
  opacity: .42;
}

.wallpaper-hud div {
  font-size: clamp(64px, 10vw, 128px);
  font-weight: 900;
  line-height: .82;
  color: #ffffff18;
  -webkit-text-stroke: 2px #ffffffcc;
  text-shadow: 0 3px 16px #04519f80;
}

.wallpaper-hud p {
  margin: 8px 0;
  color: #fff;
  text-shadow: 0 2px 8px #07529e;
}

.wallpaper-hud span {
  color: #eaf6ff;
  font-size: 12px;
  text-shadow: 0 2px 8px #07529e;
}

.desktop-icons {
  position: absolute;
  top: 24px;
  left: 18px;
  display: grid;
  grid-template-columns: 108px;
  gap: 14px;
  z-index: 2;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 82px;
  padding: 7px 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-shadow: 1px 2px 3px #003b78;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  outline: none;
  border-color: #ffffff99;
  border-radius: 3px;
  background: #316ac580;
}

.icon-glyph {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  border: 1px solid #164eaf;
  border-radius: 6px;
  background:
    linear-gradient(135deg, #ffffff 0%, #dcebff 34%, #5aa3f7 35%, #1d5dca 100%);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #0a3485, 0 5px 12px #064d9970;
  color: #06348c;
  font-size: 14px;
  font-weight: 900;
}

.desktop-icon span:last-child {
  max-width: 104px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.window {
  position: absolute;
  min-width: 280px;
  min-height: 220px;
  overflow: hidden;
  border: 2px solid var(--xp-blue-dark);
  border-radius: 8px 8px 3px 3px;
  background: var(--xp-cream);
  box-shadow: var(--xp-shadow), inset 1px 1px 0 #ffffffa8;
}

.window.active {
  box-shadow: var(--xp-shadow), 0 0 0 1px #7db7ff, inset 1px 1px 0 #ffffffa8;
}

.window-titlebar {
  cursor: grab;
  user-select: none;
}

.window-buttons {
  display: flex;
  gap: 3px;
}

.window-buttons button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 20px;
  padding: 0;
  border: 1px solid #fff8;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff, #7fb2ff 35%, #2868d4);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 1px 1px #06348c;
}

.window-buttons button:last-child {
  background: linear-gradient(180deg, #ffc7b1, #f07c45 38%, #c83519);
  color: #fff;
  text-shadow: 1px 1px #7b1508;
}

.window-content {
  height: calc(100% - 28px);
  overflow: auto;
  padding: 20px;
  border: 3px solid #0758d4;
  border-top: 0;
  background:
    linear-gradient(180deg, #fff 0, var(--xp-panel) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: 22px;
  min-height: 100%;
}

.portrait-shell {
  min-height: 380px;
  border: 1px solid #7f9db9;
  background: #fff;
  box-shadow: inset 1px 1px 0 #fff, 2px 2px 0 #c1c1b1;
  overflow: hidden;
}

.portrait-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  filter: contrast(1.06) saturate(.9);
}

.stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #0a246a;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 8px;
  color: #0a246a;
  font-size: 17px;
}

.lead {
  color: #1f1f1f;
  font-size: 16px;
  line-height: 1.55;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-grid div,
.skill-panel,
.project-file,
.timeline-item,
.contact-panel,
.cv-panel > div {
  border: 1px solid #2e3324;
  border-color: #9db7d8 #6f8fbd #6f8fbd #d9ebff;
  background: linear-gradient(180deg, #fff, #e8f1ff);
  box-shadow: inset 1px 1px 0 #fff;
}

.status-grid div {
  padding: 12px;
}

.status-grid span {
  display: block;
  color: #52637a;
  font-size: 11px;
}

.status-grid strong {
  color: #0b3ea8;
  font-size: 14px;
}

ul {
  margin: 0;
  padding-left: 19px;
}

li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-cloud span {
  padding: 6px 8px;
  border: 1px solid #8aa8d6;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff, #d9e8ff);
  color: #0a246a;
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  padding: 16px;
}

.timeline-item > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: #0b3ea8;
  font-size: 13px;
}

.timeline-item > div span {
  color: #52637a;
}

.project-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-file {
  position: relative;
  min-height: 160px;
  padding: 16px 16px 16px 72px;
}

.file-icon {
  position: absolute;
  left: 16px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 46px;
  border: 1px solid #164eaf;
  border-radius: 5px;
  background: linear-gradient(135deg, #fff, #d9e8ff 45%, #5aa3f7 46%, #1d5dca);
  color: #0a246a;
  font-size: 12px;
  font-weight: 900;
}

.project-file p,
.contact-panel p {
  color: #333;
  line-height: 1.5;
}

.skill-panel {
  padding: 16px;
}

.terminal {
  height: 100%;
  margin: 0;
}

.terminal-output {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 12px;
  background: #001b36;
  border: 2px inset #9db7d8;
  color: #b8ffcf;
  font-family: "Courier New", Courier, monospace;
}

.terminal pre {
  margin: 0 0 10px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.terminal .input {
  color: #ffffff;
}

.terminal .system {
  color: #d9e8ff;
}

.terminal label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  position: relative;
}

.terminal input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #b8ffcf;
  caret-color: #b8ffcf;
}

.terminal:focus-within label::after {
  content: "";
  width: 9px;
  height: 1.15em;
  background: #b8ffcf;
  box-shadow: 0 0 8px #b8ffcf;
  animation: terminal-caret-blink 1s steps(2, start) infinite;
}

@keyframes terminal-caret-blink {
  50% {
    opacity: 0;
  }
}

.contact-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  padding: 22px;
}

.contact-panel a,
.action-button {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #d9e8ff);
  color: #0b3ea8;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-panel a:hover,
.action-button:hover {
  background: linear-gradient(180deg, #eef6ff, #bad7ff);
}

.cv-panel {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 14px;
  height: 100%;
}

.cv-panel > div {
  padding: 18px;
}

.cv-panel object {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 1px solid #7f9db9;
  background: #fff;
}

.start-menu {
  position: absolute;
  left: 10px;
  bottom: 48px;
  z-index: 9000;
  width: 285px;
  padding: 8px;
  border: 2px solid #0b3ea8;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, #2c78df 0 46px, #ffffff 46px 100%);
  box-shadow: 0 18px 38px #003b7885;
}

.start-menu p {
  margin: 2px 4px 15px;
  color: #fff;
  font-weight: 900;
  text-shadow: 1px 1px #06348c;
}

.start-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 6px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #111;
  cursor: pointer;
  text-align: left;
}

.start-menu button:hover {
  border-color: #7f9db9;
  background: #d9e8ff;
}

.start-menu button span {
  color: #0b3ea8;
  font-weight: 900;
}

.start-menu small {
  color: #52637a;
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 4px 8px;
  border-top: 1px solid #6bb6ff;
  background:
    linear-gradient(180deg, #4aa2ff 0%, #1f65d6 18%, #1952bd 65%, #1646a4 100%);
  box-shadow: 0 -6px 24px #06348c66;
}

.start-button,
.task-buttons button,
.system-tray {
  min-height: 30px;
  border: 1px solid #0b3ea8;
  background: linear-gradient(180deg, #71adff, #2b67d6);
  color: #fff;
}

.start-button {
  padding: 4px 20px 4px 17px;
  border-radius: 18px 8px 8px 18px;
  border-color: #5ec84c #0d7010 #0d7010 #8dea7b;
  background:
    radial-gradient(circle at 24% 25%, #ffffff9c 0 14%, transparent 15%),
    linear-gradient(180deg, #72df5a, var(--xp-green) 54%, var(--xp-green-dark));
  cursor: pointer;
  color: #fff;
  font-weight: 900;
  font-style: italic;
  text-shadow: 1px 1px #0d7010;
}

.task-buttons {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: auto hidden;
}

.task-buttons button {
  min-width: 110px;
  max-width: 180px;
  padding: 5px 9px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-buttons button.active {
  border-color: #8dc0ff;
  background: linear-gradient(180deg, #1d4ca5, #316fd5);
  color: #fff;
}

.system-tray {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  border-color: #5da8ff #0b3ea8 #0b3ea8 #7bc2ff;
  background: linear-gradient(180deg, #2fa7f4, #0d77d7);
}

@media (max-width: 1050px) {
  body {
    overflow: auto;
  }

  .desktop {
    min-height: 100vh;
    height: auto;
    padding-bottom: 54px;
    overflow: hidden auto;
  }

  .wallpaper-hud {
    right: 18px;
    top: 18px;
    width: 58vw;
    opacity: .22;
  }

  .wallpaper-hud p,
  .wallpaper-hud span {
    display: none;
  }

  .desktop-icons {
    position: relative;
    top: auto;
    left: auto;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 8px;
    padding: 18px;
  }

  .window {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: calc(100vw - 22px) !important;
    height: auto !important;
    min-height: 360px;
    margin: 10px auto;
  }

  .window-content {
    height: auto;
    max-height: none;
  }

  .about-grid,
  .cv-panel,
  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .portrait-shell {
    width: min(360px, 100%);
    height: 360px;
    min-height: 0;
    margin: 0 auto;
  }

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

  .taskbar {
    position: fixed;
    grid-template-columns: auto 1fr;
  }

  .system-tray {
    display: none;
  }
}

@media (max-width: 480px) {
  .boot-box {
    min-height: 292px;
  }

  .boot-body {
    min-height: 235px;
    padding: 18px;
  }

  .boot-grid {
    inset: 96px 18px 62px;
  }

  .loading-row {
    left: 18px;
    right: 18px;
    gap: 6px;
    font-size: 12px;
  }

  .desktop-icons {
    grid-template-columns: repeat(2, minmax(80px, 1fr));
  }

  .window-content {
    padding: 14px;
  }

  .terminal label {
    align-items: flex-start;
    flex-direction: column;
  }
}
