/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO WINDOWS SYSTEM — desktop.css
   Companion to desktop.js — all styles for the interactive
   Windows-style window, retro desktop, notepad, context menu,
   code playground, and recycle bin.

   Conventions inherited from style.css:
   - border-radius: 0 (global reset already applied)
   - Neo-brutalist: thick black borders, hard offset shadows
   - CSS custom properties from :root for theme tokens
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Font: VT323 (retro bitmap) ──────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap');

/* ─── Win-container: the box that holds window OR desktop ────── */
#win-container {
  position: relative;
  width: 100%;
}

/* ─── STATE VISIBILITY RULES ─────────────────────────────────── */
/* Normal: show window, hide desktop */
#win-container.hw-state-normal  #portfolio-window  { display: block; }
#win-container.hw-state-normal  #retro-desktop     { display: none; }
#win-container.hw-state-normal  .hero-badge        { display: flex; }

/* Maximized: window handled by fixed overlay; container shows placeholder */
#win-container.hw-state-maximized #portfolio-window { display: block; opacity: 0.3; pointer-events: none; }
#win-container.hw-state-maximized #retro-desktop    { display: none; }
#win-container.hw-state-maximized .hero-badge       { display: flex; }

/* Minimized: hide window, show desktop; badge hidden */
#win-container.hw-state-minimized #portfolio-window { display: none; }
#win-container.hw-state-minimized #retro-desktop    { display: flex; }
#win-container.hw-state-minimized .hero-badge       { display: none !important; }

/* Closed: hide window, show desktop; badge hidden */
#win-container.hw-state-closed #portfolio-window   { display: none; }
#win-container.hw-state-closed #retro-desktop      { display: flex; }
#win-container.hw-state-closed .hero-badge         { display: none !important; }

/* ─── PORTFOLIO WINDOW (Normal state) ────────────────────────── */
#portfolio-window {
  background: var(--surface, #151518);
  border: 3px solid #000;
  box-shadow: 9px 9px 0 #000;
  position: relative;
  /* Animation target */
  transform-origin: center center;
}

/* Window open/close animations */
@keyframes hw-open-expand {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes hw-close-shrink {
  from { transform: scale(1);   opacity: 1; }
  to   { transform: scale(0.6); opacity: 0; }
}
@keyframes hw-minimize-shrink {
  from { transform: scale(1) translateY(0);    opacity: 1; }
  to   { transform: scale(0.3) translateY(60px); opacity: 0; }
}
@keyframes hw-restore-expand {
  from { transform: scale(0.3) translateY(60px); opacity: 0; }
  to   { transform: scale(1) translateY(0);    opacity: 1; }
}

#portfolio-window.hw-anim-open    { animation: hw-open-expand    0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
#portfolio-window.hw-anim-close   { animation: hw-close-shrink   0.2s  ease-in  both; }
#portfolio-window.hw-anim-minimize { animation: hw-minimize-shrink 0.22s ease-in  both; }
#portfolio-window.hw-anim-restore  { animation: hw-restore-expand  0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* Reduce motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  #portfolio-window.hw-anim-open,
  #portfolio-window.hw-anim-close,
  #portfolio-window.hw-anim-minimize,
  #portfolio-window.hw-anim-restore { animation: none !important; }
}

/* ─── TITLE BAR ──────────────────────────────────────────────── */
.hw-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 3px solid #000;
  background: var(--accent-yellow, #FFE600);
  color: #000;
  user-select: none;
}

.hw-title-bar .hw-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hw-title-bar .hw-file-name {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
}

/* ─── WINDOW CONTROL BUTTONS ────────────────────────────────── */
/* Real <button> elements, keyboard focusable, with ARIA labels  */
.hw-btn {
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  /* Override global transition selector */
  background-clip: padding-box;
}

.hw-btn-red    { background: #FF5F57; }
.hw-btn-yellow { background: #FFBD2E; }
.hw-btn-green  { background: #28CA41; }

/* Scale on hover */
.hw-btn:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

/* Focus ring — visible for keyboard users */
.hw-btn:focus-visible {
  outline: 3px solid var(--accent-cyan, #00F0FF);
  outline-offset: 2px;
}

/* Icon inside button — hidden by default, shown on hover */
.hw-btn .hw-icon {
  display: none;
  pointer-events: none;
}

.hw-btn:hover .hw-icon,
.hw-btn:focus-visible .hw-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hw-btn .hw-icon svg {
  width: 8px;
  height: 8px;
  display: block;
}

/* ─── CODE BODY (Normal window content) ─────────────────────── */
.hw-code-body {
  padding: 20px 20px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  line-height: 1.85;
  overflow-x: auto;
}

.hw-code-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.hw-ln {
  color: var(--muted, #A0A0A5);
  opacity: 0.45;
  min-width: 20px;
  width: 20px;
  text-align: right;
  user-select: none;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  flex-shrink: 0;
}

/* ─── MAXIMIZED OVERLAY ──────────────────────────────────────── */
/* Full-screen code playground — fixed, above all other content  */
#hw-maximized-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg, #0C0C0E);
  display: none;          /* shown by JS when maximized */
  flex-direction: column;
  /* ARIA: role="dialog" aria-modal="true" set by JS */
}

#hw-maximized-overlay.hw-overlay-visible {
  display: flex;
}

/* Overlay title bar */
.hw-overlay-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--accent-yellow, #FFE600);
  border-bottom: 3px solid #000;
  flex-shrink: 0;
}

.hw-overlay-titlebar .hw-dots { display: flex; gap: 6px; }

.hw-overlay-title {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000;
}

.hw-overlay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Reset code button */
.hw-reset-btn {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000;
  background: var(--accent-cyan, #00F0FF);
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 5px 12px;
  cursor: pointer;
}

.hw-reset-btn:hover {
  background: var(--accent-pink, #FF007A);
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}

.hw-reset-btn:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

/* ─── SPLIT EDITOR / PREVIEW ─────────────────────────────────── */
.hw-split {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Editor pane */
.hw-editor-pane {
  display: flex;
  flex-direction: column;
  background: #1a1a1e;
  border-right: 3px solid #000;
  overflow: hidden;
  min-width: 80px;
  flex: 1;
}

.hw-editor-header {
  padding: 6px 14px;
  background: var(--surface2, #1F1F24);
  border-bottom: 2px solid #333;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #A0A0A5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* Line-numbers + textarea wrapper */
.hw-editor-inner {
  display: flex;
  flex: 1;
  overflow: auto;
  position: relative;
}

.hw-line-numbers {
  padding: 14px 8px 14px 12px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  background: #151518;
  border-right: 1px solid #2a2a2e;
  user-select: none;
  text-align: right;
  white-space: pre;
  min-width: 40px;
  flex-shrink: 0;
  pointer-events: none;
}

.hw-code-textarea {
  flex: 1;
  padding: 14px 14px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  line-height: 1.6;
  color: #e8e8e8;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  tab-size: 2;
  -moz-tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  caret-color: var(--accent-yellow, #FFE600);
  min-width: 0;
  width: 100%;
}

.hw-code-textarea::selection {
  background: rgba(255, 230, 0, 0.3);
}

.hw-code-textarea:focus {
  outline: none;
}

/* ─── DRAGGABLE DIVIDER ──────────────────────────────────────── */
.hw-divider {
  width: 6px;
  background: #000;
  cursor: col-resize;
  flex-shrink: 0;
  position: relative;
  transition: background 0.1s;
}

.hw-divider:hover,
.hw-divider.hw-dragging {
  background: var(--accent-yellow, #FFE600);
}

.hw-divider::after {
  content: '⋮';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-size: 14px;
  pointer-events: none;
}

.hw-divider:hover::after,
.hw-divider.hw-dragging::after { color: #000; }

/* ─── PREVIEW PANE ───────────────────────────────────────────── */
.hw-preview-pane {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  min-width: 80px;
  flex: 1;
}

.hw-preview-header {
  padding: 6px 14px;
  background: var(--accent-lime, #C8F135);
  border-bottom: 2px solid #000;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.hw-preview-frame {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── MOBILE: stack editor/preview vertically at ≤768px ───── */
@media (max-width: 768px) {
  .hw-split {
    flex-direction: column;
  }
  .hw-editor-pane {
    border-right: none;
    border-bottom: 3px solid #000;
    flex: none;
    height: 45vh;
  }
  .hw-divider {
    width: 100%;
    height: 6px;
    cursor: row-resize;
  }
  .hw-divider::after { content: '···'; }
  .hw-preview-pane {
    flex: none;
    height: 45vh;
  }
}

/* ─── RETRO WIN95 DESKTOP ────────────────────────────────────── */
#retro-desktop {
  width: 100%;
  min-height: 380px;
 background:
  linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)),
  url("./images/retroWallpaper.jpeg") center / cover no-repeat;
  border: 3px solid #000;
  box-shadow: 9px 9px 0 #000;
  display: none;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  font-family: 'VT323', 'Courier New', monospace;
}

/* ── Desktop icon area ────────────────────────────────────────── */
#dt-icon-area {
  flex: 1;
  position: relative;
  padding: 8px;
  overflow: hidden;
}

/* ── Desktop icons ────────────────────────────────────────────── */
.dt-icon {
  position: absolute;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  padding: 4px;
  /* touch action to allow dragging */
  touch-action: none;
}

.dt-icon.selected {
  background: rgba(0, 0, 128, 0.4);
  outline: 1px dotted #fff;
  outline-offset: 1px;
}

.dt-icon-img {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  image-rendering: pixelated;
}

.dt-icon-label {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
  text-align: center;
  word-break: break-word;
  max-width: 60px;
  line-height: 1.2;
  pointer-events: none;
}

/* Inline rename input */
.dt-icon-rename-input {
  font-family: 'VT323', monospace;
  font-size: 14px;
  background: #000080;
  color: #fff;
  border: 1px solid #fff;
  text-align: center;
  width: 60px;
  padding: 1px 2px;
  outline: none;
}

/* ── Win95 Taskbar ────────────────────────────────────────────── */
#dt-taskbar {
  height: 28px;
  background: #c0c0c0;
  /* Classic Win95 beveled border */
  border-top: 2px solid #fff;
  box-shadow: inset 0 1px 0 #dfdfdf;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Start button */
#dt-start-btn {
  height: 22px;
  padding: 0 8px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: 'VT323', monospace;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

#dt-start-btn:active,
#dt-start-btn.active {
  border-color: #808080 #fff #fff #808080;
}

/* Taskbar portfolio.js button */
.dt-taskbar-btn {
  height: 22px;
  padding: 0 8px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.dt-taskbar-btn.active {
  /* Highlighted = minimized state (window is "in the taskbar") */
  background: #dfdfdf;
  border-color: #808080 #fff #fff #808080;
  font-weight: bold;
}

.dt-taskbar-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

/* Taskbar separator */
.dt-taskbar-sep {
  width: 2px;
  height: 18px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  flex-shrink: 0;
  margin: 0 2px;
}

/* Taskbar clock */
#dt-clock {
  margin-left: auto;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 1px 6px;
  height: 22px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Start menu popup (simple) */
#dt-start-menu {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: 160px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 3px 3px 0 #000;
  z-index: 200;
  display: none;
}

#dt-start-menu.open { display: block; }

.dt-start-menu-item {
  padding: 6px 12px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-start-menu-item:hover,
.dt-start-menu-item:focus {
  background: #000080;
  color: #fff;
  outline: none;
}

/* ─── NOTEPAD WINDOWS ────────────────────────────────────────── */
/* Draggable, stacked windows inside the retro desktop          */
.dt-notepad {
  position: absolute;
  min-width: 220px;
  min-height: 140px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 3px 3px 0 #000;
  display: flex;
  flex-direction: column;
  /* z-index managed dynamically */
}

/* Notepad title bar */
.dt-notepad-titlebar {
  height: 22px;
  background: #000080; /* Active: navy; inactive could be grey */
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  cursor: move;
  flex-shrink: 0;
  user-select: none;
}

.dt-notepad-title {
  flex: 1;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dt-notepad-close {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}

.dt-notepad-close:hover { background: #ff5555; color: #fff; }
.dt-notepad-close:focus-visible { outline: 1px dotted #000080; }

/* Notepad toolbar (File-like) */
.dt-notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
  flex-shrink: 0;
}

.dt-notepad-toolbar-btn {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 1px 8px;
  cursor: pointer;
  height: 20px;
  display: flex;
  align-items: center;
}

.dt-notepad-toolbar-btn:active {
  border-color: #808080 #fff #fff #808080;
}

.dt-notepad-toolbar-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

/* Unsaved indicator pill */
.dt-unsaved-badge {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #cc0000;
  margin-left: 4px;
  display: none;
}

.dt-unsaved-badge.visible { display: inline; }

/* Notepad textarea */
.dt-notepad-textarea {
  flex: 1;
  resize: none;
  border: none;
  border-top: 2px inset #808080;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 8px;
  background: #fff;
  color: #000;
  outline: none;
  min-height: 80px;
}

.dt-notepad-textarea:focus {
  background: #fffff8;
}

/* Inactive notepad title bar */
.dt-notepad.inactive .dt-notepad-titlebar {
  background: #808080;
}

/* ─── RECYCLE BIN WINDOW ─────────────────────────────────────── */
/* Same structure as notepad but with a list */
.dt-bin-list {
  flex: 1;
  background: #fff;
  border-top: 2px inset #808080;
  overflow-y: auto;
  min-height: 60px;
  padding: 4px;
}

.dt-bin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #000;
  cursor: pointer;
}

.dt-bin-item:hover,
.dt-bin-item.selected { background: #000080; color: #fff; }

.dt-bin-item-icon { flex-shrink: 0; }
.dt-bin-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-bin-item-date { flex-shrink: 0; font-size: 12px; color: #808080; }
.dt-bin-item:hover .dt-bin-item-date,
.dt-bin-item.selected .dt-bin-item-date { color: #ccc; }

.dt-bin-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #c0c0c0;
  border-top: 1px solid #808080;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.dt-bin-empty-msg {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #808080;
  text-align: center;
  padding: 16px;
}

/* ─── CONTEXT MENU ───────────────────────────────────────────── */
#hw-context-menu {
  position: absolute; /* absolute within #retro-desktop */
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 3px 3px 0 #000;
  z-index: 500;
  min-width: 160px;
  display: none;
  font-family: 'VT323', monospace;
}

#hw-context-menu.open { display: block; }

.hw-ctx-item {
  padding: 4px 20px 4px 10px;
  font-size: 15px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  white-space: nowrap;
}

.hw-ctx-item:hover,
.hw-ctx-item:focus,
.hw-ctx-item[aria-expanded="true"] {
  background: #000080;
  color: #fff;
  outline: none;
}

.hw-ctx-item.disabled {
  color: #808080;
  cursor: default;
  pointer-events: none;
}

.hw-ctx-sep {
  height: 1px;
  margin: 3px 0;
  background: #808080;
  border-bottom: 1px solid #fff;
}

/* Submenu arrow */
.hw-ctx-arrow {
  font-size: 12px;
  margin-left: auto;
}

/* Submenu (nested) */
.hw-ctx-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 3px 3px 0 #000;
  min-width: 160px;
  display: none;
  z-index: 501;
  font-family: 'VT323', monospace;
}

.hw-ctx-item:hover .hw-ctx-submenu,
.hw-ctx-item:focus-within .hw-ctx-submenu,
.hw-ctx-item[aria-expanded="true"] .hw-ctx-submenu { display: block; }

.hw-ctx-submenu-item {
  padding: 4px 20px 4px 10px;
  font-size: 15px;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  display: block;
}

.hw-ctx-submenu-item:hover,
.hw-ctx-submenu-item:focus { background: #000080; color: #fff; outline: none; }

/* ─── FOLDER EXPLORER WINDOW ─────────────────────────────────── */
.dt-folder-list {
  flex: 1;
  background: #fff;
  border-top: 2px inset #808080;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.dt-folder-item {
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px;
  font-family: 'VT323', monospace;
  font-size: 12px;
  color: #000;
  text-align: center;
}

.dt-folder-item:hover,
.dt-folder-item.selected { background: #000080; color: #fff; }

/* ─── DIALOG / MODAL (Win95 style) ──────────────────────────── */
.dt-dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
}

.dt-dialog {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 4px 4px 0 #000;
  min-width: 200px;
  max-width: 280px;
  font-family: 'VT323', monospace;
}

.dt-dialog-titlebar {
  height: 22px;
  background: #000080;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 14px;
  color: #fff;
}

.dt-dialog-body {
  padding: 16px;
  font-size: 15px;
  color: #000;
  line-height: 1.4;
}

.dt-dialog-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 12px;
}

.dt-dialog-btn {
  font-family: 'VT323', monospace;
  font-size: 14px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 2px 16px;
  cursor: pointer;
  min-width: 60px;
  text-align: center;
}

.dt-dialog-btn:active { border-color: #808080 #fff #fff #808080; }
.dt-dialog-btn:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }

/* ─── PORTFOLIO WINDOW shortcut icon (closed state) ─────────── */
/* A shortcut icon rendered ON the desktop to reopen the window  */
/* (Handled by dt-icon class above — just styled like others)    */

/* ─── LIGHT THEME ADJUSTMENTS ───────────────────────────────── */
[data-theme="light"] #portfolio-window {
  background: var(--surface, #fff);
}

[data-theme="light"] .hw-editor-pane {
  background: #1a1a1e; /* keep dark — it's a code editor */
}

/* ─── FOCUS RING for overlay buttons ────────────────────────── */
#hw-maximized-overlay button:focus-visible {
  outline: 3px solid var(--accent-cyan, #00F0FF);
  outline-offset: 2px;
}

/* ─── SCROLLBAR styling for editor ──────────────────────────── */
.hw-editor-inner::-webkit-scrollbar { width: 8px; height: 8px; }
.hw-editor-inner::-webkit-scrollbar-track { background: #111; }
.hw-editor-inner::-webkit-scrollbar-thumb { background: #333; }
.hw-editor-inner::-webkit-scrollbar-thumb:hover { background: #555; }

.dt-bin-list::-webkit-scrollbar { width: 8px; }
.dt-bin-list::-webkit-scrollbar-track { background: #e0e0e0; }
.dt-bin-list::-webkit-scrollbar-thumb { background: #808080; }

/* ─── Touch: larger tap targets on mobile ────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .dt-icon { width: 72px; padding: 6px; }
  .dt-icon-img { width: 36px; height: 36px; font-size: 30px; }
  .dt-icon-label { font-size: 16px; }
  #dt-taskbar { height: 36px; }
  .dt-taskbar-btn, #dt-start-btn { height: 30px; font-size: 16px; }
  #dt-clock { height: 30px; font-size: 16px; }
  .hw-btn { width: 18px; height: 18px; }
}

/* ─── Reduced motion: no desktop animations ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  .dt-icon, .dt-notepad, .dt-taskbar-btn { transition: none !important; }
}
