/* ==========================================================================
   GLOBAL RESET & FONTS
   ========================================================================== */
@font-face {
  font-family: "XP Tahoma";
  src: url("assets/fs-tahoma-8px.otf.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


:root {
  --xp-taskbar-height: 40px;
  --xp-desktop-inset: var(--xp-taskbar-height);
  --xp-start-menu-offset: var(--xp-taskbar-height);
  /* Classic Luna Start crop is 97x30; keep that ratio as the taskbar scales. */
  --xp-start-width: calc(var(--xp-taskbar-height) * 97 / 30);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: default;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #win-resume,
  #win-resume .resume-content,
  #win-resume .resume-content * {
    visibility: visible !important;
  }

  #win-resume {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: auto !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #win-resume .win-titlebar,
  #win-resume .win-menubar,
  #win-resume .win-toolbar,
  #win-resume .win-sidebar,
  #win-resume .win-statusbar,
  #win-resume .resume-download-btn {
    display: none !important;
  }
}

html,
body {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  /* XP base font size */
  background-color: #004E98;
  color: #000;
  width: 100vw;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  zoom: 1;
}

a {
  color: #0000FF;
  cursor: pointer;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.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-width: 0;
}

/* ==========================================================================
   SECTION 1: LOGIN SCREEN (PERFECT LUNA MATCH)
   ========================================================================== */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 35% 45%, rgba(94, 137, 227, 0.4) 0%, rgba(53, 92, 203, 0) 50%),
    linear-gradient(to bottom, #002275 0%, #4f7dde 12%, #5685E6 85%, #051A67 100%);
  background-color: #5685E6;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

/* Center Content */
.login-body {
  flex: 1;
  display: flex;
  width: 100%;
}

.login-left-pane {
  flex: 0 0 32%;
  max-width: 32%;
}

/* XP Logo Block */
.xp-logo-block {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  margin-left: 90px;
}

/* Divider & Instruction */
.login-divider {
  width: 2px;
  height: 75%;
  margin-top: 5vh;
  margin-right: 25px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.9) 80%, rgba(255, 255, 255, 0));
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.1);
}

.login-right-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.login-instruction {
  color: white;
  font-family: Tahoma, sans-serif;
  font-size: 22px;
  margin-left: 55px;
  margin-bottom: 40px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  font-weight: normal;
}

.user-list {
  width: 100%;
  max-width: 650px;
  /* Constrain highlight gradient width */
}

/* User Card */
.user-card {
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #3A6EA5 0%, rgba(64, 120, 224, 0.4) 30%, rgba(64, 120, 224, 0) 100%);
  border: none;
  border-radius: 5px 0 0 5px;
  padding: 10px 0;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  left: 0;
  width: 100%;
  max-width: 650px;
}

.user-card:hover {
  background: linear-gradient(to right, #4078E0 0%, rgba(79, 133, 232, 0.6) 30%, rgba(79, 133, 232, 0) 100%);
}

.user-card * {
  cursor: pointer;
}

.user-avatar-xp {
  width: 85px;
  height: 85px;
  background: #FFCF11;
  border: 2px solid white;
  border-radius: 5px;
  margin-right: 15px;
  margin-left: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.avatar-inner {
  font-size: 26px;
  font-weight: bold;
  color: #082C6E;
  font-family: Tahoma, sans-serif;
}

.user-info-xp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -2px;
}

.user-name-xp {
  color: white;
  font-size: 26px;
  font-weight: normal;
  font-family: Tahoma, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  margin-bottom: 2px;
}

.user-sub-xp {
  color: #D3E5FA;
  font-size: 14px;
  font-family: Tahoma, sans-serif;
  opacity: 0.9;
}

/* Footer Element */
.login-footer {
  height: 10vh;
  min-height: 60px;
  background: linear-gradient(to bottom, #1E46B8 0%, #0D2680 100%);
  border-top: 2px solid #F5781E;
  /* Authentic orange line */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5vw;
}

.login-footer-left {
  display: flex;
  align-items: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  box-shadow: none;
  outline: none;
}

.login-footer-left * {
  cursor: pointer;
}

.power-btn-icon {
  width: 32px;
  height: 32px;
  display: block;
  margin-right: 12px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.35));
  transition: filter 0.15s;
}

.login-footer-left:hover .power-btn-icon {
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.35)) brightness(1.12);
}

.login-footer-left:hover .footer-turnoff {
  text-decoration: underline;
}

.footer-turnoff {
  color: white;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.55);
}

.login-footer-right {
  color: white;
  font-size: 18px;
  text-align: right;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}


/* ==========================================================================
   SECTION 2: DESKTOP
   ========================================================================== */
.desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--xp-desktop-inset);
  background: #004E98 url('assets/icons/bliss.jpg') center/cover no-repeat;
  z-index: 1;
}

/* Icons Grid */
.desktop-icons {
  position: relative;
  height: 100%;
  padding: 5px;
}

.desktop-icon {
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: absolute;
}

/* Scattering 9 explicit desktop icons horizontally/vertically */
.desktop-icon:nth-child(1) {
  top: 30px;
  left: 30px;
}

.desktop-icon:nth-child(2) {
  top: 150px;
  left: 140px;
}

.desktop-icon:nth-child(3) {
  top: 210px;
  left: 30px;
}

.desktop-icon:nth-child(4) {
  top: 350px;
  left: 80px;
}

.desktop-icon:nth-child(5) {
  top: 60px;
  left: 240px;
}

.desktop-icon:nth-child(6) {
  top: 280px;
  left: 220px;
}

.desktop-icon:nth-child(7) {
  top: 460px;
  left: 160px;
}

.desktop-icon:nth-child(8) {
  top: 80px;
  left: 450px;
}

.desktop-icon:nth-child(9) {
  top: 200px;
  left: 350px;
}

.desktop-icon:hover .icon-label {
  background: rgba(0, 88, 238, 0.5);
  /* XP focus bg */
}

.desktop-icon.selected .icon-label {
  background: #0b61ff;
  outline: 1px dotted #ccc;
}

.desktop-icon.selected .icon-img {
  filter: brightness(0.8) contrast(1.2);
}

.icon-img {
  width: 40px;
  /* Set to match generated icon visual scale */
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 4px;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

/* Mapping explicit files */
.icon-about {
  background-image: url('assets/icons/computer.png');
}

.icon-projects {
  background-image: url('assets/icons/folder.png');
}

.icon-experience {
  background-image: url('assets/icons/bag.png');
}

.icon-skills {
  background-image: url('assets/icons/settings.png');
}

.icon-contact {
  background-image: url('assets/icons/mail.png');
}

.icon-hobbies {
  background-image: url('assets/icons/paint.png');
}

.icon-resume {
  background-image: url('assets/icons/paper.png');
}

.icon-github {
  background-image: url('assets/icons/local disk.png');
}

.icon-linkedin {
  background-image: url('assets/icons/people.png');
}


.icon-label {
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  font-size: 11px;
  text-align: center;
  padding: 1px 3px;
  margin: 0 auto;
}

/* ==========================================================================
   TASKBAR (40PX LUNA)
   ========================================================================== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--xp-taskbar-height);
  background: linear-gradient(to bottom, #3168d5 0%, #4993e6 4%, #245edb 14%, #245edb 88%, #1941a5 100%);
  display: flex;
  justify-content: space-between;
  z-index: 10000;
  box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.2) inset;
}

.taskbar-left {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}

.start-btn {
  position: relative;
  z-index: 10001;
  width: var(--xp-start-width);
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.start-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  object-position: left center;
  pointer-events: none;
  /* Avoid browser soft-upscale mush on the Luna bitmap */
  image-rendering: -webkit-optimize-contrast;
}

.start-btn:hover:not(.active):not(:active) {
  filter: brightness(1.06);
}

.start-btn:active img,
.start-btn.active img {
  filter: brightness(0.72) saturate(1.05) contrast(1.08);
  /* Keep the left of "start" inside the clip when pressed */
  transform: translate(0, 1px);
}

.taskbar-windows {
  display: flex;
  margin-left: 4px;
  flex: 1;
  align-items: center;
  gap: 3px;
  min-width: 0;
  height: 100%;
}

.taskbar-win-btn {
  height: calc(var(--xp-taskbar-height) - 8px);
  min-width: 0;
  width: 160px;
  max-width: 160px;
  margin: 0;
  padding: 0 8px 0 5px;
  display: flex;
  align-items: center;
  overflow: hidden;
  flex: 0 1 160px;
  border-style: solid;
  border-width: 1px;
  border-color: #8eb8f5 #163e8c #12408f #6aa6f0;
  border-radius: 2px;
  background: linear-gradient(to bottom, #4b94f0 0%, #3782e8 45%, #2b6fdc 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
  font-family: Tahoma, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0, 20, 60, 0.45);
  cursor: pointer;
}

.taskbar-win-btn.active {
  /* Luna pressed: muted inset blue, not neon — sits into the taskbar */
  border-color: #0c2a68 #5a9ae8 #6aa6f0 #0c2a68;
  background: linear-gradient(
    to bottom,
    #2a5fc9 0%,
    #326edc 22%,
    #3778e8 55%,
    #326ed8 100%
  );
  box-shadow: inset 1px 1px 3px rgba(0, 25, 70, 0.45);
  font-weight: 700;
}

.tb-icon {
  width: 16px;
  height: 16px;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 5px;
  flex: 0 0 16px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.taskbar-right.systray {
  background: linear-gradient(to bottom, #11A9ED 0%, #2CB1E1 10%, #1693D4 90%, #0D83BF 100%);
  border-left: 1px solid #1042AF;
  height: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  color: white;
  font-size: 11px;
  box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.4);
}

.tray-icon {
  margin-right: 8px;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4));
}

.systray-clock {
  margin-left: 8px;
  font-size: 11px;
  font-weight: normal;
}

/* ==========================================================================
   START MENU OVERLAY
   ========================================================================== */
.start-menu {
  position: fixed;
  bottom: var(--xp-start-menu-offset);
  left: 0;
  width: 380px;
  background: white;
  border: 1px solid #0831D9;
  border-radius: 5px 5px 0 0;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  flex-direction: column;
}

.sm-header {
  height: 55px;
  background: linear-gradient(to bottom, #1162EA 0%, #2072F0 20%, #1162EA 100%);
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid #E8922A;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.sm-avatar {
  width: 40px;
  height: 40px;
  background: #FFD521;
  border: 2px solid white;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #082C6E;
  font-size: 16px;
  margin-right: 10px;
}

.sm-user-name {
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.sm-body {
  display: flex;
  height: 350px;
  background: white;
}

.sm-left {
  flex: 1;
  padding: 5px;
  background: white;
  overflow-y: auto;
}

.sm-right {
  width: 160px;
  background: #D3E5FA;
  border-left: 1px solid #95B4E6;
  padding: 5px;
}

.sm-item,
.sm-right-item {
  display: flex;
  align-items: center;
  padding: 6px;
  cursor: pointer;
  font-size: 11px;
}

.sm-item:hover,
.sm-right-item:hover {
  background: #2F71CD;
  color: white;
}

.sm-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  object-fit: contain;
}

.sm-right-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
}

.sm-item:hover .sm-icon {
  filter: brightness(1.2);
}

.sm-divider,
.sm-right-sep {
  height: 1px;
  background: #D0D0D0;
  margin: 4px 6px;
}

.sm-right-item {
  font-weight: bold;
  color: #00136C;
}

.sm-right-item:hover {
  color: white;
}

/* Remove old sprite positions for start menu visually causing artifacts if active */
.sm-footer {
  background: linear-gradient(to bottom, #4282D6 0%, #3B75C9 100%);
  height: 48px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  padding: 0 15px;
  border-top: 1px solid #95BEEF;
}

.sm-footer-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
}

.sm-footer-btn:hover {
  text-decoration: underline;
}

.sm-footer-icon {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  object-fit: contain;
}

.sm-footer-icon.logoff-variant {
  /* removed variant background */
}

/* ==========================================================================
   EXPLORER WINDOW CHROME
   ========================================================================== */
.xp-window {
  position: absolute;
  background: #ECE9D8;
  border: 0;
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset -1px -1px #00138c,
    inset 1px 1px #0831d9,
    inset -2px -2px #001ea0,
    inset 2px 2px #166aee,
    inset -3px -3px #003bda,
    inset 3px 3px #0855dd,
    2px 3px 8px rgba(0, 0, 0, 0.42);
  padding: 0 3px 3px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  outline: 1px solid transparent;
  /* for selected ring */
}

.xp-window.active {
  z-index: 100;
}

/* Title Bar */
.win-titlebar {
  height: 40px;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #066bff 88%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  border-radius: 7px 7px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 3px 3px 5px;
  cursor: default;
  /* Make visually draggable later if needed */
}

.xp-window.active .win-titlebar {
  background: linear-gradient(to right, #0058EE 0%, #3593FF 4%, #288EFF 6%, #127DFF 8%, #0369FF 10%, #0B61FF 15%, #0050ee 100%);
}

.xp-window:not(.active) .win-titlebar {
  background: linear-gradient(to right, #7697E7 0%, #7E9EE3 100%);
}

/* Inactive state */

.win-titlebar-left {
  display: flex;
  align-items: center;
}

.win-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  background-size: cover;
  border-radius: 2px;
}

/* Provide defaults or mappings if sprites missing size */
.win-title {
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  color: white;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

/* Controls (Min, Max, Close) */
.win-controls {
  display: flex;
}

.win-btn {
  width: 30px;
  height: 30px;
  margin-left: 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: transparent;
  font-size: 0;
  cursor: default;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.win-min,
.win-max {
  background-color: #2f70ed;
  background-image: url("assets/icons/lucide-minus.svg");
  border-color: #f8f8f8 #525252 #525252 #f8f8f8;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.4);
  background-size: 18px 18px;
}

.win-max {
  background-image: url("assets/icons/lucide-maximize.svg");
}

.win-close {
  background-color: #d84a36;
  background-image: url("assets/icons/lucide-x.svg");
  border-color: #f8f8f8 #525252 #525252 #f8f8f8;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.4);
  background-size: 14px 14px;
}

.win-btn:active {
  border-color: #525252 #f8f8f8 #f8f8f8 #525252;
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Toolbars */
.win-menubar {
  min-height: 29px;
  font-size: 12px;
  padding: 6px 10px 4px;
  border-bottom: 1px solid #ACA899;
  background: #ece9d8;
}

.win-menubar span {
  margin-right: 15px;
  cursor: default;
}

.win-toolbar {
  display: flex;
  align-items: center;
  min-height: 57px;
  padding: 7px 9px;
  background: #ECE9D8;
  border-bottom: 1px solid #ACA899;
  gap: 3px;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  min-height: 38px;
  padding: 3px 10px 3px 40px;
  font-family: inherit;
  font-size: 13px;
  color: #000;
  display: flex;
  align-items: center;
  background-position: 6px center;
  background-repeat: no-repeat;
  background-size: 30px 30px;
}

.win-toolbar > .toolbar-btn:nth-of-type(1),
.toolbar-back {
  background-image: url("assets/icons/lucide-arrow-left-circle.svg");
}

.win-toolbar > .toolbar-btn:nth-of-type(2),
.toolbar-forward {
  background-image: url("assets/icons/lucide-arrow-right-circle.svg");
}

.win-toolbar > .toolbar-btn:nth-of-type(3),
.toolbar-up {
  background-image: url("assets/icons/lucide-folder-up.svg");
}

.toolbar-separator {
  width: 2px;
  height: 40px;
  margin: 0 5px;
  border-left: 1px solid #aca899;
  border-right: 1px solid #fff;
}

.toolbar-btn:hover {
  border: 1px solid #ACA899;
  background-color: #fff;
  box-shadow: inset 1px 1px 1px white, inset -1px -1px 1px rgba(0, 0, 0, 0.1);
}

.toolbar-btn:active {
  border-color: #777;
  background-color: #e0e0e0;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.address-bar {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid #ACA899;
  background: white;
  margin-left: 10px;
  height: 29px;
  border-color: #7f9db9;
}

.address-label {
  color: #555;
  padding: 0 5px;
  border-right: 1px solid #ACA899;
  background: #ECE9D8;
  height: 100%;
  display: flex;
  align-items: center;
}

.address-folder-icon {
  width: 24px;
  height: 24px;
  margin-left: 2px;
  flex: 0 0 24px;
  background: url("assets/icons/folder.png") center / contain no-repeat;
}

.address-bar input {
  border: none;
  flex: 1;
  padding: 0 5px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.toolbar-go {
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 13px;
}

.toolbar-go span {
  width: 24px;
  height: 24px;
  background: url("assets/icons/lucide-circle-check.svg") center / 24px 24px no-repeat;
}

.toolbar-go:hover {
  border-color: #aca899;
  background-color: #fff;
}

/* Layout */
.win-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: white;
}

.win-sidebar {
  width: 180px;
  background: #7BA2E7;
  padding: 10px;
  border-right: 1px solid #ACA899;
  overflow-y: auto;
  background: linear-gradient(to right, #7BA2E7 0%, #638DE4 100%);
}

.sidebar-section {
  background: white;
  border: 1px solid #fff;
  border-radius: 3px 3px 0 0;
  margin-bottom: 15px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar-title {
  background: linear-gradient(to right, #fff 0%, #E3EFFF 100%);
  color: #002D96;
  font-weight: bold;
  padding: 4px 8px;
  border-bottom: 1px solid #D6DFF7;
  border-radius: 3px 3px 0 0;
}

.sidebar-link {
  padding: 4px 8px;
  color: #002D96;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.sidebar-link:hover {
  text-decoration: underline;
  color: #0058EE;
}

.win-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  position: relative;
}

.win-statusbar {
  height: 20px;
  border-top: 1px solid #ACA899;
  padding: 2px 18px 2px 10px;
  color: #333;
  display: flex;
  align-items: center;
  background: #ECE9D8;
}

.win-resize-grip {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  z-index: 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: nwse-resize;
}

.win-resize-grip::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 2px;
  height: 2px;
  background: #fff;
  box-shadow:
    1px 1px 0 #808080,
    -4px 0 0 #fff, -3px 1px 0 #808080,
    0 -4px 0 #fff, 1px -3px 0 #808080,
    -8px 0 0 #fff, -7px 1px 0 #808080,
    0 -8px 0 #fff, 1px -7px 0 #808080,
    -4px -4px 0 #fff, -3px -3px 0 #808080,
    -8px -4px 0 #fff, -7px -3px 0 #808080,
    -4px -8px 0 #fff, -3px -7px 0 #808080;
}

.xp-window[data-maximized="true"] .win-resize-grip {
  visibility: hidden;
  pointer-events: none;
}

html.resizing,
html.resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

/* ==========================================================================
   CONTENT PATTERNS (Inside right-pane of windows)
   ========================================================================== */
/* Typography */
h1 {
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 5px;
  color: #000;
}

h2 {
  font-size: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
}

p {
  margin-bottom: 12px;
  line-height: 1.5;
  color: #333;
}

/* About Content */
.about-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.about-avatar {
  width: 80px;
  height: 80px;
  background: #FFD521;
  border: 4px solid white;
  border-radius: 8px;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  color: #082C6E;
  margin-right: 20px;
}

.about-subtitle {
  color: #666;
  font-style: italic;
  font-size: 14px;
}

.about-facts {
  background: #f8f8f8;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
  margin-top: 20px;
}

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

.welcome-proof div {
  min-height: 76px;
  border: 1px solid #c7d5eb;
  border-radius: 4px;
  background: #f5f9ff;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
}

.welcome-proof strong {
  color: #0758d6;
  font-size: 22px;
}

.welcome-proof span {
  color: #4d4d4d;
  font-size: 11px;
  line-height: 1.3;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.taskbar-win-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-btn:disabled {
  color: #999;
  cursor: default;
  opacity: 0.7;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ffb400;
  outline-offset: 2px;
}

.fact-row {
  display: flex;
  margin-bottom: 5px;
}

.fact-label {
  font-weight: bold;
  width: 100px;
  color: #555;
}

/* Recruiter-first Project Explorer */
.projects-window-body {
  min-height: 0;
}

.projects-sidebar {
  width: 350px;
  flex: 0 0 350px;
  padding: 12px;
}

.projects-content {
  padding: 14px 20px 24px;
  color: #1b1b1b;
  scroll-behavior: smooth;
}

.project-sidebar-empty,
.welcome-sidebar-note {
  margin: 0;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-button {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.projects-explorer-list {
  max-width: 850px;
  margin: 0 auto;
}

.project-list {
  overflow: hidden;
  border: 1px solid #d4d4d4;
  border-radius: 2px;
  background: #fff;
}

.project-entry {
  width: 100%;
  min-height: 76px;
  border: 0;
  border-bottom: 1px solid #dedede;
  background: #fff;
  color: #171717;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  font-family: inherit;
  text-align: left;
  cursor: default;
}

.project-entry:last-child {
  border-bottom: 0;
}

.project-entry:hover {
  background: #f4f8ff;
}

.project-entry.selected {
  background: linear-gradient(to right, #eaf3ff 0%, #f7fbff 100%);
  box-shadow: inset 0 0 0 2px #2a72e5;
}

.project-entry-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.project-entry-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-entry-name {
  font-size: 17px;
  line-height: 1.15;
}

.project-entry-summary {
  color: #2f2f2f;
  font-size: 13px;
  line-height: 1.35;
}

.project-entry-meta {
  color: #6a6a6a;
  font-size: 12px;
}

.project-entry-open {
  color: #315e9b;
  font-size: 12px;
}

.project-sidebar-preview {
  display: grid;
  gap: 8px;
  padding: 12px 10px;
}

.project-sidebar-preview img {
  width: 72px;
  height: 72px;
}

.project-sidebar-preview strong {
  color: #0758d6;
  font-size: 17px;
}

.project-sidebar-preview p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.project-sidebar-preview .project-sidebar-outcome {
  color: #0756ca;
  font-size: 15px;
  font-weight: bold;
}

.project-sidebar-preview span {
  color: #606060;
  font-size: 12px;
}

.project-sidebar-facts {
  margin: 0;
  padding: 10px;
}

.project-sidebar-facts div + div {
  margin-top: 10px;
}

.project-sidebar-facts dt {
  color: #0645b5;
  font-weight: bold;
}

.project-sidebar-facts dd {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.project-case-study {
  max-width: 860px;
  margin: 0 auto;
}

.project-case-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.project-case-title {
  min-width: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}

.project-case-folder {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.project-case-title h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: bold;
}

.project-case-title p {
  max-width: 560px;
  margin: 0;
  color: #4a4a4a;
  font-size: 14px;
  line-height: 1.45;
}

.project-detail-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.project-action,
.welcome-actions button {
  min-height: 38px;
  border: 1px solid #7f9db9;
  border-radius: 4px;
  background: linear-gradient(to bottom, #fff 0%, #ece9d8 100%);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.project-action-primary,
.welcome-actions .welcome-primary {
  border-color: #164fa9;
  background: linear-gradient(to bottom, #4b8df8 0%, #1461d8 100%);
  color: #fff;
  font-weight: bold;
}

.project-outcome {
  margin: 16px 0;
  color: #0758d6;
  font-size: 19px;
  font-weight: bold;
}

.project-gallery {
  margin: 0 0 20px;
}

.project-hero-image {
  width: 100%;
  max-height: 430px;
  border: 1px solid #aab7ca;
  border-radius: 4px;
  display: block;
  object-fit: contain;
  background: #f4f6f8;
}

.project-gallery-caption {
  margin-top: 6px;
  color: #606060;
  font-size: 12px;
}

.project-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.project-thumbnail {
  width: 128px;
  height: 76px;
  padding: 2px;
  border: 1px solid #9aabc0;
  border-radius: 3px;
  background: #111;
}

.project-thumbnail.selected,
.project-thumbnail:focus-visible {
  outline: 2px solid #0758d6;
  outline-offset: 1px;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-case-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 34px;
  padding: 18px 6px;
  border-top: 1px solid #d7d7d7;
  border-bottom: 1px solid #d7d7d7;
}

.project-case-summary h2 {
  margin: 0 0 8px;
  border: 0;
  color: #0645b5;
  font-size: 16px;
}

.project-case-summary p,
.project-case-summary ul {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.project-case-summary ul {
  padding-left: 19px;
}

.engineering-details {
  grid-column: 1 / -1;
}

.engineering-details ul {
  max-width: 760px;
}

.engineering-stack {
  margin: 10px 0 0;
  font-size: 13px;
}

/* Experience List */
.experience-list {
  border-left: 2px solid #ccc;
  margin-left: 10px;
  padding-left: 20px;
}

.exp-item {
  position: relative;
  margin-bottom: 25px;
}

.exp-dot {
  position: absolute;
  left: -26px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0058EE;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #ccc;
}

.exp-role {
  font-weight: bold;
  font-size: 14px;
  color: #000;
}

.exp-company {
  font-weight: bold;
  color: #555;
}

.exp-date {
  font-style: italic;
  color: #888;
  margin-bottom: 5px;
  font-size: 10px;
}

/* Skills Grid */
.skills-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.skills-category {
  margin-bottom: 15px;
}

.skills-cat-title {
  font-weight: bold;
  margin-bottom: 8px;
  color: #002D96;
  border-bottom: 1px dotted #ccc;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  background: #E3EFFF;
  border: 1px solid #7BA2E7;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
}

/* Contact Specific */
.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  padding: 10px 12px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.contact-label {
  font-weight: bold;
  color: #666;
  font-size: 10px;
  text-transform: uppercase;
}

.contact-value {
  font-size: 14px;
  font-weight: bold;
}

.contact-message {
  margin-top: 20px;
  padding: 15px;
  background: #E3EFFF;
  border-left: 4px solid #0058EE;
}

/* Hobbies Specific */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.hobby-card {
  background: white;
  border: 1px solid #ddd;
  padding: 16px 14px;
  text-align: left;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

.hobby-name {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 13px;
}

.hobby-desc {
  color: #666;
  font-size: 11px;
}

/* Resume Paper */
.resume-paper {
  background: white;
  padding: 30px;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  margin: 0 auto;
}

.resume-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.resume-header h2 {
  font-size: 20px;
  border: none;
  margin: 0;
  padding: 0;
}

.resume-header p {
  margin: 2px 0;
  color: #444;
  font-size: 11px;
}

.resume-section {
  margin-bottom: 15px;
}

.resume-section-title {
  font-weight: bold;
  border-bottom: 1px solid #666;
  margin-bottom: 8px;
  font-size: 12px;
}

.resume-entry {
  margin-bottom: 10px;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
}

.resume-download-btn {
  text-align: center;
  margin-top: 20px;
  border-top: 1px dashed #ccc;
  padding-top: 15px;
}

.btn-download {
  display: inline-block;
  background: #288EFF;
  color: white;
  padding: 8px 15px;
  border-radius: 3px;
  font-weight: bold;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-download:hover {
  background: #0058EE;
  text-decoration: none;
}

/* ==========================================================================
   SHUTDOWN DIALOG (classic XP)
   ========================================================================== */
.shutdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  overflow: visible;
}

/* Classic XP: desktop/login go grayscale behind shutdown dialog */
body.shutdown-active #desktop,
body.shutdown-active #login-screen {
  filter: grayscale(1);
}

.shutdown-dialog-xp {
  width: 420px;
  border: 1px solid #000;
  background: #003399;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
  overflow: visible;
}

.shutdown-header-xp {
  background: #003399;
  color: #fff;
  font-family: Tahoma, 'Segoe UI', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 36px 14px 18px;
  min-height: 64px;
  overflow: visible;
}

.shutdown-title-xp {
  font-size: 22px;
  font-style: italic;
  font-weight: bold;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  flex: 1;
  min-width: 0;
}

.shutdown-xp-flag {
  flex: 0 0 auto;
  width: 58px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  image-rendering: auto;
  /* keep clear of header edges; drop-shadow without clipping */
  margin: 0 2px 0 0;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.35));
}

.shutdown-body-xp {
  /* Classic XP msgina blue — deep enough that white labels stay readable */
  background: linear-gradient(to bottom, #7ba2e7 0%, #4a7ac9 45%, #2f5cb5 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  padding: 40px 32px 34px;
  min-height: 160px;
}

.shutdown-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 72px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  font: inherit;
  color: #fff; /* override UA button text color */
}

/* Official XP: colored icons sit directly on the blue gradient (no gray plate) */
.shutdown-btn-icon {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.35));
  transition: filter 0.12s, transform 0.12s;
}

.shutdown-btn-label {
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  margin-top: 10px;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.85),
    1px 1px 0 rgba(0, 0, 0, 0.9),
    -1px 0 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.shutdown-action:hover .shutdown-btn-icon,
.shutdown-action:focus-visible .shutdown-btn-icon {
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.45)) brightness(1.1);
  transform: translateY(-1px);
}

.shutdown-action:focus-visible {
  outline: none;
}

.shutdown-action:active .shutdown-btn-icon {
  transform: translateY(1px);
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0.2)) brightness(0.95);
}

.shutdown-footer-xp {
  background: #003399;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 18px 18px;
}

.shutdown-cancel-btn {
  background: linear-gradient(to bottom, #fff 0%, #f0f0f0 48%, #e3e3e3 100%);
  border: 1px solid #003c74;
  border-radius: 3px;
  padding: 0 14px;
  min-width: 75px;
  height: 23px;
  cursor: pointer;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.shutdown-cancel-btn:hover {
  background: linear-gradient(to bottom, #fff 0%, #e8f3fc 40%, #c5e0f5 100%);
}

.shutdown-cancel-btn:active {
  background: #d6e5f5;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   RUN DIALOG
   ========================================================================== */
.run-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.run-dialog {
  width: 360px;
  background: #ece9d8;
  border: 1px solid #0055ea;
  border-radius: 6px 6px 0 0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
  font-family: Tahoma, 'Trebuchet MS', sans-serif;
}

.run-titlebar {
  height: 28px;
  background: linear-gradient(to right, #0a246a 0%, #a6caf0 100%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 0 8px;
  border-radius: 5px 5px 0 0;
}

.run-close {
  width: 21px;
  height: 21px;
  background: #c75050;
  border: 1px solid #fff;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  display: grid;
  place-items: center;
  padding: 0;
}

.run-close img {
  width: 14px;
  height: 14px;
  display: block;
}

.run-body {
  padding: 14px 14px 12px;
  position: relative;
}

.run-icon {
  width: 32px;
  height: 32px;
  float: left;
  margin: 0 10px 8px 0;
}

.run-body p {
  font-size: 11px;
  color: #000;
  margin: 0 0 14px;
  line-height: 1.35;
}

.run-open-row {
  display: flex;
  align-items: center;
  gap: 8px;
  clear: both;
  font-size: 11px;
  margin-bottom: 14px;
}

.run-open-row span {
  flex-shrink: 0;
}

.run-open-row input {
  flex: 1;
  border: 1px solid #7f9db9;
  padding: 3px 5px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  outline: none;
}

.run-open-row input:focus {
  border-color: #0058ee;
}

.run-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.run-actions button {
  min-width: 75px;
  padding: 3px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  background: linear-gradient(to bottom, #fff 0%, #ece9d8 100%);
  border: 1px solid #003c74;
  border-radius: 3px;
  cursor: pointer;
}

.run-actions button:hover {
  background: linear-gradient(to bottom, #fff 0%, #e5f1fc 40%, #c5e0f5 100%);
}

/* ==========================================================================
   MOBILE / NARROW VIEWPORTS
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --xp-taskbar-height: 52px;
    --xp-desktop-inset: var(--xp-taskbar-height);
    --xp-start-menu-offset: var(--xp-taskbar-height);
  }

  body {
    width: 100vw;
    height: 100dvh;
    zoom: 1;
    font-size: 13px;
  }

  /* —— Login: stacked welcome card —— */
  .login-left-pane,
  .login-divider {
    display: none;
  }

  .login-body {
    justify-content: center;
    align-items: center;
    padding: 28px 20px 16px;
  }

  .login-right-pane {
    width: 100%;
    max-width: 360px;
    align-items: center;
  }

  .xp-logo-block {
    margin: 0 0 18px;
    justify-content: center;
    width: 100%;
  }

  .xp-logo-block img {
    max-height: 110px !important;
    width: auto;
  }

  .login-instruction {
    margin: 0 0 22px;
    font-size: 0; /* hide desktop copy */
    text-align: center;
    line-height: 1.35;
  }

  .login-instruction::after {
    content: "To begin, tap your user name";
    font-size: 16px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  }

  .user-list {
    max-width: 100%;
  }

  .user-card {
    max-width: 100%;
    border-radius: 8px;
    padding: 12px 14px;
    background: linear-gradient(to right, #3A6EA5 0%, rgba(64, 120, 224, 0.65) 70%, rgba(64, 120, 224, 0.25) 100%);
  }

  .user-avatar-xp {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .user-name-xp {
    font-size: 20px;
  }

  .user-sub-xp {
    font-size: 13px;
  }

  .login-footer {
    height: auto;
    min-height: 56px;
    padding: 12px 18px;
  }

  .login-footer-right {
    display: none;
  }

  .footer-turnoff {
    font-size: 16px;
  }

  .power-btn-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
  }

  /* —— Desktop: touch icon grid —— */
  .desktop {
    bottom: var(--xp-desktop-inset);
  }

  .desktop-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 6px;
    padding: 16px 10px 20px;
    height: auto;
    max-height: 100%;
    overflow-y: auto;
    align-content: start;
  }

  .desktop-icon {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto;
    min-height: 92px;
    padding: 10px 4px;
    border-radius: 6px;
  }

  .desktop-icon:active {
    background: rgba(11, 97, 255, 0.25);
  }

  .icon-img {
    width: 48px;
    height: 48px;
  }

  .icon-label {
    font-size: 12px;
    margin-top: 6px;
    max-width: 96%;
    line-height: 1.2;
  }

  .taskbar {
    height: var(--xp-taskbar-height);
  }

  .taskbar-win-btn {
    height: calc(var(--xp-taskbar-height) - 8px);
    font-size: 12px;
    width: 140px;
    max-width: 140px;
    flex-basis: 140px;
    padding: 0 8px;
  }

  .systray-clock {
    font-size: 12px;
  }

  /* —— Start menu: full-width sheet —— */
  .start-menu {
    width: 100vw;
    max-width: 100%;
    bottom: var(--xp-start-menu-offset);
    max-height: calc(100dvh - var(--xp-taskbar-height));
  }

  .sm-body {
    flex-direction: column;
    height: auto;
    max-height: min(58vh, 420px);
    overflow-y: auto;
  }

  .sm-left,
  .sm-right {
    width: 100%;
    flex: none;
  }

  .sm-item,
  .sm-right-item {
    min-height: 42px;
    font-size: 14px;
    padding: 8px 12px;
  }

  .sm-footer {
    height: 56px;
    gap: 20px;
  }

  .sm-footer-btn {
    font-size: 14px;
  }

  /* —— Windows: full-bleed inside desktop (desktop already clears taskbar) —— */
  .xp-window {
    box-sizing: border-box;
    border-radius: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    box-shadow: none;
  }

  .win-resize-grip {
    display: none !important;
  }

  .xp-window .win-titlebar {
    border-radius: 0;
    height: 44px;
  }

  .win-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 110px);
  }

  .win-btn {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .win-menubar {
    display: none;
  }

  .win-toolbar {
    flex-wrap: wrap;
    gap: 4px;
    height: auto;
    min-height: 36px;
    padding: 4px 6px;
  }

  .toolbar-btn {
    display: none;
  }

  .address-bar {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .win-sidebar {
    display: none;
  }

  .win-content {
    padding: 12px;
  }

  .about-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .about-avatar {
    width: 72px;
    height: 72px;
  }

  .about-intro h1 {
    font-size: 22px;
  }

  .about-subtitle {
    font-size: 13px;
  }

  .hobbies-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-item,
  .exp-item,
  .hobby-card {
    font-size: 13px;
  }

  #win-projects .win-toolbar {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
  }

  #win-projects #projects-back,
  #win-projects #projects-up {
    display: block;
    min-width: 52px;
    min-height: 44px;
  }

  #win-projects #projects-forward {
    display: none;
  }

  #win-projects .toolbar-separator,
  #win-projects .toolbar-go {
    display: none;
  }

  #win-projects .address-bar {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
  }

  .projects-content {
    padding: 10px;
  }

  .project-entry {
    min-height: 82px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .project-entry-icon {
    width: 42px;
    height: 42px;
  }

  .project-entry-name {
    font-size: 16px;
  }

  .project-entry-summary {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .project-entry-meta,
  .project-entry-open {
    display: none;
  }

  .project-case-header {
    display: block;
  }

  .project-case-folder {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .project-case-title h1 {
    font-size: 23px;
  }

  .project-detail-actions {
    margin-top: 12px;
  }

  .project-action {
    min-height: 44px;
  }

  .project-outcome {
    font-size: 17px;
  }

  .project-case-summary {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .welcome-proof {
    grid-template-columns: 1fr;
  }

  .welcome-proof div {
    min-height: 58px;
  }

  .welcome-actions {
    display: grid;
  }

  .welcome-actions button {
    min-height: 44px;
  }

  .shutdown-overlay {
    padding: 12px;
  }

  .shutdown-dialog-xp {
    width: min(380px, calc(100vw - 24px));
  }

  .shutdown-body-xp {
    gap: 24px;
    padding: 28px 16px 24px;
  }

  .run-dialog {
    width: min(360px, calc(100vw - 24px));
  }
}


/* Keep this refresh after the legacy rules so the selected Windows XP
   components win the cascade without relying on broad !important rules. */
/* ==========================================================================
   AUGUST 2026 PROFILE + SECONDARY WINDOW REFRESH
   ========================================================================== */
.win-title {
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.taskbar,
.taskbar-left,
.taskbar-windows,
.taskbar-right.systray {
  min-height: var(--xp-taskbar-height);
  max-height: var(--xp-taskbar-height);
}

.taskbar-right.systray { padding-block: 0; }
.tray-icon { width: 16px; height: 16px; flex: 0 0 16px; }

.toolbar-action {
  min-height: 24px;
  border: 1px solid transparent;
  color: #111;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  text-decoration: none;
}
.toolbar-action:hover { border-color: #7f9db9; background: #f3f7fb; text-decoration: none; }

.about-content { max-width: 820px; padding: 2px 4px 18px; }
.about-header { gap: 14px; margin-bottom: 10px; }
.about-avatar {
  width: 72px; height: 84px; margin: 0; border: 2px solid #fff; border-radius: 3px;
  outline: 1px solid #7f9db9; box-shadow: 1px 1px 2px rgba(0,0,0,.2); object-fit: cover; object-position: top;
}
.about-intro h1 { margin: 0 0 3px; font-size: 22px; }
.about-subtitle { max-width: 650px; margin: 0; color: #555; font-size: 13px; line-height: 1.35; }
.about-biography { max-width: 42em; margin: 0 0 10px; line-height: 1.5; }
.about-biography + .about-biography { margin-top: 2px; }
.xp-group { min-width: 0; margin: 10px 0; padding: 12px 10px 10px; border: 1px solid #aca899; }
.xp-group legend { padding: 0 5px; color: #003399; font-weight: 700; }
.welcome-actions { margin: 14px 0 10px; }
.about-details dl { display: grid; gap: 5px; }
.about-details dl > div { display: grid; grid-template-columns: 82px minmax(0,1fr); }
.about-details dt { color: #555; font-weight: 700; }
.about-details dd { margin: 0; }

.experience-tiles { display: grid; gap: 2px; max-width: 1100px; }
.experience-tile {
  display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 9px 10px;
  border: 1px solid transparent; background: #fff;
}
.experience-tile:hover, .experience-tile:focus { border-color: #7da2ce; background: #eef5ff; outline: 1px dotted #1f1f1f; outline-offset: -4px; }
.experience-tile:focus-within { background: #316ac5; color: #fff; }
.experience-tile:focus-within h2, .experience-tile:focus-within strong, .experience-tile:focus-within span { color: #fff; }
.experience-tile > img { width: 36px; height: 36px; object-fit: contain; }
.experience-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.experience-heading h2 { margin: 0 0 2px; padding: 0; border: 0; color: #111; font-size: 13px; }
.experience-heading strong { color: #444; }
.experience-when { display: grid; flex: 0 0 auto; text-align: right; color: #666; }
.experience-tile ul { margin: 7px 0 0 17px; line-height: 1.38; }
.experience-tile li + li { margin-top: 4px; }

.contact-content { padding: 16px; }
.contact-sheet { max-width: 760px; margin-top: 0; }
.contact-property { min-height: 38px; display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; border-bottom: 1px solid #ddd; }
.contact-property:last-child { border-bottom: 0; }
.contact-property > span { color: #555; font-weight: 700; }
.contact-property a { width: fit-content; max-width: 100%; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; user-select: text; cursor: pointer; }
.contact-availability { max-width: 760px; margin: 14px 0 0; padding: 10px; border: 1px solid #7f9db9; background: #eef5ff; }
.contact-live { min-height: 18px; margin-top: 8px; color: #1b4d0f; }

.hobbies-content { padding: 16px 20px 24px; }
.hobbies-grid { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px 22px; }
.hobby-thumb { min-width: 0; border: 1px solid transparent; background: transparent; padding: 7px; color: #111; font: inherit; text-align: left; }
.hobby-thumb:hover { border-color: #b7c9e6; background: #f3f7ff; }
.hobby-thumb.selected { border-color: #316ac5; background: #316ac5; color: #fff; outline: 1px dotted #fff; outline-offset: -4px; }
.hobby-thumb img { width: 100%; aspect-ratio: 1 / 1; display: block; object-fit: cover; border: 4px solid #fff; box-shadow: 0 0 0 1px #8c8c8c; }
.hobby-thumb span, .hobby-thumb small { display: block; margin-top: 6px; }
.hobby-thumb span { font-weight: 700; }
.hobby-thumb small { margin-top: 2px; color: #666; }
.hobby-thumb.selected small { color: #fff; }
.hobby-sidebar-preview { margin: 0; padding: 8px; line-height: 1.4; }
.hobby-filmstrip { max-width: 1040px; margin: 0 auto; }
.hobby-filmstrip figure { margin: 0; display: grid; grid-template-columns: minmax(0, 520px) minmax(180px, 1fr); gap: 18px; align-items: start; }
.hobby-photo-frame { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #111; border: 1px solid #7f9db9; overflow: hidden; }
.hobby-photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hobby-photo-frame .tone-night { filter: brightness(1.45) contrast(1.12); }
.hobby-photo-arrow { position: absolute; top: 50%; width: 34px; height: 48px; margin-top: -24px; border: 1px solid rgba(0,0,0,.55); background: rgba(239, 239, 226, .88); box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; cursor: pointer; }
.hobby-photo-arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 0; height: 0; margin-top: -8px; }
.hobby-photo-prev { left: 8px; }
.hobby-photo-next { right: 8px; }
.hobby-photo-prev::before { margin-left: -6px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 11px solid #003399; }
.hobby-photo-next::before { margin-left: -4px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 11px solid #003399; }
.hobby-photo-arrow:hover { background: #fff; }
.hobby-photo-caption { color: #111; font-weight: 700; }
.hobby-filmstrip figcaption { display: grid; gap: 8px; padding-top: 4px; line-height: 1.45; }
.hobby-filmstrip figcaption strong { color: #003399; font-size: 16px; }
.hobby-filmstrip figcaption small { color: #666; }
.filmstrip-thumbs { display: grid; grid-template-columns: repeat(6, minmax(80px,1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #aca899; }
.filmstrip-thumbs .hobby-thumb { padding: 4px; }
.filmstrip-thumbs .hobby-thumb span { font-size: 10px; }
.filmstrip-thumbs .hobby-thumb small { display: none; }

.resume-window-body { min-height: 0; overflow: hidden; }
#win-resume .win-content { overflow: hidden; }
.resume-viewer { min-width: 0; min-height: 0; display: flex; justify-content: center; align-items: center; padding: 8px; background: #7e7e7e; }
.resume-preview-link { height: 100%; max-width: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.resume-preview-link img { display: block; width: auto; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 2px 2px 6px rgba(0,0,0,.55); cursor: pointer; }
.resume-description { margin: 0; padding: 8px; line-height: 1.4; }

@media (max-width: 900px) and (min-width: 641px) {
  .hobbies-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .hobbies-content { padding: 10px; }
  .hobbies-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .hobby-thumb { min-height: 44px; padding: 5px; }
  .hobby-filmstrip figure { grid-template-columns: 1fr; gap: 10px; }
  .hobby-photo-frame { max-height: 42vh; }
  .filmstrip-thumbs { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .filmstrip-thumbs .hobby-thumb { min-height: 44px; }
  .experience-tile { grid-template-columns: 30px minmax(0,1fr); padding: 8px 5px; }
  .experience-tile > img { width: 28px; height: 28px; }
  .experience-heading { display: block; }
  .experience-when { display: flex; gap: 8px; margin-top: 3px; text-align: left; }
  .experience-tile ul { font-size: 12px; }
  .about-details dl > div { grid-template-columns: 70px minmax(0,1fr); }
  .contact-property { grid-template-columns: 70px minmax(0,1fr); }
  #win-resume .win-toolbar { display: grid; grid-template-columns: auto auto; }
  #win-resume .address-bar { grid-column: 1 / -1; }
  #win-resume .resume-viewer { padding: 4px; }
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  #win-hobbies .win-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(44px, auto)) minmax(0, 1fr);
    align-items: center;
  }

  #win-hobbies .toolbar-btn {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  #win-hobbies .address-bar {
    grid-column: 1 / -1;
    margin-left: 0;
  }
}
