/* ============================================
   WINDOWS XP LUNA THEME - Portfolio
   Pixel-perfect Windows XP recreation
   ============================================ */

/* ── XP Luna Color Tokens ── */
:root {
  /* Title bars */
  --xp-title-active-start: #0054e3;
  --xp-title-active-mid: #0472ff;
  --xp-title-active-end: #3b96f3;
  --xp-title-inactive-start: #7a96df;
  --xp-title-inactive-mid: #97aede;
  --xp-title-inactive-end: #b8d0f3;
  /* Taskbar */
  --xp-taskbar-top: #3168d5;
  --xp-taskbar-mid: #2456c7;
  --xp-taskbar-bottom: #1941a5;
  /* Start button */
  --xp-start-top: #3db84a;
  --xp-start-mid: #3cae42;
  --xp-start-bottom: #2e9c32;
  --xp-start-border: #235f13;
  /* Window / UI */
  --xp-frame: #0054e3;
  --xp-btn-face: #ece9d8;
  --xp-btn-highlight: #ffffff;
  --xp-btn-shadow: #aca899;
  --xp-btn-dk-shadow: #716f64;
  --xp-window-bg: #ece9d8;
  --xp-field-bg: #ffffff;
  /* Desktop */
  --xp-desktop: #3a6ea5;
  /* Selection */
  --xp-select: #316ac5;
  --xp-select-text: #ffffff;
  /* Misc */
  --xp-menu-border: #6d7bb2;
  --xp-scrollbar: #e4e1d4;
  /* Shadows */
  --shadow-window: 2px 2px 10px rgba(0,0,0,0.35);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: Tahoma, "Segoe UI", Geneva, Verdana, sans-serif;
  font-size: clamp(11px, 1.1vw, 13px);
  color: #000;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: default;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

a { color: #0066cc; text-decoration: underline; }

/* ── XP Button ── */
.xp-btn {
  background: linear-gradient(180deg, #fff 0%, var(--xp-btn-face) 45%, #c9c5b8 100%);
  border: 1px solid var(--xp-btn-dk-shadow);
  border-radius: 3px;
  padding: 3px 12px;
  min-width: 75px;
  min-height: 23px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.xp-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #f0eee5 45%, #d6d2c6 100%);
  border-color: var(--xp-select);
}

.xp-btn:active {
  background: linear-gradient(180deg, #d0cec5 0%, #c5c1b5 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.xp-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.xp-btn-sm {
  background: linear-gradient(180deg, #fff 0%, var(--xp-btn-face) 45%, #c9c5b8 100%);
  border: 1px solid var(--xp-btn-dk-shadow);
  border-radius: 3px;
  padding: 2px 8px;
  min-width: 0;
  min-height: 20px;
}

.xp-btn-sm:active {
  background: linear-gradient(180deg, #d0cec5 0%, #c5c1b5 100%);
}

/* ============================================
   BOOT SCREEN
   ============================================ */
#boot {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.boot-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.xp-flag {
  width: 88px;
  height: 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  transform: perspective(200px) rotateY(-8deg);
}

.flag-r { background: linear-gradient(135deg, #ff3d31, #e8180c); border-radius: 0 4px 4px 0; }
.flag-g { background: linear-gradient(135deg, #5fca3b, #3eb81a); border-radius: 4px 0 0 4px; }
.flag-b { background: linear-gradient(135deg, #3b96f3, #0054e3); border-radius: 0 4px 4px 0; }
.flag-y { background: linear-gradient(135deg, #ffcc00, #f5a623); border-radius: 4px 0 0 4px; }

.boot-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.boot-ms {
  color: #aaa;
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.boot-winxp {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -1px;
}

.boot-winxp em {
  color: #ff8c00;
  font-style: normal;
  font-weight: 900;
  margin-left: 2px;
}

.boot-progress {
  width: 220px;
}

.boot-track {
  height: 14px;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 3px;
  overflow: hidden;
  padding: 2px;
}

.boot-blocks {
  display: flex;
  gap: 3px;
  animation: bootSlide 1.2s linear infinite;
}

.boot-blocks span {
  width: 12px;
  height: 8px;
  background: linear-gradient(180deg, #5ebaff, #0054e3);
  border-radius: 1px;
}

@keyframes bootSlide {
  0% { transform: translateX(-60px); }
  100% { transform: translateX(220px); }
}

#boot #boot-skip {
  margin-top: 8px;
  background: #333;
  border-color: #555;
  color: #ccc;
}

/* ============================================
   DESKTOP — Bliss-inspired wallpaper
   ============================================ */
#desktop {
  position: fixed;
  inset: 0;
  bottom: 30px;
  background: var(--xp-desktop);
  background-image: url('https://i.imgur.com/VvNhMb0.jpg');
  background-size: cover;
  background-position: center;
}

#desktop-icons {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 2px;
}

/* ── Desktop Icon ── */
.desk-icon {
  width: 74px;
  padding: 6px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 3px;
  touch-action: manipulation;
}

.desk-icon:focus {
  outline: none;
}

.desk-icon:focus,
.desk-icon.selected {
  border-color: rgba(53,106,197,0.5);
  background: rgba(53,106,197,0.25);
}

.desk-icon .dico {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.4));
}

.desk-icon .dico img,
.tb-ico img,
.title-icon img,
.exp-ico img,
.ql-btn img,
.sm-ico img,
.sm-rico img {
  display: block;
  object-fit: contain;
}

.desk-icon .dlabel {
  text-align: center;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.5);
  word-wrap: break-word;
  max-width: 70px;
  padding: 0 2px;
}

.desk-icon.selected .dlabel {
  background: var(--xp-select);
  color: #fff;
  text-shadow: none;
  border-radius: 1px;
  padding: 0 2px;
}

/* ============================================
   TASKBAR (XP Luna Blue)
   ============================================ */
#taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  background: linear-gradient(180deg, var(--xp-taskbar-top) 0%, var(--xp-taskbar-mid) 50%, var(--xp-taskbar-bottom) 100%);
  display: flex;
  align-items: center;
  z-index: 50000;
  border-top: 1px solid #0c3daa;
}

/* ── Start Button (Green Pill) ── */
#start-button {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px 0 6px;
  background: linear-gradient(180deg, #63c46c 0%, var(--xp-start-top) 12%, var(--xp-start-mid) 50%, var(--xp-start-bottom) 88%, #1c8a22 100%);
  border: 1px solid var(--xp-start-border);
  border-top: none;
  border-radius: 0 8px 8px 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    1px 0 1px rgba(0,0,0,0.2);
  touch-action: manipulation;
}

#start-button:hover {
  background: linear-gradient(180deg, #73d47c 0%, #4ac853 12%, #46ba4c 50%, #38a83e 88%, #269e2c 100%);
}

#start-button:active,
#start-button.active {
  background: linear-gradient(180deg, #3a9d40 0%, #2e8c32 12%, #2a842e 50%, #227628 88%, #1a6620 100%);
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.3),
    1px 0 1px rgba(0,0,0,0.2);
}

.start-flag {
  width: 20px;
  height: 20px;
  display: inline-block;
  background-image:
    linear-gradient(135deg, #ff3d31, #e8180c),
    linear-gradient(135deg, #5fca3b, #3eb81a),
    linear-gradient(135deg, #3b96f3, #0054e3),
    linear-gradient(135deg, #ffcc00, #f5a623);
  background-size: 9px 9px;
  background-position: 0 0, 10px 0, 0 10px, 10px 10px;
  background-repeat: no-repeat;
  border-radius: 1px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.start-text {
  font-size: 12px;
}

/* ── Quick Launch ── */
#quick-launch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.15);
  border-right: 1px solid rgba(0,0,0,0.15);
  height: 24px;
}

.ql-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 2px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
  touch-action: manipulation;
}

.ql-btn:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* ── Taskbar Window Buttons ── */
#taskbar-windows {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  overflow: hidden;
  height: 24px;
}

.tb-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 130px;
  max-width: 180px;
  height: 22px;
  padding: 0 8px;
  background: linear-gradient(180deg, #3e72d0 0%, #3160b8 50%, #2c53a0 100%);
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  touch-action: manipulation;
}

.tb-btn:hover {
  background: linear-gradient(180deg, #4e82e0 0%, #4170c8 50%, #3c63b0 100%);
}

.tb-btn.active {
  background: linear-gradient(180deg, #fff 0%, #e8f0fc 30%, #c6d8f6 100%);
  border-color: #7c9ad6;
  color: #000;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #b4c8e8;
}

.tb-btn .tb-ico {
  width: 16px;
  height: 16px;
  font-size: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── System Tray ── */
#system-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 100%;
  margin-left: auto;
  background: linear-gradient(180deg, #1886de 0%, #1472c4 50%, #0f5ea8 100%);
  border-left: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 11px;
  position: relative;
}

.tray-ico {
  font-size: 12px;
  opacity: 0.85;
  cursor: default;
}

.tray-ico:hover { opacity: 1; }

#tray-clock {
  font-size: 11px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  white-space: nowrap;
}

/* ── Notification Balloon ── */
.tray-balloon {
  position: fixed;
  bottom: 36px;
  right: 8px;
  width: 260px;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
  z-index: 60000;
  font-size: 11px;
  animation: balloonIn 0.3s ease-out;
}

.tray-balloon::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #ffffe1;
}

.tray-balloon::before {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 23px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #000;
}

@keyframes balloonIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.balloon-close {
  position: absolute;
  top: 2px;
  right: 6px;
  cursor: default;
  font-size: 14px;
  color: #666;
  line-height: 1;
}

.balloon-close:hover { color: #000; }

.balloon-title {
  font-weight: 700;
  margin-bottom: 4px;
  padding-right: 14px;
}

.balloon-msg {
  line-height: 1.4;
  color: #333;
}

/* ============================================
   START MENU (XP two-column)
   ============================================ */
#start-menu {
  position: fixed;
  left: 0;
  bottom: 30px;
  width: 380px;
  background: #fff;
  border: 2px solid var(--xp-frame);
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.4);
  display: none;
  flex-direction: column;
  z-index: 70000;
  overflow: hidden;
}

#start-menu.open {
  display: flex;
}

/* User banner */
.sm-user-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #1f6bce 0%, #1258b8 50%, #0e49a1 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  border-radius: 6px 6px 0 0;
}

.sm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.6);
  background: url('../assets/img/albi-linkedin.jpg') center/cover no-repeat;
  overflow: hidden;
}

.sm-username {
  font-size: 13px;
}

/* Two-column body */
.sm-body {
  display: flex;
  min-height: 300px;
  max-height: 420px;
}

/* Left column */
.sm-left {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-right: 1px solid #d6d2c2;
  overflow-y: auto;
}

.sm-pinned, .sm-programs {
  padding: 0;
}

.sm-allprograms {
  padding: 0;
  position: relative;
}

.sm-sep {
  height: 1px;
  margin: 4px 6px;
  background: #c5c2b4;
}

.sm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 8px;
  text-align: left;
  font-size: 11px;
  border: 1px solid transparent;
  touch-action: manipulation;
}

.sm-item:hover {
  background: var(--xp-select);
  color: #fff;
  border-color: var(--xp-select);
}

.sm-item:hover .sm-item-desc {
  color: #ccd9f0;
}

.sm-item-bold {
  font-weight: 400;
}

.sm-item-bold .sm-item-name {
  font-weight: 700;
}

.sm-ico {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sm-rico {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sm-item-text {
  flex: 1;
  min-width: 0;
}

.sm-item-name {
  font-size: 11px;
  line-height: 1.2;
}

.sm-item-desc {
  font-size: 10px;
  color: #808080;
  line-height: 1.1;
}

.sm-arrow {
  font-size: 8px;
  margin-left: auto;
  opacity: 0.6;
  transition: transform 0.15s;
}

.sm-item-allprog[aria-expanded="true"] .sm-arrow {
  transform: rotate(90deg);
}

.sm-item-allprog .sm-item-name {
  font-weight: 700;
}

/* All Programs expandable list */
.sm-allprog-list {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #e0ddd2;
}

.sm-allprog-list.open {
  display: flex;
}

/* Right column (blue) */
.sm-right {
  width: 160px;
  background: linear-gradient(180deg, #4178be 0%, #3c70b8 30%, #2e5ca0 100%);
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.sm-ritem {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  width: 100%;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  touch-action: manipulation;
}

.sm-ritem:hover {
  background: rgba(255,255,255,0.15);
}

.sm-rsep {
  height: 1px;
  margin: 4px 8px;
  background: rgba(255,255,255,0.2);
}

/* Bottom bar */
.sm-bottom {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #3d7dcd 0%, #2963b3 100%);
  border-top: 1px solid #2957a0;
}

.sm-bottom-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.sm-bottom-btn:hover {
  background: rgba(255,255,255,0.15);
}

.sm-bottom-ico {
  font-size: 14px;
}

/* ============================================
   WINDOWS (XP Luna Chrome)
   ============================================ */
.xp-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--xp-window-bg);
  border: 3px solid var(--xp-frame);
  border-top: none;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-window);
  min-width: 240px;
  min-height: 120px;
  overflow: hidden;
  animation: winOpen 0.15s ease-out;
}

.xp-window.maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: calc(100% - 30px) !important;
  border-radius: 0;
}

/* Window close animation */
.xp-window.closing {
  animation: winClose 0.15s ease-in forwards;
  pointer-events: none;
}

/* Window minimize animation */
.xp-window.minimizing {
  animation: winMinimize 0.2s ease-in forwards;
  pointer-events: none;
}

/* Window restore animation */
.xp-window.restoring {
  animation: winRestore 0.2s ease-out;
}

/* Dragging state */
.xp-window.dragging {
  will-change: transform, left, top;
}

@keyframes winOpen {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes winClose {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.88); }
}

@keyframes winMinimize {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.3) translateY(100vh); }
}

@keyframes winRestore {
  0% { opacity: 0; transform: scale(0.3) translateY(50vh); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Title Bar ── */
.xp-titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px 3px 6px;
  height: 26px;
  background: linear-gradient(180deg,
    #0997ff 0%,
    #0570de 6%,
    #0054e3 18%,
    #0054e3 24%,
    #0860ef 38%,
    #1b86f6 48%,
    #3b96f3 52%,
    #3b96f3 66%,
    #0e6eef 78%,
    #0054e3 90%,
    #004ad4 100%
  );
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
  cursor: default;
  touch-action: none;
}

.xp-window.inactive .xp-titlebar {
  background: linear-gradient(180deg,
    #c6d8f6 0%,
    #a8c2ee 6%,
    #7a96df 18%,
    #7a96df 24%,
    #88a6e4 38%,
    #97aede 48%,
    #b8d0f3 52%,
    #b8d0f3 66%,
    #93ade4 78%,
    #7a96df 90%,
    #728fda 100%
  );
  text-shadow: none;
}

.xp-titlebar .title-icon {
  width: 16px;
  height: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.xp-titlebar .title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Title Bar Buttons ── */
.xp-titlebar .win-btns {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.win-btn {
  width: 21px;
  height: 21px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  position: relative;
  touch-action: manipulation;
}

/* Minimize & Maximize: blue gradient */
.win-btn-min,
.win-btn-max {
  background: linear-gradient(180deg, #3b96f3 0%, #166beb 40%, #0054e3 100%);
  border: 1px solid #2663c3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.win-btn-min:hover,
.win-btn-max:hover {
  background: linear-gradient(180deg, #5ba8f7 0%, #2a7df0 40%, #1060e8 100%);
}

.win-btn-min:active,
.win-btn-max:active {
  background: linear-gradient(180deg, #1060e8 0%, #004ad4 40%, #003cb0 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

/* Close: red gradient */
.win-btn-close {
  background: linear-gradient(180deg, #e8786c 0%, #d44830 40%, #c42b1c 100%);
  border: 1px solid #993622;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.win-btn-close:hover {
  background: linear-gradient(180deg, #f09888 0%, #e05838 40%, #d43c2c 100%);
}

.win-btn-close:active {
  background: linear-gradient(180deg, #b42010 0%, #a01a0c 40%, #8a1408 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

/* Button symbols */
.win-btn-min::after {
  content: "";
  width: 8px;
  height: 2px;
  background: #fff;
  position: absolute;
  bottom: 5px;
}

.win-btn-max::after {
  content: "";
  width: 9px;
  height: 8px;
  border: 2px solid #fff;
  border-top-width: 3px;
  position: absolute;
}

.win-btn-close::before,
.win-btn-close::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.win-btn-close::before { transform: rotate(45deg); }
.win-btn-close::after { transform: rotate(-45deg); }

/* ── Window Menubar ── */
.xp-menubar {
  display: flex;
  gap: 0;
  padding: 1px 4px;
  background: var(--xp-window-bg);
  border-bottom: 1px solid #c5c2b4;
  flex-shrink: 0;
}

.xp-menubar button {
  padding: 2px 8px;
  border-radius: 2px;
}

.xp-menubar button:hover {
  background: var(--xp-select);
  color: #fff;
}

/* ── Dropdown menu (for Notepad, etc.) ── */
.xp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #868686;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
  z-index: 10;
  padding: 2px 1px;
}

.xp-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 3px 24px;
  font-size: 11px;
}

.xp-dropdown button:hover {
  background: var(--xp-select);
  color: #fff;
}

.xp-dropdown .dd-sep {
  height: 1px;
  margin: 2px 0;
  background: #c5c2b4;
}

/* ── Window Body ── */
.xp-body {
  flex: 1;
  overflow: auto;
  background: var(--xp-window-bg);
}

.xp-body.white {
  background: #fff;
}

/* ── Status Bar ── */
.xp-statusbar {
  display: flex;
  gap: 1px;
  padding: 2px;
  background: var(--xp-window-bg);
  border-top: 1px solid #c5c2b4;
  flex-shrink: 0;
}

.xp-statusbar .status-cell {
  padding: 1px 6px;
  font-size: 11px;
  border: 1px solid;
  border-color: #c5c2b4 #fff #fff #c5c2b4;
  flex: 1;
  background: var(--xp-btn-face);
}

.xp-statusbar .status-cell:last-child {
  flex: 0;
  min-width: 80px;
}

/* ── Resize handles ── */
.resizer { position: absolute; z-index: 2; touch-action: none; }
.resizer.e { top: 0; right: 0; width: 5px; height: 100%; cursor: e-resize; }
.resizer.w { top: 0; left: 0; width: 5px; height: 100%; cursor: w-resize; }
.resizer.n { top: 0; left: 0; width: 100%; height: 5px; cursor: n-resize; }
.resizer.s { bottom: 0; left: 0; width: 100%; height: 5px; cursor: s-resize; }
.resizer.nw { top: 0; left: 0; width: 10px; height: 10px; cursor: nw-resize; }
.resizer.ne { top: 0; right: 0; width: 10px; height: 10px; cursor: ne-resize; }
.resizer.sw { bottom: 0; left: 0; width: 10px; height: 10px; cursor: sw-resize; }
.resizer.se { bottom: 0; right: 0; width: 10px; height: 10px; cursor: se-resize; }

/* ============================================
   CONTEXT MENU
   ============================================ */
#context-menu {
  position: fixed;
  min-width: 170px;
  background: #fff;
  border: 1px solid #868686;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.25);
  display: none;
  z-index: 80000;
  padding: 2px 1px;
}

#context-menu .ctx-item {
  padding: 4px 24px 4px 28px;
  font-size: 11px;
  display: block;
  width: 100%;
  text-align: left;
}

#context-menu .ctx-item:hover {
  background: var(--xp-select);
  color: #fff;
}

#context-menu .ctx-sep {
  height: 1px;
  margin: 3px 2px;
  background: #c5c2b4;
}

/* ============================================
   DIALOGS
   ============================================ */
.dialog-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90000;
  background: rgba(0,0,0,0.05);
}

.dialog-box {
  background: var(--xp-window-bg);
  border: 3px solid var(--xp-frame);
  border-top: none;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-window);
  min-width: 340px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: winOpen 0.15s ease-out;
}

.dialog-titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  height: 26px;
  background: linear-gradient(180deg,
    #0997ff 0%, #0570de 6%, #0054e3 18%, #0054e3 24%,
    #0860ef 38%, #1b86f6 48%, #3b96f3 52%, #3b96f3 66%,
    #0e6eef 78%, #0054e3 90%, #004ad4 100%);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
  border-radius: 8px 8px 0 0;
}

.dialog-titlebar .title-text { flex: 1; }

.dialog-body {
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.dialog-icon { font-size: 32px; flex-shrink: 0; }
.dialog-msg { flex: 1; font-size: 11px; line-height: 1.5; }

.dialog-footer {
  padding: 8px 16px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--xp-window-bg);
}

/* ============================================
   SHUTDOWN DIALOG (XP classic)
   ============================================ */
#shutdown-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #3c5ea8 0%, #1f3d7a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.shutdown-dialog {
  background: linear-gradient(180deg, #5a88c8 0%, #3c6cb0 100%);
  border: 2px solid #2a4a7a;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 0;
  min-width: 400px;
  overflow: hidden;
}

.shutdown-header {
  text-align: center;
  padding: 12px 20px 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.shutdown-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px 20px;
}

.shutdown-options {
  display: flex;
  gap: 24px;
}

.shutdown-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.shutdown-opt:hover {
  background: rgba(255,255,255,0.15);
}

.sd-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.sd-standby { background: linear-gradient(180deg, #f7d77a, #d4a830); }
.sd-standby::after { content: "\1F319"; font-size: 24px; }
.sd-turnoff { background: linear-gradient(180deg, #ff6b6b, #cc3333); }
.sd-turnoff::after { content: "\23FB"; font-size: 24px; }
.sd-restart { background: linear-gradient(180deg, #5fca3b, #3eb81a); }
.sd-restart::after { content: "\1F504"; font-size: 24px; }

#shutdown-cancel {
  min-width: 90px;
}

/* ============================================
   APPLICATION STYLES
   ============================================ */

/* ── Sunken field ── */
.xp-field {
  border: 2px solid;
  border-color: var(--xp-btn-shadow) var(--xp-btn-highlight) var(--xp-btn-highlight) var(--xp-btn-shadow);
  background: #fff;
}

/* ── CV Content ── */
.cv-content {
  padding: 12px 16px;
  font-size: 11px;
  line-height: 1.55;
  overflow: auto;
  height: 100%;
  background: #fff;
}

.cv-content h2 {
  font-size: 13px;
  color: #003399;
  border-bottom: 1px solid #c5c2b4;
  padding-bottom: 3px;
  margin: 14px 0 8px;
}

.cv-content h2:first-child { margin-top: 0; }

.cv-content h3 {
  font-size: 12px;
  color: #1a3c6a;
  margin: 8px 0 4px;
}

.cv-content p { margin-bottom: 6px; }

.cv-content ul { margin: 4px 0 8px 18px; }
.cv-content ul li { margin-bottom: 3px; }

.cv-content .job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.cv-content .job-title { font-weight: 700; font-size: 12px; }
.cv-content .job-org { font-weight: 700; color: #003399; }
.cv-content .job-loc { color: #666; font-style: italic; }
.cv-content .job-dates { color: #666; font-size: 10px; }

.cv-content .highlight-box {
  background: #ffffdd;
  border: 1px solid #e8e0a0;
  border-radius: 3px;
  padding: 8px 10px;
  margin: 8px 0;
}

.cv-content .tag {
  display: inline-block;
  background: linear-gradient(180deg, #e8f0ff, #d0dffa);
  border: 1px solid #8baad4;
  border-radius: 3px;
  padding: 1px 7px;
  margin: 2px;
  font-size: 10px;
}

/* ── About Header ── */
.about-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, #0054e3 0%, #3b96f3 100%);
  color: #fff;
  margin: -12px -16px 14px;
  border-radius: 0;
}

.about-avatar {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.6);
  background: url('../assets/img/albi-linkedin.jpg') center/cover no-repeat;
  flex-shrink: 0;
}

.about-info h1 { font-size: 18px; margin-bottom: 2px; }
.about-info .subtitle { font-size: 12px; opacity: 0.95; }
.about-info .location { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.about-links { display: flex; gap: 10px; margin-top: 4px; }
.about-links a { color: #b0d4ff; font-size: 11px; }

/* ── Skill Bars ── */
.skill-category { margin-bottom: 12px; }

.skill-category h3 {
  font-size: 11px;
  margin-bottom: 4px;
  color: #003399;
  font-weight: 700;
}

.skill-bar-wrap { margin-bottom: 4px; }

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #555;
  margin-bottom: 1px;
}

.skill-bar {
  height: 14px;
  background: #e8e6dc;
  border: 1px solid #c5c2b4;
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(180deg, #3b96f3 0%, #0054e3 100%);
  border-radius: 1px;
  transition: width 0.8s ease;
}

.skill-bar-fill.green { background: linear-gradient(180deg, #5fca3b, #2e8c32); }
.skill-bar-fill.gold { background: linear-gradient(180deg, #ffcc00, #d4a830); }
.skill-bar-fill.red { background: linear-gradient(180deg, #e8786c, #c42b1c); }
.skill-bar-fill.purple { background: linear-gradient(180deg, #9b59b6, #7d3c98); }

/* Skill level labels */
.skill-level {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  color: #fff;
  margin-left: 6px;
}
.skill-level.expert { background: #0054e3; }
.skill-level.advanced { background: #2e8c32; }
.skill-level.intermediate { background: #d4a830; }

/* ── Explorer ── */
.explorer-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  height: 100%;
}

.explorer-tree {
  border-right: 1px solid #c5c2b4;
  background: #fff;
  padding: 4px;
  overflow: auto;
}

.explorer-grid {
  background: #fff;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 82px);
  gap: 6px;
  align-content: start;
  overflow: auto;
}

.explorer-item {
  width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  touch-action: manipulation;
}

.explorer-item:hover {
  background: #e8f0ff;
  border-color: #c0d0e8;
}

.explorer-item .exp-ico { font-size: 32px; }
.explorer-item .exp-name { text-align: center; font-size: 11px; word-wrap: break-word; max-width: 78px; }

.tree-item {
  padding: 2px 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 2px;
  touch-action: manipulation;
}

.tree-item:hover {
  background: var(--xp-select);
  color: #fff;
}

/* ── Notepad ── */
.notepad-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.notepad-wrap textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 4px 6px;
  font-family: "Lucida Console", "Courier New", Courier, monospace;
  font-size: 13px;
  background: #fff;
  user-select: text;
  -webkit-user-select: text;
}

/* ── Paint ── */
.paint-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

.paint-tools {
  grid-row: 2;
  grid-column: 1;
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid #c5c2b4;
  background: var(--xp-window-bg);
}

.paint-tool-btn {
  width: 26px;
  height: 24px;
  background: var(--xp-btn-face);
  border: 1px solid #c5c2b4;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.paint-tool-btn:hover { background: #e8f0ff; border-color: var(--xp-select); }
.paint-tool-btn.active { background: #d0dffa; border-color: var(--xp-select); box-shadow: inset 0 1px 2px rgba(0,0,0,0.15); }

.paint-canvas-area {
  grid-row: 1 / -1;
  grid-column: 2;
  background: #808080;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px;
}

.paint-canvas-area canvas { background: #fff; cursor: crosshair; touch-action: none; }

.paint-colors {
  grid-column: 1 / -1;
  display: flex;
  gap: 1px;
  padding: 3px 6px;
  background: var(--xp-window-bg);
  border-top: 1px solid #c5c2b4;
  flex-wrap: wrap;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid #808080;
  cursor: default;
}

.color-swatch:hover { border-color: #000; }
.color-swatch.active { border: 2px solid #000; }

/* ── Calculator ── */
.calc-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 6px;
  gap: 4px;
}

.calc-display {
  border: 2px solid;
  border-color: var(--xp-btn-shadow) var(--xp-btn-highlight) var(--xp-btn-highlight) var(--xp-btn-shadow);
  background: #fff;
  padding: 4px 8px;
  text-align: right;
  font-family: "Courier New", monospace;
  font-size: 20px;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  flex: 1;
}

.calc-keys .xp-btn { min-width: 0; padding: 4px; font-size: 12px; }

/* ── IE ── */
.ie-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ie-toolbar {
  display: flex;
  gap: 4px;
  padding: 3px 6px;
  background: var(--xp-window-bg);
  border-bottom: 1px solid #c5c2b4;
  align-items: center;
}

.ie-addr {
  flex: 1;
  border: 2px solid;
  border-color: var(--xp-btn-shadow) var(--xp-btn-highlight) var(--xp-btn-highlight) var(--xp-btn-shadow);
  padding: 2px 4px;
  font-size: 11px;
  background: #fff;
  border-radius: 2px;
}

.ie-frame { flex: 1; border: none; background: #fff; }

/* IE loading bar */
.ie-loading {
  height: 3px;
  background: var(--xp-window-bg);
  overflow: hidden;
  flex-shrink: 0;
}

.ie-loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b96f3, #0054e3);
  transition: width 0.3s ease;
}

.ie-loading-bar.loading {
  animation: ieLoad 2s ease-in-out;
}

@keyframes ieLoad {
  0% { width: 0%; }
  20% { width: 30%; }
  50% { width: 60%; }
  80% { width: 85%; }
  100% { width: 100%; }
}

/* ── Media Player ── */
.wmp-layout { display: flex; flex-direction: column; height: 100%; }
.wmp-screen { flex: 1; background: #0a0a14; display: flex; align-items: center; justify-content: center; color: #5ebaff; font-size: 14px; }
.wmp-controls { display: flex; gap: 4px; padding: 6px; align-items: center; background: var(--xp-window-bg); border-top: 1px solid #c5c2b4; }
.wmp-time { font-size: 11px; font-family: "Courier New", monospace; }

/* ── Contact Form ── */
.contact-form { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: flex; flex-direction: column; gap: 2px; }
.form-row label { font-size: 11px; font-weight: 700; }
.form-row input, .form-row textarea {
  border: 2px solid;
  border-color: var(--xp-btn-shadow) var(--xp-btn-highlight) var(--xp-btn-highlight) var(--xp-btn-shadow);
  padding: 3px 4px;
  font-size: 11px;
  background: #fff;
  border-radius: 2px;
  user-select: text;
  -webkit-user-select: text;
}
.form-row textarea { height: 80px; resize: vertical; }

.form-status {
  padding: 6px 8px;
  border-radius: 3px;
  font-size: 11px;
  display: none;
}
.form-status.success { display: block; background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.form-status.error { display: block; background: #f2dede; color: #a94442; border: 1px solid #ebccd1; }

/* ── Projects Explorer ── */
.proj-explorer {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* Stats Bar */
.proj-stats-bar {
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fafafa 0%, #ece9d8 100%);
  border-bottom: 1px solid #aca899;
  flex-shrink: 0;
}

.proj-stat-box {
  text-align: center;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #c5c2b4;
  border-radius: 3px;
  min-width: 70px;
}

.proj-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #003399;
  line-height: 1.2;
}

.proj-stat-label {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proj-lang-chart {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.proj-lang-bar {
  display: flex;
  height: 10px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #c5c2b4;
}

.proj-lang-seg {
  transition: flex 0.3s;
}

.proj-lang-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 9px;
  color: #555;
}

.proj-lang-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.proj-lang-dot span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* Toolbar */
.proj-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: var(--xp-btn-face, #ece9d8);
  border-bottom: 1px solid #aca899;
  flex-shrink: 0;
}

.proj-filters {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.proj-filter-btn {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #aca899;
  border-radius: 2px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-family: inherit;
}

.proj-filter-btn:hover {
  background: #e8f0ff;
}

.proj-filter-btn.active {
  background: #316ac5;
  color: #fff;
  border-color: #316ac5;
}

.proj-view-toggle {
  display: flex;
  gap: 2px;
}

.proj-view-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #aca899;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-view-btn:hover { background: #e8f0ff; }
.proj-view-btn.active { background: #316ac5; color: #fff; border-color: #316ac5; }

/* Content Area */
.proj-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #fff;
}

/* Enhanced Grid */
.proj-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.proj-card-enhanced {
  border: 1px solid #c5c2b4;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.proj-card-enhanced:hover {
  box-shadow: 0 3px 12px rgba(0,51,153,0.18);
  transform: translateY(-2px);
}

.project-thumb {
  height: 70px;
  background: linear-gradient(135deg, #e8f0ff 0%, #d0dffa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border-bottom: 1px solid #c5c2b4;
  position: relative;
}

.proj-card-icon { font-size: 28px; }

.proj-status-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 2px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.proj-category-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(0,0,0,0.5);
  color: #fff;
}

.project-info {
  padding: 8px 10px;
}

.project-info h3 {
  font-size: 11px;
  color: #003399;
  margin-bottom: 3px;
  font-weight: 700;
}

.proj-card-desc {
  font-size: 9px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 6px;
}

.proj-card-metrics {
  display: flex;
  gap: 8px;
  font-size: 9px;
  color: #888;
  margin-bottom: 5px;
}

.proj-card-metrics span {
  display: inline-flex;
  align-items: center;
}

.proj-card-langbar {
  display: flex;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.project-tag {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 2px;
  background: #e8f0ff;
  border: 1px solid #c0d0e8;
  color: #003399;
}

.proj-tag-more {
  background: #f0f0f0;
  color: #888;
  border-color: #ccc;
}

/* ── List View ── */
.proj-list {
  font-size: 11px;
}

.proj-list-header {
  display: grid;
  grid-template-columns: 28px 1fr 80px 60px 60px 60px 70px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #c5c2b4;
  border-bottom: 2px solid #aca899;
  font-weight: 700;
  font-size: 10px;
  color: #333;
}

.proj-list-row {
  display: grid;
  grid-template-columns: 28px 1fr 80px 60px 60px 60px 70px;
  padding: 5px 8px;
  border-bottom: 1px solid #eee;
  align-items: center;
  transition: background 0.1s;
}

.proj-list-row:hover {
  background: #e8f0ff;
}

.proj-list-name { font-weight: 600; color: #003399; }
.proj-list-cat { font-size: 9px; color: #666; }
.proj-list-loc { font-weight: 600; text-align: right; }
.proj-list-commits { text-align: right; color: #555; }
.proj-list-status { font-size: 9px; font-weight: 700; }
.proj-list-date { font-size: 9px; color: #888; }

/* ── Timeline View ── */
.proj-timeline {
  padding: 0 10px;
}

.proj-tl-group {
  margin-bottom: 16px;
}

.proj-tl-month {
  font-size: 12px;
  font-weight: 700;
  color: #003399;
  padding: 4px 10px;
  background: linear-gradient(90deg, #e8f0ff, transparent);
  border-left: 3px solid #316ac5;
  margin-bottom: 8px;
}

.proj-tl-items {
  padding-left: 16px;
  border-left: 2px solid #c0d0e8;
}

.proj-tl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  position: relative;
  transition: background 0.1s;
  padding-left: 8px;
  border-radius: 3px;
}

.proj-tl-item:hover {
  background: #f5f8ff;
}

.proj-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #316ac5;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #316ac5;
  flex-shrink: 0;
  margin-top: 3px;
}

.proj-tl-content {
  flex: 1;
}

.proj-tl-content strong {
  font-size: 11px;
  color: #003399;
  display: block;
}

.proj-tl-meta {
  font-size: 9px;
  color: #888;
  display: block;
  margin: 2px 0 4px;
}

/* ── Detail View ── */
.proj-detail {
  padding: 2px;
}

.proj-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.proj-back-btn {
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
}

.proj-detail-status {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.proj-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.proj-detail-title h2 {
  font-size: 16px;
  color: #003399;
  margin: 0;
}

.proj-detail-cat {
  font-size: 10px;
  color: #888;
}

.proj-detail-icon { font-size: 36px; }

.proj-detail-desc {
  font-size: 11px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 8px 10px;
  background: #f9f9f9;
  border-left: 3px solid #316ac5;
  border-radius: 2px;
}

.proj-detail-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.proj-dstat {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: linear-gradient(180deg, #e8f0ff 0%, #d0dffa 100%);
  border: 1px solid #c0d0e8;
  border-radius: 4px;
}

.proj-dstat-num {
  font-size: 20px;
  font-weight: 700;
  color: #003399;
}

.proj-dstat-label {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
}

.proj-detail-section {
  margin-bottom: 12px;
}

.proj-detail-section h3 {
  font-size: 11px;
  color: #003399;
  border-bottom: 1px solid #d0dffa;
  padding-bottom: 3px;
  margin-bottom: 6px;
}

.proj-detail-langs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-dlang-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.proj-dlang-name {
  width: 90px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333;
}

.proj-dlang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.proj-dlang-bar {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.proj-dlang-bar div {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.proj-dlang-pct {
  width: 32px;
  text-align: right;
  color: #888;
  font-size: 9px;
}

.proj-detail-tags {
  gap: 4px;
}

.proj-detail-tags .project-tag {
  font-size: 10px;
  padding: 2px 8px;
}

.proj-detail-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.proj-detail-features li {
  font-size: 10px;
  color: #444;
  padding: 3px 6px;
  background: #fafafa;
  border-radius: 2px;
  border-left: 2px solid #316ac5;
}

/* ── Minesweeper ── */
.mine-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xp-window-bg);
}

.mine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: var(--xp-window-bg);
  border-bottom: 2px solid;
  border-color: var(--xp-btn-shadow);
}

.mine-counter,
.mine-timer {
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  color: #ff0000;
  background: #000;
  padding: 2px 6px;
  min-width: 42px;
  text-align: center;
  border: 2px inset #808080;
}

.mine-face {
  width: 28px;
  height: 28px;
  background: linear-gradient(180deg, #fff, var(--xp-btn-face));
  border: 2px outset #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: default;
}

.mine-face:active {
  border-style: inset;
}

.mine-grid-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px;
  overflow: auto;
}

.mine-grid {
  display: inline-grid;
  border: 3px solid;
  border-color: var(--xp-btn-shadow) var(--xp-btn-highlight) var(--xp-btn-highlight) var(--xp-btn-shadow);
  background: #c0c0c0;
}

.mine-cell {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px outset #ddd;
  background: linear-gradient(135deg, #e8e8e8, #c8c8c8);
  cursor: default;
  touch-action: manipulation;
  user-select: none;
}

.mine-cell.revealed {
  border: 1px solid #c0c0c0;
  background: #d0d0d0;
}

.mine-cell.mine-exploded {
  background: #ff4444;
}

.mine-cell.flagged::after {
  content: "\1F6A9";
  font-size: 12px;
}

.mine-cell .n1 { color: #0000ff; }
.mine-cell .n2 { color: #008000; }
.mine-cell .n3 { color: #ff0000; }
.mine-cell .n4 { color: #000080; }
.mine-cell .n5 { color: #800000; }
.mine-cell .n6 { color: #008080; }
.mine-cell .n7 { color: #000; }
.mine-cell .n8 { color: #808080; }

/* ── System Properties ── */
.sysprop-layout {
  padding: 16px;
  display: flex;
  gap: 16px;
}

.sysprop-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.sysprop-logo .xp-flag {
  width: 64px;
  height: 64px;
}

.sysprop-info {
  flex: 1;
  font-size: 11px;
  line-height: 1.6;
}

.sysprop-info h2 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #003399;
}

.sysprop-info .edition {
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: #000;
  margin-bottom: 4px;
}

.sysprop-info .edition em {
  color: #ff8c00;
  font-style: normal;
}

.sysprop-sep {
  height: 1px;
  background: #c5c2b4;
  margin: 8px 0;
}

/* ── Wallpaper Picker ── */
.wp-picker {
  padding: 16px;
}

.wp-picker h2 {
  font-size: 13px;
  color: #003399;
  margin-bottom: 10px;
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wp-option {
  height: 80px;
  border: 3px solid transparent;
  border-radius: 4px;
  cursor: default;
  transition: border-color 0.15s;
}

.wp-option:hover {
  border-color: #90b0e0;
}

.wp-option.active {
  border-color: var(--xp-select);
  box-shadow: 0 0 0 1px var(--xp-select);
}

.wp-option span {
  display: block;
  text-align: center;
  font-size: 10px;
  margin-top: 2px;
  color: #666;
}

/* ============================================
   SCROLLBARS (XP style)
   ============================================ */
::-webkit-scrollbar { width: 17px; height: 17px; }
::-webkit-scrollbar-track { background: var(--xp-scrollbar); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fff, var(--xp-btn-face), #c9c5b8);
  border: 1px solid #8e8a7e;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #fff, #e0ddd2, #d0cdc2); }
::-webkit-scrollbar-button {
  background: linear-gradient(180deg, #fff, var(--xp-btn-face));
  border: 1px solid #8e8a7e;
  display: block;
  width: 17px;
  height: 17px;
}

/* ============================================
   MOBILE FALLBACK
   ============================================ */
#mobile-view {
  display: none;
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */
@media print {
  #boot, #taskbar, #start-menu, #shutdown-overlay,
  #context-menu, #modals, #tray-balloon, #mobile-view,
  .resizer, .win-btns, .xp-menubar, .xp-statusbar { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    overflow: visible;
  }

  #desktop {
    position: static;
    background: #fff !important;
    overflow: visible;
  }

  #desktop-icons { display: none; }

  .xp-window {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    animation: none !important;
  }

  .xp-titlebar {
    background: none !important;
    color: #003399 !important;
    text-shadow: none !important;
    border-bottom: 2px solid #003399;
    padding: 4px 0;
  }

  .xp-body {
    overflow: visible !important;
    background: #fff !important;
  }

  .about-header {
    background: none !important;
    color: #000 !important;
    margin: 0 !important;
    border-bottom: 1px solid #ccc;
  }

  .about-links a { color: #003399 !important; }

  .cv-content { height: auto !important; overflow: visible !important; }
}
