/* ============================================================
   PortfolioOS — Windows Vista / 7 Aero Glass
   ============================================================ */

:root {
  --aero-blue:       #4a90d9;
  --aero-blue-dark:  #1a5fa8;
  --aero-blue-light: #7ab8f5;
  --aero-glass:      rgba(180, 210, 240, 0.18);
  --aero-glass-border: rgba(255,255,255,0.45);
  --aero-glass-dark: rgba(10, 30, 60, 0.55);
  --win-white:       #ffffff;
  --win-text:        #1a1a1a;
  --taskbar-height:  44px;
  --font-base:       13px;
  --icon-glyph:      56px;
  --desktop-icon-w:  112px;
  --radius:          6px;
  --radius-sm:       6px;
}

* { box-sizing: border-box; }

html { height: 100vh; max-height: 100vh; overflow: hidden; margin: 0; }

body {
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  overflow: hidden;
  position: relative;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: var(--font-base);
  color: var(--win-text);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Desktop ──────────────────────────────────────────────── */

#desktop {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--taskbar-height);
  height: calc(100vh - var(--taskbar-height));
  background: url('Gemini_Generated_Image_5ej3am5ej3am5ej3.png') center/cover no-repeat;
  overflow: hidden;
  z-index: 1;
}

#desktop::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

#wallpaper { display: none; }

/* ─── Desktop Icons ────────────────────────────────────────── */

#desktop-icons {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: 0;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  height: 100%;
  max-width: min(100%, 520px);
  overflow: hidden;
}

.desktop-icon {
  width: var(--desktop-icon-w);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: default;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.15s ease;
  -webkit-user-drag: none;
  user-select: none;
}

.desktop-icon:focus,
.desktop-icon:hover {
  outline: none;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.18);
  box-shadow: none;
}

.desktop-icon__glyph {
  width: var(--icon-glyph);
  height: var(--icon-glyph);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
  transition: transform 0.15s ease;
}

.desktop-icon:hover .desktop-icon__glyph {
  transform: scale(1.05);
}

/* Hidden desktop icons — exist in DOM, invisible on screen */
.desktop-icon--hidden { display: none !important; }

.desktop-shortcut-icon {
  width: 24px; height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.desktop-icon__label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
  word-break: break-word;
  line-height: 1.35;
  padding: 2px 5px;
  border-radius: 6px;
  transition: background 0.15s ease;
  letter-spacing: 0.01em;
}

.desktop-icon:hover .desktop-icon__label {
  background: rgba(0, 80, 180, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* ─── Taskbar (Vista/7 dark glossy) ───────────────────────── */

#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: var(--taskbar-height);
  display: flex;
  align-items: center;
  padding: 4px 8px 6px;
  overflow: visible;
  background: linear-gradient(
    to bottom,
    #245edb 0%,
    #1941a5 50%,
    #123585 51%,
    #1941a5 100%
  );
  border-top: 1px solid #3a6ea5;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 5000;
}

/* Start button — green orb pill */
#start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  padding: 0;
  background: linear-gradient(to bottom, #7edc3e 0%, #5ab825 45%, #3d8a16 51%, #4aa31d 100%);
  border: 1px solid #2d6a0f;
  border-radius: 6px;
  box-shadow:
    0 2px 8px rgba(0,80,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 0 0 2px rgba(255,255,255,0.12);
  cursor: default;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin: 0 8px 0 2px;
  position: relative;
  z-index: 1;
}

#start-button:hover {
  background: linear-gradient(to bottom, #96ee50 0%, #6acc2e 45%, #4aa31d 51%, #5ab825 100%);
  box-shadow:
    0 3px 12px rgba(0,100,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 0 0 2px rgba(255,255,255,0.18);
}

#start-button:active,
#start-button.is-active {
  background: linear-gradient(to bottom, #3d8a16 0%, #2d6a0f 50%, #1e4a0a 51%, #2d6a0f 100%);
  box-shadow:
    0 1px 4px rgba(0,0,0,0.4),
    inset 0 2px 6px rgba(0,0,0,0.35);
}

.start-button__logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}

.start-button__text { display: none; }

#taskbar-tray {
  margin-left: auto;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  backdrop-filter: blur(10px);
  margin-right: 6px;
}

.tray-wifi {
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

#taskbar-apps {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-left: 8px;
  flex-grow: 1;
}

.taskbar-item {
  background: rgba(255,255,255,0.1);
  height: 32px;
  max-width: 180px;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #e8e8e8;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  transition: background 0.12s;
}

.taskbar-item:hover {
  background: rgba(255,255,255,0.18);
}

.taskbar-item.active {
  background: linear-gradient(to bottom, rgba(120,180,255,0.4), rgba(60,120,230,0.45));
  border-color: rgba(150,200,255,0.6);
  color: #fff;
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 4px rgba(0,0,0,0.2);
}

.tray-lang {
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  font-family: "Segoe UI", monospace;
  font-size: 12px;
  font-weight: 400;
  color: #e0e8f8;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background 0.12s;
}

.tray-lang:hover { background: rgba(255,255,255,0.16); }

.tray-volume {
  min-width: 28px;
  height: 24px;
  padding: 0 4px;
  font-size: 15px;
  color: #e0e8f8;
  background: transparent;
  border: none;
  cursor: default;
}

.tray-volume__slider {
  width: 60px; height: 16px;
  cursor: default;
  -webkit-appearance: none;
  background: transparent;
}

.tray-volume__slider::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(to right, var(--aero-blue-light), rgba(255,255,255,0.2));
  border-radius: 6px;
}

.tray-volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  margin-top: -5px;
  background: radial-gradient(circle at 40% 35%, #ffffff, #aacfee);
  border: 1px solid rgba(30,80,160,0.6);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

#clock {
  font-size: 12px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
  text-align: right;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ─── Start Menu — Glassmorphism 2026 ─────────────────────────────── */

#start-menu {
  position: fixed;
  left: 9px;
  bottom: calc(var(--taskbar-height) + 8px);
  display: flex;
  width: 520px;
  max-height: calc(100vh - var(--taskbar-height) - 20px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  box-shadow:
    0 24px 60px rgba(0, 30, 100, 0.3),
    0 4px 16px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.9);
  z-index: 9999;
  overflow: hidden;
  animation: sm-appear 0.18s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes sm-appear {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#start-menu.is-hidden { display: none; }

/* ── Left panel ── */
.sm-left {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 10px 12px;
  border-right: 1px solid rgba(0,0,0,0.06);
  overflow-y: auto;
}

.sm-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 10px;
}

.sm-user__avatar {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4a90d9, #1a5fa8);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(74,144,217,0.4);
}

.sm-user__name {
  font-size: 14px;
  font-weight: 400;
  color: #111;
}

.sm-user__role {
  font-size: 11px;
  color: #666;
  margin-top: 1px;
}

.sm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 6px;
  font-size: 11px;
  font-weight: 400;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sm-all-btn {
  background: none; border: none;
  font-size: 11px; color: #4a90d9;
  cursor: default; padding: 0;
  font-weight: 400;
}

.sm-pinned {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
}

.sm-pin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: default;
  transition: background 0.12s;
}

.sm-pin:hover {
  background: rgba(74,144,217,0.12);
}

.sm-pin__icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.sm-pin__name {
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 400;
}

/* ── Right panel ── */
.sm-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 0;
  overflow-y: auto;
  min-width: 0;
}

.sm-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 7px 12px;
  margin-bottom: 14px;
  cursor: default;
  transition: background 0.12s;
}

.sm-search-bar:hover {
  background: rgba(74,144,217,0.1);
  border-color: rgba(74,144,217,0.4);
}

.sm-search-bar__icon { font-size: 14px; opacity: 0.5; }
.sm-search-bar__text { font-size: 13px; color: #888; }

.sm-block {
  margin-bottom: 12px;
}

.sm-block__label {
  font-size: 11px;
  font-weight: 400;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding: 0 2px;
}

.sm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(74,144,217,0.1), rgba(26,95,168,0.06));
  border: 1px solid rgba(74,144,217,0.2);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: default;
  transition: all 0.12s;
}

.sm-card:hover {
  background: linear-gradient(135deg, rgba(74,144,217,0.18), rgba(26,95,168,0.12));
  border-color: rgba(74,144,217,0.4);
}

.sm-card__icon { font-size: 22px; flex-shrink: 0; }
.sm-card__title { font-size: 13px; font-weight: 400; color: #1a1a1a; }
.sm-card__sub { font-size: 11px; color: #666; margin-top: 1px; }

.sm-shortcut-row {
  display: flex;
  gap: 6px;
}

.sm-shortcut {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 6px;
  cursor: default;
  transition: all 0.12s;
  font-family: inherit;
}

.sm-shortcut:hover {
  background: rgba(74,144,217,0.12);
  border-color: rgba(74,144,217,0.3);
}

.sm-shortcut__icon { font-size: 20px; }
.sm-shortcut__name { font-size: 11px; font-weight: 400; color: #333; text-align: center; line-height: 1.2; }

.sm-bottom {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 10px;
}

.sm-bottom__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #333;
  cursor: default;
  font-family: inherit;
  transition: all 0.12s;
}

.sm-bottom__btn:hover {
  background: rgba(220,60,60,0.1);
  border-color: rgba(200,40,40,0.25);
  color: #c03030;
}

/* ─── Windows (Aero Glass) ─────────────────────────────────── */

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 800px;
  height: 600px;
  min-width: 380px;
  min-height: 260px;
  background: rgba(240, 245, 255, 0.82);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow:
    0 8px 32px rgba(0, 30, 80, 0.45),
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  z-index: 10;
}

.window.is-inactive {
  background: rgba(230, 235, 245, 0.7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
}

.window--game { width: 566px; height: 472px; }
.window--wmp  { width: 614px; height: 496px; }
.window--ie-browser { display: flex; flex-direction: column; }
.window--ie-browser .window__content {
  padding: 0; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
}

/* Titlebar — Windows XP Luna style */
.window__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 8px 0 10px;
  background: linear-gradient(
    to bottom,
    #0a246a 0%,
    #0e3a8a 40%,
    #1e5bc8 50%,
    #0e3a8a 51%,
    #0a246a 100%
  );
  border-bottom: 1px solid #1e5bc8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  cursor: default;
  flex-shrink: 0;
}

.window.is-inactive .window__titlebar {
  background: linear-gradient(
    to bottom,
    #7a8fa8 0%,
    #5a7fa8 40%,
    #4a6f98 50%,
    #5a7fa8 51%,
    #7a8fa8 100%
  );
}

.window__title {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,50,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window.is-inactive .window__title { color: #dde4ef; }

/* Close / min / max buttons */
.window__close {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  font-size: 11px; font-weight: bold; line-height: 1;
  color: #fff;
  background: linear-gradient(to bottom, #e05050 0%, #c03030 50%, #a02020 51%, #c03030 100%);
  border: 1px solid rgba(150,0,0,0.6);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  cursor: default;
  transition: background 0.12s;
}

.window__close:hover {
  background: linear-gradient(to bottom, #f06060 0%, #d84040 50%, #b82020 51%, #d84040 100%);
}

.window__close:active {
  background: linear-gradient(to bottom, #a02020 0%, #c03030 100%);
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.3);
}

/* Window content area — Apple-style interior */
.window__content {
  flex: 1;
  margin: 0;
  padding: 0;
  overflow: auto;
  background: #f5f5f7;
  border: none;
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--win-text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

.window.is-document .window__content { background: #fff; padding: 0; }

/* IE chrome (address bar) */
.ie-chrome {
  flex-shrink: 0;
  background: rgba(230, 240, 255, 0.9);
  border-bottom: 1px solid rgba(150,180,220,0.5);
}

.ie-toolbar {
  display: flex; align-items: center; gap: 3px; padding: 4px 6px 3px;
}

.ie-nav {
  width: 26px; height: 26px; padding: 0; font-size: 10px; line-height: 1;
  color: #1a3a7a;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(200,220,250,0.7));
  border: 1px solid rgba(100,140,210,0.5);
  border-radius: var(--radius-sm);
  cursor: default;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ie-nav:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(220,235,255,0.9)); }
.ie-nav:active { background: rgba(180,210,250,0.8); box-shadow: inset 0 1px 2px rgba(0,0,0,0.15); }

.ie-nav--back::before    { content: "◀"; font-size: 9px; }
.ie-nav--forward::before { content: "▶"; font-size: 9px; }
.ie-nav--stop::before    { content: "■"; font-size: 8px; color: #c44; }
.ie-nav--refresh::before { content: "↻"; font-size: 13px; }

.ie-address-row {
  display: flex; align-items: center; gap: 6px; padding: 2px 6px 5px;
}

.ie-address-label {
  font-size: 12px; white-space: nowrap; color: #2a4a8a; font-weight: 400;
}

.ie-address-input {
  flex: 1; min-width: 0; height: 22px; padding: 2px 8px;
  font-family: "Segoe UI", sans-serif; font-size: 12px; color: #1a1a1a;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(100,140,210,0.5);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0,0,60,0.08);
}

.browser-viewport-iframe  { width: 100%; height: 100%; border: none; background: #fff; display: block; }
.browser-content-viewport { width: 100%; height: 100%; overflow-y: auto; padding: 8px; background: #fff; }

/* ─── Buttons ──────────────────────────────────────────────── */

.win-button,
.btn98 {
  min-width: 80px;
  padding: 5px 14px;
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.95) 0%,
    rgba(220,232,252,0.9) 48%,
    rgba(185,210,248,0.9) 52%,
    rgba(210,228,252,0.9) 100%
  );
  border: 1px solid rgba(80,130,200,0.55);
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 1px 3px rgba(0,0,0,0.12);
  cursor: default;
  transition: background 0.12s;
}

.win-button:hover,
.btn98:hover {
  background: linear-gradient(to bottom,
    rgba(235,248,255,1) 0%,
    rgba(190,225,255,0.95) 48%,
    rgba(155,205,255,0.95) 52%,
    rgba(185,220,255,0.95) 100%
  );
  border-color: rgba(60,120,210,0.7);
}

.win-button:active,
.btn98:active {
  background: linear-gradient(to bottom, rgba(160,200,245,0.9), rgba(210,230,255,0.9));
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.btn98--default {
  font-weight: 400;
  border-color: rgba(30,80,180,0.7);
  box-shadow: 0 0 0 1px rgba(30,80,180,0.4), inset 0 1px 0 rgba(255,255,255,0.7);
}

/* ─── IE-browser game/projects ─────────────────────────────── */

.window--ie-browser .game,
.window--ie-browser .projects { flex: 1; min-height: 0; overflow: auto; }
.window--ie-browser .window__content > .projects { padding: 8px; }

/* ─── Projects / cards  (Apple-style) ─────────────────────── */

.projects {
  font-size: var(--font-base);
  color: #1a1a1a;
  background: #f5f5f7; /* Apple off-white */
  min-height: 100%;
}

.projects__banner {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; margin-bottom: 0;
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
  color: #fff;
}

.projects__count {
  font-size: 38px; font-weight: 400; line-height: 1;
  background: linear-gradient(135deg, #ffffff, #aaaaaa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.projects__count-label { font-size: 13px; line-height: 1.4; color: #98989d; font-weight: 400; }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px 16px;
  align-items: start;
}

.card {
  background: #ffffff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card--wide { grid-column: 1 / -1; }

.card__img {
  width: 100%; height: 130px; object-fit: cover;
  display: block; margin-bottom: 0;
  border-radius: 6px 6px 0 0;
  border: none;
}

.card__inner { padding: 14px 16px 16px; }

.card__title {
  margin: 0 0 4px; font-size: 15px; font-weight: 400;
  color: #1d1d1f; letter-spacing: -0.2px;
}

.card__tag {
  margin: 0 0 8px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.6px; color: #86868b; font-weight: 400;
}

.card__body { margin: 0; line-height: 1.5; font-size: 13px; color: #3d3d3f; }

.card__btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 14px; padding: 7px 16px;
  font-size: 13px; font-weight: 400; color: #fff; text-decoration: none;
  background: #0071e3;
  border: none; border-radius: 980px;
  cursor: default;
  transition: background 0.15s;
  box-shadow: 0 1px 4px rgba(0,113,227,0.35);
}

.card__btn:hover { background: #0077ed; }

.chip {
  display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 400;
  color: #0071e3; background: rgba(0,113,227,0.08);
  border: 1px solid rgba(0,113,227,0.15);
  border-radius: 980px;
}

/* ─── Sticky notes ─────────────────────────────────────────── */

.sticky-note {
  position: absolute; z-index: 3;
  width: 240px; padding: 22px 16px 16px;
  text-align: center;
  border-radius: 6px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.18),
    0 2px 8px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.7);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s ease;
}

#sticky-note {
  top: 180px; right: 20px;
  color: #3a2e00;
  background: rgba(255, 232, 80, 0.52);
  border: 1px solid rgba(255, 210, 0, 0.5);
  transform: rotate(2.5deg);
}

#sticky-note:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.8);
}

#contact-note {
  top: 20px; right: 20px;
  color: #4a1a2a;
  background: rgb(239 196 215 / 48%);
  border: 1px solid rgba(240, 100, 160, 0.45);
  transform: rotate(-2deg);
}

#contact-note:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.8);
}

#contact-note h3 {
  margin: 0 0 10px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 14px; font-weight: 500; color: #ffffff;
  color: #ab258e;
  letter-spacing: -0.01em;
}

.sticky__pin {
  position: absolute; top: -10px; left: 50%;
  width: 16px; height: 16px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #ff6b6b, #c92a2a);
  border: 1px solid rgba(139,0,0,0.6);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,160,160,0.5);
}

.sticky__pin::after {
  content: ""; position: absolute; bottom: -7px; left: 50%;
  width: 2px; height: 9px; transform: translateX(-50%);
  background: linear-gradient(to bottom, #888, #555);
  border-radius: 6px;
}

.sticky__art {
  margin: 4px auto 10px; padding: 0px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 6px;
}

.sticky__image { width: 150px; max-width: 100%; height: auto; display: block; margin: 0 auto; }

.sticky__text {
  margin: 0 0 0px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 13px; font-weight: 400; line-height: 1.5;
  color: #3a2e00;
}

.sticky__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }

.sticky__link,
#contact-note .sticky__link {
  font-size: 12px; font-weight: 400;
  color: #ab258e;
  text-decoration: none;
  padding: 0;
  background: transparent;
  border: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.sticky__link:hover {
  background: transparent;
  color: #d7d9e4;
  transform: translateY(-1px);
}

/* ─── Start Menu bottom */
/* Сдвигаем меню на 6px выше панели задач */
#start-menu { bottom: calc(var(--taskbar-height) + 6px); }

/* ─── Modal ────────────────────────────────────────────────── */

.modal98 {
  position: fixed; inset: 0; z-index: 8500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,40,0.3);
  backdrop-filter: blur(4px);
}

.modal98.is-hidden { display: none; }

.modal98__box {
  width: 380px; max-width: calc(100vw - 24px);
  background: rgba(230,238,255,0.92);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,30,80,0.4);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.modal98__box--sm { width: 320px; }

.modal98__body {
  display: flex; gap: 12px;
  margin: 10px; padding: 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(180,200,230,0.4);
  border-radius: var(--radius-sm);
}

.modal98__icon { width: 32px; height: 32px; flex-shrink: 0; font-size: 28px; line-height: 32px; text-align: center; }
.modal98__fields { flex: 1; }
.modal98__prompt  { margin: 0 0 8px; font-size: 12px; line-height: 1.4; }
.modal98__message { margin: 0; font-size: 12px; line-height: 1.45; }

.input98 {
  width: 100%; padding: 4px 6px;
  font-family: "Segoe UI", sans-serif; font-size: 13px;
  border: 1px solid rgba(100,140,210,0.5);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.9);
}

.modal98__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 10px 10px; }

/* ─── Messenger ────────────────────────────────────────────── */

.messenger-profile {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  background: linear-gradient(to bottom, rgba(200,220,255,0.9), rgba(170,200,245,0.85));
  border-bottom: 1px solid rgba(120,160,220,0.4);
}

.messenger-avatar {
  width: 40px; height: 40px;
  border: 2px solid rgba(100,150,230,0.5);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.messenger-name { font-size: 13px; font-weight: 400; color: #0d2050; margin-bottom: 2px; }

.messenger-status { display: flex; align-items: center; gap: 4px; }
.messenger-status-indicator { width: 8px; height: 8px; background: #22c55e; border: 1px solid #16a34a; border-radius: 6px; }
.messenger-status-text { font-size: 11px; color: #334; }

.messenger-buddy-list {
  flex: 1; overflow-y: auto;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(150,185,230,0.4);
  margin: 5px; border-radius: var(--radius-sm);
}

.messenger-group-header {
  font-size: 11px; font-weight: 400; color: #0d2050;
  padding: 5px 8px;
  background: linear-gradient(to bottom, rgba(200,220,255,0.8), rgba(180,210,250,0.7));
  border-bottom: 1px solid rgba(120,160,220,0.3);
}

.messenger-contact {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  font-size: 11px; color: #1a1a2e; cursor: default;
  border-radius: var(--radius-sm); margin: 1px;
  transition: background 0.1s;
}

.messenger-contact:hover {
  background: linear-gradient(to bottom, rgba(100,160,240,0.4), rgba(60,110,200,0.35));
  color: #0d1f3c;
}

.messenger-contact-icon { width: 16px; height: 16px; display: inline-block; border-radius: 6px; }
.messenger-icon-linkedin { background: #0077b5; }
.messenger-icon-telegram { background: #0088cc; }
.messenger-icon-email    { background: #f59e0b; }
.messenger-icon-notion   { background: #f0f0f0; border: 1px solid #ccc; }

.messenger-footer {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: rgba(200,218,248,0.6);
  border-top: 1px solid rgba(120,160,220,0.3);
  font-size: 11px; color: #334;
}

/* ─── About Me window ─────────────────────────────────────── */

.aboutme-win {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  overflow: hidden;
}

.aboutme-header {
  padding: 16px 18px 12px;
  background: linear-gradient(to bottom, rgba(200,220,255,0.9), rgba(170,200,245,0.75));
  border-bottom: 1px solid rgba(120,160,220,0.35);
  flex-shrink: 0;
}

.aboutme-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0d2050;
  letter-spacing: -0.01em;
}

.aboutme-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aboutme-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: #1a1a2e;
}

.aboutme-photo-wrap {
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Like / Share bar */
.aboutme-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px 14px;
  flex-shrink: 0;
  border-top: 1px solid rgba(120,160,220,0.2);
}

.aboutme-like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(80,130,200,0.4);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  color: #444;
  cursor: default;
  transition: background 0.12s, color 0.12s;
  font-family: "Segoe UI", sans-serif;
}

.aboutme-like-btn:hover  { background: rgba(255,60,80,0.07); border-color: #f05; color: #e00; }
.aboutme-like-btn.liked  { background: rgba(255,60,80,0.1); border-color: #f05; color: #e00; }
.aboutme-like-btn .heart { font-size: 14px; }

.aboutme-share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(80,130,200,0.4);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  color: #444;
  cursor: default;
  transition: background 0.12s;
  font-family: "Segoe UI", sans-serif;
  text-decoration: none;
}

.aboutme-share-btn:hover { background: rgba(0,113,227,0.07); border-color: #0071e3; color: #0071e3; }

.aboutme-photo {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── About window ─────────────────────────────────────────── */

.about-banner {
  background: linear-gradient(to bottom, rgba(220,235,255,0.9), rgba(190,215,250,0.8));
  padding: 16px; border-bottom: 1px solid rgba(150,185,230,0.4);
}

.about-banner h1 { font-size: 22px; font-weight: 400; margin: 0; color: #0d2050; }
.about-banner h2 { font-size: 13px; font-weight: 400; margin: 4px 0 0; color: #334; }

.about-content { padding: 14px; }
.about-content p { margin: 0 0 10px; font-size: 12px; line-height: 1.5; }

.win-hr { border: 0; border-top: 1px solid rgba(120,160,220,0.35); margin: 12px 0; }

.about-contacts { margin: 10px 0; }
.about-contacts a { color: #1a60d0; text-decoration: underline; margin-right: 14px; font-size: 13px; }
.about-contacts a:hover { color: #0040a0; }

.about-footer { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ─── CRT (softer for Vista style) ────────────────────────── */

#crt {
  position: fixed; top: 0; left: 0; right: 0;
  bottom: var(--taskbar-height);
  z-index: 9000; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 1px,
    transparent 1px, transparent 3px
  );
  background-size: 100% 3px;
}

/* ─── Boot screen (Windows XP style) ─────────────────────────────── */

#boot-screen {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.bootxp {
  background: #000;
}
/* --- Classic 98/2000 Boot Screen Layout --- */
 
.boot-classic__layout {
  display: flex;
  flex-direction: row; 
  align-items: flex-end; 
  justify-content: center;
  gap: 0; /* Обнулили отступ, чтобы не мешал */
  margin-bottom: 60px; 
  animation: bootxp-logo-fade 1s ease-out;
}

.boot-classic__text {
  text-align: left; 
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  justify-content: flex-end;
}

.boot-classic__microsoft {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  color: #fff;
  font-weight: 400;
  margin-bottom: -5px;
  letter-spacing: 0.5px;
}

.boot-classic__windows {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 72px; 
  font-weight: 600;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
}

.boot-classic__flag-container {
  filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 50px rgba(180, 220, 255, 0.15));
  animation: bootxp-logo-pulse 3s ease-in-out infinite;
  margin-bottom: 60px; /* Подняли логотип выше (было 45px) */
  margin-left: -200px; /* Чуть поправили сдвиг влево из-за нового большого размера */
  z-index: 2;
}

/* --- Стили полосы загрузки --- */
.boot-classic__progress {
  width: 280px;
  height: 16px;
  background: #000;
  border: 1px solid #474747;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.boot-classic__progress-bar {
  width: 55%; /* Сделали бегунок чуть шире, чтобы все 4 цвета красиво уместились */
  height: 100%;
  /* Тот самый красивый градиент в цветах флага */
  background: linear-gradient(90deg, 
    transparent 0%, 
    #74b9ff 15%, /* Голубой (как верхний левый квадрат) */
    #7bed56 40%, /* Зеленый (как верхний правый квадрат) */
    #fd9644 60%, /* Оранжевый (как нижний правый квадрат) */
    #fd79a8 85%, /* Розовый (как нижний левый квадрат) */
    transparent 100%
  );
  animation: boot-classic-move 2.5s infinite linear; /* Чуть замедлили анимацию для плавности */
}

@keyframes boot-classic-move {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

#boot-screen.is-done { opacity: 0; visibility: hidden; }

.bootxp__logo {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bootxp-logo-fade 1s ease-out;
}

.bootxp__windows-logo {
  width: 100px; height: 100px;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
  animation: bootxp-logo-pulse 3s ease-in-out infinite;
}

.bootxp__microsoft {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #fff;
  margin-top: 10px;
  letter-spacing: 2px;
}

.bootxp__windows-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 5px;
}

.bootxp__windows {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 32px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
}

.bootxp__xp {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: #c8960c;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(200,150,12,0.4);
}

@keyframes bootxp-logo-fade {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bootxp-logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(255,255,255,0.3)); }
  50% { filter: drop-shadow(0 0 30px rgba(255,255,255,0.5)); }
}

.bootxp__progress {
  width: 320px;
  height: 14px;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bootxp__progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #d4a000, #ffe040, #d4a000);
  border-radius: 6px;
  animation: bootxp-progress 3s ease-in-out infinite;
  position: relative;
}

.bootxp__progress-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: bootxp-shine 1.5s ease-in-out infinite;
}

@keyframes bootxp-progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes bootxp-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── Welcome wizard ───────────────────────────────────────── */

#welcome {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,10,40,0.3);
  backdrop-filter: blur(6px);
}

#welcome.is-hidden { display: none; }

.welcome__win {
  width: 640px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column;
  background: rgba(230,240,255,0.92);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,30,80,0.5), inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(20px);
  overflow: hidden;
  animation: welcome-in 0.25s ease-out;
}

@keyframes welcome-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
}

.welcome__body {
  display: flex;
  background: rgba(255,255,255,0.75);
  border-radius: 0 0 var(--radius) var(--radius);
}

.welcome__sidebar {
  width: 155px; flex-shrink: 0;
  background: linear-gradient(160deg, #0a3a6b 0%, #1d7fb8 45%, #4fb0c9 100%);
}

.welcome__sidebar-art {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 18px 8px;
}

.welcome__sidebar-word {
  font-family: "Segoe UI", sans-serif;
  font-size: 24px; font-weight: 400; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 2px;
}

.welcome__content { flex: 1; padding: 18px 20px 16px; color: var(--win-text); }

.welcome__title {
  margin: 0 0 8px;
  font-family: "Segoe UI", sans-serif;
  font-size: 20px; font-weight: 400; color: #0d2a6b;
}

.welcome__lead { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #334; }

.welcome__lang {
  margin: 12px 0; padding: 8px 12px;
  background: rgba(200,220,255,0.35);
  border: 1px solid rgba(120,160,220,0.4);
  border-radius: var(--radius-sm);
}

.welcome__lang legend { padding: 0 4px; font-size: 11px; color: #334; }
.welcome__radio { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; cursor: default; }
.welcome__radio input { accent-color: #1a5fa8; }

.welcome__nav {
  list-style: none; margin: 0 0 16px; padding: 0;
  border: 1px solid rgba(150,185,230,0.4);
  border-radius: var(--radius-sm); overflow: hidden;
}

.welcome__nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  cursor: default; border-bottom: 1px solid rgba(150,185,230,0.25);
  transition: background 0.1s;
}

.welcome__nav-item:last-child { border-bottom: 0; }

.welcome__nav-item.is-current {
  background: linear-gradient(to right, rgba(60,120,220,0.5), rgba(100,160,255,0.35));
  color: #0d1f3c; font-weight: 400;
}

.welcome__nav-icon { font-size: 22px; flex-shrink: 0; }
.welcome__nav-text { font-size: 12px; line-height: 1.35; }

.welcome__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

/* ─── Game ─────────────────────────────────────────────────── */

.game {
  display: flex; flex-direction: column; height: 100%; min-height: 300px;
  background: #0a0a2a; color: #fff;
  font-family: "Segoe UI", "Courier New", monospace; font-size: 11px;
}

.game__hud {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
  background: linear-gradient(to bottom, rgba(40,60,120,0.9), rgba(20,35,80,0.95));
  color: #e0e8ff; border-bottom: 1px solid rgba(100,140,230,0.4);
}

.game__progress-wrap {
  flex: 1; margin: 0 10px; height: 14px; padding: 2px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(100,140,220,0.4);
  border-radius: 6px; overflow: hidden;
}

.game__progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(to right, #4ae8a0, #22c55e);
  border-radius: 6px;
  transition: width 0.15s ease;
}

.game__arena {
  position: relative; flex: 1; overflow: hidden;
  background: linear-gradient(to bottom, #050520, #0a0a40);
}

.game__player { position: absolute; bottom: 8px; width: 24px; height: 28px; left: 50%; transform: translateX(-50%); }
.game__player svg { width: 100%; height: 100%; }
.game__item { position: absolute; width: 22px; height: 22px; font-size: 18px; line-height: 22px; text-align: center; }

.game__hint {
  padding: 8px 12px;
  background: rgba(40,60,120,0.8);
  color: #c8d8ff; font-size: 12px; text-align: center;
}

/* ─── Windows Media Player ─────────────────────────────────── */

.wmp {
  display: flex; flex-direction: column; height: 100%; min-height: 320px;
  background: #0d0d1e; color: #c0c8d8;
}

.wmp__chrome {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px;
  background: linear-gradient(to right, #0a2a6a, #1a60b8);
  color: #fff; font-size: 11px;
}

.wmp__screen {
  flex: 1; margin: 4px; background: #000;
  border: 1px solid rgba(100,140,220,0.3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; min-height: 200px;
}

.wmp__screen video { max-width: 100%; max-height: 100%; width: 100%; }

.wmp__controls {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: rgba(20,35,70,0.9); color: #c8d8f8;
}

.wmp__btn {
  min-width: 52px; padding: 3px 8px; font-size: 11px;
  background: rgba(60,100,180,0.4);
  border: 1px solid rgba(100,150,230,0.4);
  border-radius: var(--radius-sm);
  color: #c8d8f8; cursor: default;
}

.wmp__btn:hover { background: rgba(80,130,210,0.5); }
.wmp__title { flex: 1; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Clippy ───────────────────────────────────────────────── */

#assistant {
  position: fixed;
  right: 18px; bottom: calc(var(--taskbar-height) + 14px);
  z-index: 7000; width: 70px; height: auto; cursor: pointer;
}

#assistant:focus { outline: none; }

.assistant__image {
  width: 80%; height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,30,80,0.5));
  animation: clippy-bob 3s ease-in-out infinite;
}

@keyframes clippy-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

#assistant.is-tapping { animation: assistant-tap 0.5s ease; }
@keyframes assistant-tap {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg) translateY(-2px); }
  45% { transform: rotate(6deg); } 70% { transform: rotate(-3deg); }
}

.assistant__close {
  position: absolute;
  top: 6px; right: 7px;
  width: 18px; height: 18px;
  background: none;
  border: none;
  font-size: 10px;
  color: #86868b;
  cursor: default;
  line-height: 1;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.12s, color 0.12s;
}
.assistant__close:hover { background: rgba(0,0,0,0.08); color: #333; }

.assistant__text { display: block; padding-right: 14px; }

.assistant__bubble {
  position: absolute; right: 4px; bottom: 128px; width: 300px;
  padding: 13px 15px; font-size: 13px; line-height: 1.5; color: #0d1f3c;
  background: rgba(230,242,255,0.95);
  border: 1px solid rgba(100,160,230,0.5);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,30,80,0.25);
  backdrop-filter: blur(8px);
  transform-origin: bottom right;
  transform: scale(0.8) translateY(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.assistant__bubble::after {
  content: ""; position: absolute;
  right: 26px; bottom: -8px;
  border: 8px solid transparent;
  border-top-color: rgba(230,242,255,0.95);
  border-bottom: 0;
  filter: drop-shadow(0 1px 0 rgba(100,160,230,0.5));
}

#assistant:hover .assistant__bubble,
#assistant:focus .assistant__bubble,
#assistant.is-talking .assistant__bubble {
  opacity: 1; pointer-events: auto;
  animation: assistant-pop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform: scale(1) translateY(0);
}

@keyframes assistant-pop {
  0%  { opacity: 0; transform: scale(0.8) translateY(8px); }
  70% { transform: scale(1.05) translateY(-2px); }
  100%{ opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── Doc ──────────────────────────────────────────────────── */

.doc { padding: 24px 28px; color: #1a1a1a; font-size: 14px; line-height: 1.5; }
.doc__head { text-align: center; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid #1a4a9a; }
.doc__name { margin: 0; font-family: "Segoe UI", sans-serif; font-size: 22px; font-weight: 400; }
.doc__role { margin: 4px 0 0; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #555; }
.doc__section { margin-bottom: 14px; }
.doc__heading { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #1a4a9a; border-bottom: 1px solid #d0daf0; padding-bottom: 3px; }
.doc p { margin: 0; }
.doc__list { list-style: none; margin: 0; padding: 0; }
.doc__list li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.doc__org { font-weight: 400; }
.doc__meta { color: #666; font-style: italic; white-space: nowrap; }

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  /* 1. Иконки снова в вертикальную колонку слева */
  #desktop-icons { 
    max-width: 100%; 
    flex-direction: column; /* Выстраиваем сверху вниз */
    flex-wrap: nowrap; 
    height: 100%; 
    max-height: calc(100vh - 80px); 
  }
  .desktop-icon { width: 80px; }

  /* 2. Розовая заметка: справа сверху */
  #contact-note {
    top: 15px !important; /* Прибиваем к верху */
    right: 10px !important;
    width: 180px !important; /* Делаем чуть компактнее, чтобы не мешала иконкам */
  }

  /* 3. Желтая заметка: справа, сразу под розовой */
  #sticky-note { 
    top: 140px !important; /* Опускаем ровно под розовый стикер */
    bottom: auto !important; /* Отключаем привязку к низу, чтобы не улетала */
    right: 10px !important; 
    width: 180px !important; 
    transform: rotate(2deg) !important; 
  }
  
  /* 4. Помощник: сидит внизу справа */
  #assistant {
    right: 10px;
    bottom: 60px;
  }
  .assistant__bubble { 
    width: 220px; 
    right: 0; 
  }
  
  /* === Адаптация меню Пуск для мобилок === */
  #start-menu {
    width: calc(100vw - 18px) !important; /* Растягиваем на всю ширину экрана минус небольшие отступы по краям */
    flex-direction: column !important; /* Ставим левую и правую панели друг под друга */
    max-height: calc(100vh - 70px) !important; 
    overflow-y: auto !important; /* Добавляем общую прокрутку, если меню получилось длинным */
  }

  .sm-left {
    width: 100% !important; /* Растягиваем левую панель на всю доступную ширину */
    border-right: none !important; /* Убираем боковую полоску */
    border-bottom: 1px solid rgba(0,0,0,0.06); /* Добавляем разделитель снизу */
    padding-bottom: 15px;
  }

  .sm-right {
    width: 100% !important; /* Растягиваем правую панель */
    overflow-y: visible !important;
  }

  /* Чтобы сэкономить место по высоте, выстроим Pinned programs в две аккуратные колонки */
  .sm-pinned {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  
  .sticky__text { font-size: 13px; }
/* === Центрируем окна и запрещаем им вылезать за экран === */
/* === Центрируем окна и сдвигаем ниже стикера === */
.window, .welcome__win {
  left: 4px !important;
  top: 4px !important;
  width: calc(100vw - 8px) !important;
  max-width: calc(100vw - 8px) !important;
  min-width: 0 !important;
  height: calc(100vh - var(--taskbar-height) - 12px) !important;
  max-height: calc(100vh - var(--taskbar-height) - 12px) !important;
}

/* === Панель задач: спасаем от давки === */
#taskbar-tray {
  padding: 0 6px !important; 
  gap: 4px !important;
}

/* Прячем длинный ползунок громкости и Wi-Fi на телефонах */
.tray-volume__slider, .tray-wifi {
  display: none !important; 
}

/* Делаем вкладки открытых окон компактнее */
.taskbar-item {
  min-width: 80px !important; 
  padding: 0 8px !important;
  font-size: 11px !important;
}

/* Чуть уменьшаем часы, чтобы точно всё влезло */
#clock {
  font-size: 10px !important; 
}/* === Спасаем окно Welcome от тесноты === */
  .welcome__body {
    flex-direction: column !important; 
  }
  
  .welcome__sidebar {
    display: none !important; /* Прячем левую панель, отдаем всё место контенту */
  }
  
  .welcome__content {
    padding: 16px !important;
    overflow-y: auto !important; /* Включаем прокрутку, если не влезет */
  }
  
  .welcome__title {
    font-size: 18px !important; /* Чуть уменьшаем главный заголовок */
    margin-bottom: 6px !important;
  }

  .welcome__nav-text {
    font-size: 11px !important; /* Делаем текст в меню чуть компактнее */
  }

  /* Выстраиваем кнопки в удобную колонку */
  .welcome__actions {
    flex-direction: column !important; 
    gap: 8px !important;
    margin-top: 10px !important;
  }
  
  .welcome__actions .btn98 {
    width: 100% !important; /* Растягиваем кнопки на всю ширину */
    padding: 8px !important;
    font-size: 13px !important;
  }
  .projects__grid { grid-template-columns: 1fr; }

  /* Messenger window: bottom-right on mobile */
  .window[data-window-id="messenger"] {
    right: 6px !important;
    left: auto !important;
    bottom: 54px !important;
    top: auto !important;
    width: calc(100vw - 12px) !important;
    max-height: calc(100vh - 120px) !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  .boot__blocks, .boot__hint, #assistant.is-tapping { animation: none; }
}
.messenger-about-section {
  padding: 14px 12px;
  background: linear-gradient(to bottom, #f8f9ff, #fff);
  border-top: 1px solid #dcdcdc;
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
}

.messenger-header {
  margin: 0 0 8px;
  font-size: 13px;
  color: #0d2050;
  font-weight: 600;
}

.messenger-text {
  margin: 0 0 12px;
  font-size: 12px;
  color: #444;
  line-height: 1.4;
}

.messenger-btn {
  display: inline-block;
  padding: 6px 12px;
  background: #e1e1e1;
  border: 1px solid #999;
  border-radius: 4px;
  color: #000;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}

.messenger-btn:hover {
  background: #f0f0f0;
}

/* ─── Messenger chat area ──────────────────────────────────── */

.messenger-chat {
  min-height: 44px;
  padding: 8px 10px;
  background: #f4f7ff;
  border-top: 1px solid #dce8ff;
  border-bottom: 1px solid #dce8ff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.messenger-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #667;
  font-style: italic;
}

.messenger-typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.messenger-typing-dots span {
  width: 5px; height: 5px;
  background: #7a9fd4;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.messenger-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.messenger-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%            { transform: translateY(-4px); opacity: 1; }
}

.messenger-new-message {
  font-size: 12px;
  color: #0d2050;
  background: linear-gradient(135deg, #e8f0fe, #d0e4ff);
  border: 1px solid #a8c4f5;
  border-radius: 6px;
  padding: 7px 10px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(60,110,220,0.12);
  animation: msgAppear 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

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

/* ─── Tray notification badge ──────────────────────────────── */

#messenger-tray-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

#messenger-tray-btn:hover { background: rgba(255,255,255,0.15); }

#messenger-tray-btn.has-notification::after {
  content: "";
  position: absolute;
  top: 1px; right: 1px;
  width: 8px; height: 8px;
  background: #ff4757;
  border: 1.5px solid #fff;
  border-radius: 50%;
  animation: badgePulse 1s infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,71,87,0.6); }
  50%       { box-shadow: 0 0 0 4px rgba(255,71,87,0); }
}

/* ========== PROJECTS WINDOW — Apple style ========== */
.proj-win {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #f5f5f7;
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

.proj-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px 10px;
  border-bottom: 1px solid #e0e0e5;
  background: #f5f5f7;
  flex-shrink: 0;
}

.proj-header-title {
  font-size: 17px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.3px;
}

.proj-header-count {
  font-size: 12px;
  color: #86868b;
  font-weight: 400;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* smooth scroll iOS */
  flex: 1;
  min-height: 0; /* critical: allows flex child to shrink and scroll */
}

.proj-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.06);
}

.proj-cover {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.proj-cover--empty {
  background: linear-gradient(135deg, #f0f0f5 0%, #e5e5ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.proj-meta {
  font-size: 10px;
  color: #86868b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0;
}

.proj-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
  display: block;
  margin: 2px 0 4px;
}

.proj-desc {
  font-size: 11px;
  color: #6e6e73;
  line-height: 1.45;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.proj-tag {
  font-size: 10px;
  font-weight: 500;
  color: #0071e3;
  background: rgba(0,113,227,0.08);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 80px;
  padding: 5px 14px;
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #1a1a1a;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.95) 0%,
    rgba(220,232,252,0.9) 48%,
    rgba(185,210,248,0.9) 52%,
    rgba(210,228,252,0.9) 100%
  );
  border: 1px solid rgba(80,130,200,0.55);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 3px rgba(0,0,0,0.12);
  text-decoration: none;
  margin-top: auto;
  align-self: flex-start;
  cursor: default;
  transition: background 0.12s;
}

.proj-btn:hover {
  background: linear-gradient(to bottom,
    rgba(235,248,255,1) 0%,
    rgba(190,225,255,0.95) 48%,
    rgba(155,205,255,0.95) 52%,
    rgba(190,220,255,0.95) 100%
  );
  border-color: rgba(60,120,210,0.7);
}

.proj-btn:active {
  background: linear-gradient(to bottom, rgba(160,200,245,0.9), rgba(210,230,255,0.9));
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

/* ========== PROJECTS — mobile (after base styles to win cascade) ========== */
@media (max-width: 640px) {
  .proj-header {
    padding: 10px 14px 8px;
  }

  .proj-header-title { font-size: 14px; }

  .proj-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 10px 12px 16px;
    -webkit-overflow-scrolling: touch;
  }

  .proj-card {
    flex-direction: row !important;
    border-radius: 12px;
    min-height: 90px;
  }

  .proj-cover {
    width: 110px !important;
    min-width: 110px !important;
    height: auto !important;
    min-height: 90px;
    border-radius: 12px 0 0 12px;
    flex-shrink: 0;
  }

  .proj-cover--empty {
    width: 110px !important;
    min-width: 110px !important;
    height: auto !important;
    min-height: 90px;
    border-radius: 12px 0 0 12px;
  }

  .proj-body {
    padding: 10px 12px;
    gap: 3px;
    min-width: 0;
    flex: 1;
  }

  .proj-meta  { font-size: 9px; }
  .proj-title { font-size: 12px; margin: 2px 0 3px; }
  .proj-desc  { font-size: 10px; -webkit-line-clamp: 2; margin-bottom: 5px; }
  .proj-tag   { font-size: 9px; padding: 1px 6px; }

  .proj-btn {
    font-size: 10px;
    padding: 4px 10px;
  }
}
