:root {
  --desktop-bg: #0b6f73;
  --desktop-bg-dark: #084f52;
  --window-bg: #c4c7cb;
  --window-fill: #d8dadd;
  --ink: #101010;
  --ink-soft: #313131;
  --white-edge: #fbfbfb;
  --mid-edge: #8a8d90;
  --dark-edge: #3e4043;
  --title-a: #0f2a88;
  --title-b: #3e73d8;
  --xp-bar-a: #2c63d6;
  --xp-bar-b: #1f4db8;
  --xp-bar-c: #17419e;
  --xp-start-a: #4bb54b;
  --xp-start-b: #2b8d2d;
  --link: #112fc9;
  --pixel-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "VT323", monospace;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("windows-xp.jpg") center center / cover no-repeat fixed;
  background-color: #4f7ddb;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: #071e1f;
}

.is-booting .boot-screen {
  display: flex;
}

.boot-window,
.gui-window,
.taskbar,
.start-button,
.record-copy a {
  border-top: 3px solid var(--white-edge);
  border-left: 3px solid var(--white-edge);
  border-right: 3px solid var(--dark-edge);
  border-bottom: 3px solid var(--dark-edge);
}

.boot-window {
  width: min(420px, calc(100vw - 32px));
  padding: 24px 22px;
  background: var(--window-bg);
  box-shadow: var(--pixel-shadow);
}

.boot-title,
.panel-heading,
.title-bar-text,
.start-button,
.task-button {
  font-family: "VT323", monospace;
  letter-spacing: 0.08em;
}

.boot-title {
  margin: 0 0 16px;
  font-size: 1rem;
}

.boot-copy {
  margin: 0 0 18px;
  font-size: 1.65rem;
}

.boot-bar {
  height: 22px;
  background: #7f8387;
  border-top: 2px solid var(--mid-edge);
  border-left: 2px solid var(--mid-edge);
  border-right: 2px solid var(--white-edge);
  border-bottom: 2px solid var(--white-edge);
  padding: 2px;
}

.boot-bar-fill {
  display: block;
  width: 72%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #1f53da 0 10px,
    #285fec 10px 20px
  );
  animation: boot-move 1.2s steps(6, end) infinite;
}

.desktop {
  position: relative;
  min-height: 100vh;
  padding: 26px 26px 90px;
}

.folder-icon {
  position: relative;
  display: inline-block;
  flex: none;
}

.window-shell {
  width: min(1120px, calc(100vw - 48px));
  margin: 20px auto 0;
}

.gui-window {
  background: #dfe8f7;
  border-radius: 8px 8px 0 0;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.2),
    6px 6px 0 rgba(0, 0, 0, 0.14);
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 7px;
  color: #ffffff;
  background: linear-gradient(180deg, #2c7df0 0%, #1f66d8 50%, #0b55c6 100%);
  border-radius: 6px 6px 0 0;
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 1.05rem;
}

.window-app-dot {
  width: 10px;
  height: 10px;
  background: #f3f6ff;
  border: 2px solid #0f205b;
}

.title-bar-buttons {
  display: flex;
  gap: 6px;
}

.title-bar-buttons span {
  width: 20px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fefefe, #d9e2f7);
  border-top: 1px solid rgba(255, 255, 255, 0.92);
  border-left: 1px solid rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(45, 82, 146, 0.85);
  border-bottom: 1px solid rgba(45, 82, 146, 0.85);
}

.window-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 250px;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #eef4ff 0%, #d9e7fb 100%);
}

.overview-panel,
.avatar-panel,
.bottom-panel {
  background: #fdfefe;
  padding: 16px;
  border: 1px solid #7ea2da;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.overview-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bottom-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 18px;
}

.panel-heading {
  margin: -16px -16px 12px;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: #ffffff;
  background: linear-gradient(180deg, #7eacf3 0%, #4a7ed6 100%);
  border-bottom: 1px solid #6a91d5;
  border-radius: 6px 6px 0 0;
}

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

h1 {
  margin-bottom: 6px;
  font-family: "VT323", monospace;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-family: "VT323", monospace;
  font-size: 1.65rem;
}

h3 {
  margin-bottom: 6px;
  font-family: "VT323", monospace;
  font-size: 1.4rem;
  line-height: 1.2;
}

.role-line {
  margin-bottom: 14px;
  font-size: 1.8rem;
}

.intro-copy,
.avatar-caption,
.avatar-username,
.current-work-text,
.record-copy p,
.info-row dd {
  font-size: 1.55rem;
  line-height: 1.15;
}

.info-grid {
  margin: 2px 0 0;
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.info-row:first-of-type {
  border-top: 0;
}

.info-row dt {
  font-family: "VT323", monospace;
  font-size: 1.18rem;
}

.info-row dd {
  margin: 0;
}

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

.avatar-link {
  color: var(--link);
  text-decoration: underline;
}

.avatar-link:hover,
.avatar-link:focus-visible {
  color: #0b2f8d;
}

.avatar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  align-self: start;
}

.avatar-frame {
  margin: 8px 0 12px;
  padding: 10px;
  background: linear-gradient(180deg, #c6d6ef, #8daee0);
  border: 1px solid #6088c7;
  border-radius: 6px;
}

.avatar-frame img {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  background: #ffffff;
}

.avatar-caption {
  margin-bottom: 4px;
  font-family: "VT323", monospace;
  font-size: 1rem;
}

.avatar-username {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

.current-work-panel {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  text-align: left;
  background: #edf3fc;
  border: 1px solid #88a7d7;
  border-radius: 6px;
}

.current-work-panel .panel-heading {
  margin: -12px -12px 10px;
  font-size: 0.8rem;
}

.current-work-text {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.05;
}

.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.record-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px;
  background: #edf3fc;
  border: 1px solid #b8cbea;
  border-radius: 4px;
}

.record-year {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: linear-gradient(180deg, #dae7fb, #b6cbef);
  border: 1px solid #92afd8;
  border-radius: 4px;
  font-family: "VT323", monospace;
  font-size: 1.1rem;
}

.record-copy p {
  margin-bottom: 0;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 4px 8px;
  background: linear-gradient(180deg, var(--xp-bar-a), var(--xp-bar-b) 58%, var(--xp-bar-c));
  border-top: 1px solid rgba(255, 255, 255, 0.48);
}

.taskbar-left,
.taskbar-center,
.taskbar-right,
.quick-launch,
.tray-icons {
  display: flex;
  align-items: center;
}

.taskbar-left,
.taskbar-right {
  gap: 8px;
}

.taskbar-center {
  min-width: 0;
  gap: 8px;
}

.start-button,
.task-button,
.task-clock,
.quick-launch,
.tray-icons {
  min-height: 32px;
}

.start-button,
.task-button,
.task-clock {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.start-button {
  gap: 8px;
  background: linear-gradient(180deg, var(--xp-start-a), var(--xp-start-b));
  color: #ffffff;
  border-radius: 0 14px 14px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.42);
  border-left: 2px solid rgba(255, 255, 255, 0.42);
  border-right: 2px solid rgba(16, 79, 24, 0.85);
  border-bottom: 2px solid rgba(16, 79, 24, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 0.72rem;
}

.start-badge {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(90deg, #d03131 0 50%, #efc443 50% 100%),
    linear-gradient(180deg, #2f67cf 0 50%, #27a95e 50% 100%);
  background-blend-mode: screen;
  border-top: 2px solid var(--white-edge);
  border-left: 2px solid var(--white-edge);
  border-right: 2px solid var(--dark-edge);
  border-bottom: 2px solid var(--dark-edge);
}

.quick-launch {
  gap: 6px;
  padding: 0 8px;
}

.quick-icon {
  width: 14px;
  height: 14px;
  background: #2d60cf;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.quick-icon:nth-child(2) {
  background: #d2aa2a;
}

.quick-icon:nth-child(3) {
  background: #2ca86b;
}

.task-button {
  min-width: 0;
  justify-content: center;
  font-family: "VT323", monospace;
  font-size: 1rem;
  white-space: nowrap;
  color: #ffffff;
  background: linear-gradient(180deg, #5f8ff1, #3a67cf);
  border-top: 2px solid rgba(255, 255, 255, 0.36);
  border-left: 2px solid rgba(255, 255, 255, 0.28);
  border-right: 2px solid rgba(9, 39, 113, 0.84);
  border-bottom: 2px solid rgba(9, 39, 113, 0.84);
  border-radius: 4px;
}

.task-button.is-active {
  background: linear-gradient(180deg, #74a1ff, #4a79dd);
}

.tray-icons {
  gap: 6px;
  padding: 0 6px;
}

.tray-icon {
  width: 12px;
  height: 12px;
  background: linear-gradient(180deg, #eff6ff, #7fa3e7);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.task-clock {
  color: #ffffff;
  background: rgba(10, 53, 140, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 1px solid rgba(8, 34, 98, 0.84);
  border-bottom: 1px solid rgba(8, 34, 98, 0.84);
  font-size: 1.2rem;
}

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

@keyframes boot-move {
  0% {
    width: 48%;
  }

  100% {
    width: 86%;
  }
}

@media (max-width: 980px) {
  .desktop {
    padding: 18px 18px 90px;
  }

  .window-shell {
    width: 100%;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .title-bar {
    align-items: flex-start;
  }

  .title-bar-text {
    line-height: 1.6;
  }

  .title-bar-buttons {
    display: none;
  }

  .window-body,
  .overview-panel,
  .avatar-panel,
  .bottom-panel {
    padding: 12px;
  }

  .info-row,
  .record-item,
  .taskbar {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    margin: -12px -12px 10px;
  }

  .taskbar {
    gap: 6px;
  }

  .taskbar-left,
  .taskbar-center,
  .taskbar-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}
