/* ============================================================
   lefomin.com — System 7 flavoured personal page
   Chrome (menu bar, window titles) stays English/Chicago;
   window contents translate RU/EN (Geneva-ish stack, full Cyrillic).
   ============================================================ */

@font-face {
  font-family: "ChicagoFLF";
  src: url("../fonts/ChicagoFLF.woff") format("woff"),
       url("../fonts/ChicagoFLF.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --gray-light: #e8e8e8;
  --gray-mid: #bdbdbd;
  --accent: #3b5f8a;          /* muted System-7 blue */
  --accent-light: #cfe0ee;
  --green: #61bb46;
  --menubar-h: 30px;
  --border: 2px;
  --font-chicago: "ChicagoFLF", "Chicago", "Krungthep", "Charcoal", sans-serif;
  --font-body: "Geneva", "Verdana", "Lucida Grande", "Tahoma", "DejaVu Sans", sans-serif;
  /* Geneva has no real bold and browsers won't always fake one — bold text skips it */
  --font-body-bold: "Verdana", "Lucida Grande", "Tahoma", "DejaVu Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--menubar-h) + 12px); /* hash/scrollIntoView must clear the fixed menu bar */
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  /* 50% dither desktop pattern, slightly cool like a tinted CRT */
  background-color: #9aa4ab;
  background-image: repeating-conic-gradient(#8d979f 0% 25%, #a9b2b8 0% 50%);
  background-size: 4px 4px;
  padding-top: var(--menubar-h);
}

.chicago {
  font-family: var(--font-chicago);
  font-weight: normal;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

::selection { background: var(--black); color: var(--white); }

a { color: var(--black); text-decoration: underline; }
a:hover { background: var(--black); color: var(--white); text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px dotted var(--black);
  outline-offset: 2px;
}

/* ============ Menu bar ============ */

.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  background: var(--white);
  border-bottom: var(--border) solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 100;
}

.menubar-left, .menubar-right { display: flex; align-items: center; gap: 2px; height: 100%; }

.menu-logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px 0 6px;
  border: 0;
  background: none;
  cursor: pointer;
}
.menu-logo svg { width: 30px; height: 18px; shape-rendering: crispEdges; }
.menu-logo[aria-expanded="true"] { background: var(--black); }

.menus { display: flex; height: 100%; }
.menu-root { position: relative; height: 100%; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  height: 100%;
  border: 0;
  background: none;
  font-size: 15px;
  padding: 0 12px;
  cursor: pointer;
  font-family: var(--font-chicago);
  text-decoration: none; /* nav items are links now, but menu items don't underline */
}
a.menu-btn:hover { background: var(--black); color: var(--white); }
.menu-btn[aria-expanded="true"] { background: var(--black); color: var(--white); }
.menu-btn:disabled { color: #9a9a9a; cursor: default; }
/* Chicago has no Cyrillic — localized chrome falls back to the bold body face */
html[lang="ru"] .menu-btn[data-i18n] {
  font-family: var(--font-body-bold);
  font-weight: bold;
  font-size: 13.5px;
}
html[lang="ru"] .tb-title {
  font-family: var(--font-body-bold);
  font-weight: bold;
  font-size: 15px;
}
html[lang="ru"] .sysinfo-label {
  font-family: var(--font-body-bold);
  font-weight: bold;
  font-size: 14px;
}
html[lang="ru"] .trash-label {
  font-family: var(--font-body-bold);
  font-weight: bold;
  font-size: 11px;
}

.menu-drop {
  position: absolute;
  top: calc(var(--menubar-h) - var(--border));
  left: 0;
  min-width: 210px;
  list-style: none;
  background: var(--white);
  border: var(--border) solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
  padding: 3px 0;
  z-index: 101;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--font-chicago);
  font-size: 15px;
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.menu-item:hover:not(:disabled) { background: var(--black); color: var(--white); }
.menu-item:disabled { color: #9a9a9a; cursor: default; pointer-events: none; }
.menu-item.checked::before { content: "✓ "; margin-left: -12px; }
.mkey { color: inherit; opacity: .75; }
.menu-sep { border-top: 1px dotted #9a9a9a; margin: 3px 0; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  height: 100%;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-chicago);
}
.lang-toggle:hover { background: var(--black); color: var(--white); }
.flag { width: 18px; height: 13px; shape-rendering: crispEdges; display: none; }
/* the flag shows the CURRENT language, like the System 7 keyboard menu */
html[lang="ru"] .flag-ru { display: block; }
html[lang="en"] .flag-en { display: block; }

.clock { padding: 0 6px 0 10px; font-size: 15px; min-width: 56px; text-align: right; }

/* ============ Desktop & windows ============ */

.desktop {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 140px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.window {
  background: var(--white);
  border: var(--border) solid var(--black);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
  width: 100%;
  position: relative;
  z-index: 10;          /* windows sit above desktop icons, like on a real Mac */
}


.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px;
  border-bottom: var(--border) solid var(--black);
  background: var(--white);
  -webkit-user-select: none; /* Safari < 18.4 ignores the unprefixed form */
  user-select: none;
  cursor: default;
}

.tb-stripes {
  flex: 1;
  height: 12px;
  background: repeating-linear-gradient(to bottom,
    var(--black) 0, var(--black) 1px,
    transparent 1px, transparent 3px);
  min-width: 8px;
}

.tb-title {
  font-size: 17px;
  font-weight: normal;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.closebox, .zoombox {
  width: 15px; height: 15px;
  border: 1.5px solid var(--black);
  background: var(--white);
  cursor: pointer;
  flex: none;
  padding: 0;
}
.closebox:active, .zoombox:active { background: var(--black); }
.zoombox { position: relative; }
.zoombox::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 7px; height: 7px;
  border: 1.5px solid var(--black);
}

/* window-shade collapse (close box / double-click on title bar) */
.window.shaded .window-body,
.window.shaded .window-status { display: none; }
.window.shaded .titlebar { border-bottom: 0; }

/* Finder status bar & list headers were Geneva 9 — also dodges missing
   Cyrillic glyphs in ChicagoFLF */
.window-status.status-split { display: flex; justify-content: space-between; gap: 12px; }

.window-status {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #555;
  border-bottom: 1px solid var(--black);
  padding: 3px 12px;
  background: var(--gray-light);
}

.window-body { padding: 24px 28px; }

/* ============ Hero / About This Engineer ============ */

.hero-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 14px;
}

.hero-photo {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  border: 2px solid var(--black);
  flex: none;
}

.hero-name { font-size: 32px; line-height: 1.2; }
/* Cyrillic name can't render in Chicago — bold body face in RU */
html[lang="ru"] .hero-name { font-family: var(--font-body-bold); font-weight: bold; font-size: 29px; }
.hero-sub { margin-top: 6px; font-size: 16px; }
.hero-loc { color: #555; font-size: 13.5px; margin-top: 3px; }

.sysinfo { margin-bottom: 18px; }
.sysinfo p { display: flex; gap: 8px; align-items: baseline; }
.sysinfo-label { font-size: 15px; }
.sysver { color: #6b6b6b; font-size: 12.5px; margin-top: 8px; }

/* skills (/cv): System 7 dialog group boxes, label sits on the border */
.membars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 22px;
  margin-top: 8px;
}
.skill-group {
  border: 1.5px solid var(--black);
  padding: 16px 14px 10px;
  position: relative;
  min-width: 0;
}
.skill-group:first-child, .skill-group.sg-wide { grid-column: 1 / -1; }

.sg-title {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--white);
  padding: 0 8px;
  font-family: var(--font-body);
  font-weight: normal;
  font-size: 12.5px;
  color: #333;
  white-space: nowrap;
}

.sg-list { list-style: none; }
.sg-list li {
  display: grid;
  grid-template-columns: 26px 104px 1fr 54px;
  gap: 9px;
  align-items: center;
  padding: 4px 0;
}
.sg-icon { width: 24px; height: 24px; image-rendering: pixelated; border-radius: 5px; }
.mem-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.mem-size { text-align: right; color: #444; font-size: 12.5px; }
.sg-list .bar { height: 12px; }

.bar {
  display: block;
  height: 16px;
  border: 1.5px solid var(--black);
  background: var(--white);
}
.fill {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--accent);
  background-image: repeating-linear-gradient(to right,
    transparent 0, transparent 3px, rgba(255,255,255,.25) 3px, rgba(255,255,255,.25) 4px);
}

/* ============ Read Me ============ */

.readme-body p + p { margin-top: 14px; }
.about-readme {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 16px;
}

/* quiet links (footer «← на главную» etc.) */
.now-link { color: inherit; text-decoration: none; cursor: pointer; }
.now-link:hover, .now-link:focus-visible { text-decoration: underline; }

/* ============ /now log page ============ */
.now-intro { line-height: 1.5; margin-bottom: 20px; }
.now-updated {
  font-family: "Monaco", "Courier New", monospace;
  font-size: 12.5px;
  color: #444;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid var(--black);
  background: var(--gray-light);
}
.now-log { list-style: none; }
/* month groups: heading is the /now#YYYY-MM anchor */
.now-log > li { padding: 14px 0; border-top: 1px solid var(--black); }
.now-log > li:first-child { border-top: 0; padding-top: 2px; }
.now-month {
  font-family: var(--font-chicago);
  font-size: 16px;
  margin-bottom: 8px;
}
html[lang="ru"] .now-month { font-family: var(--font-body-bold); font-weight: bold; font-size: 15px; }
.now-entry + .now-entry { margin-top: 12px; }
.now-date {
  display: block;
  font-family: "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #6a6a6a;
  margin-bottom: 6px;
}
.now-items { list-style: none; }
.now-items li {
  position: relative;
  padding: 3px 0 3px 18px;
  line-height: 1.5;
}
.now-items li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 10px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}
.now-entry.now-current .now-items { font-weight: 700; }
.menu-current { cursor: default; }

/* ============ Home widgets ============ */

.widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* a whole System 7 window as a link — undo the global link inversion */
a.widget { display: block; text-decoration: none; }
a.widget:hover { background: var(--white); color: inherit; }
a.widget:hover .tb-title { background: var(--black); color: var(--white); }
a.widget:focus-visible { outline: 2px dotted var(--black); outline-offset: 3px; }

.widget .window-body { padding: 16px 18px; }
.widget-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}
.widget-meta {
  display: block;
  margin-top: 10px;
  font-family: "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #6a6a6a;
}

/* static mini map in the Map widget: three tiles side by side + px dots */
.widget-map-preview {
  position: relative;
  display: flex;
  margin-top: 12px;
  border: 1px solid var(--black);
  overflow: hidden;
}
.widget-map-preview img {
  width: 33.3333%;
  height: auto;
  display: block;
  filter: grayscale(1);
}
.px-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
  outline: 1px solid rgba(0, 0, 0, .4);
}

/* ============ Projects ============ */

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

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  text-decoration: none;
  padding: 12px 8px;
  border: 1px solid transparent;
}
.p-text { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.project:hover { background: none; color: inherit; border: 1px dotted var(--black); }
.project:hover .p-name { background: var(--black); color: var(--white); }

.p-icon { width: 76px; height: 76px; shape-rendering: crispEdges; }
/* the Homelab card is not a link yet (no /lab page) — no click affordance */
.project-lab { cursor: default; }
.project-lab:hover { border-color: transparent; }
.project-lab:hover .p-name { background: none; color: inherit; }
.p-name { font-size: 17px; padding: 1px 6px; }
.p-desc { font-size: 13.5px; color: #333; }
.p-tech { font-size: 12.5px; color: #6b6b6b; }

/* ============ Career (/cv, Finder list view) ============ */

/* job-search indicator in the Career status bar: grey = not looking, green = looking */
.job-status { display: flex; align-items: center; gap: 6px; }
.job-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--black);
  background: #9a9a9a;
  flex: none;
}
.job-status.looking .job-dot { background: var(--green); }

.finder-list { width: 100%; border-collapse: collapse; }

.finder-list th {
  font-family: var(--font-body);
  text-align: left;
  font-weight: normal;
  font-size: 12.5px;
  border-bottom: 1px solid var(--black);
  padding: 5px 8px;
  color: #333;
}

.finder-list td {
  padding: 11px 8px;
  border-bottom: 1px dotted #bbb;
  vertical-align: top;
}
.finder-list tr:last-child td { border-bottom: 0; }
/* rows open the Get Info dialog; hover matches the Projects dotted frame */
.finder-list tbody tr { cursor: pointer; }
.finder-list tbody tr:hover,
.finder-list tbody tr:focus-visible { outline: 1.5px dotted var(--black); outline-offset: -2px; }

.c-name { display: flex; gap: 12px; align-items: flex-start; }
.c-logo { width: 28px; height: 28px; flex: none; margin-top: 2px; image-rendering: pixelated; border-radius: 6px; }
.c-name b { display: block; font-size: 15px; font-family: var(--font-body-bold); }
.c-name small { display: block; color: #555; font-size: 13px; line-height: 1.5; margin-top: 2px; }

.col-role { width: 24%; font-size: 13.5px; }
.col-when { width: 14%; font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============ Contact ============ */

.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted #bbb;
}
.contact-list li:last-child { border-bottom: 0; }
.ct-icon { width: 30px; height: 25px; flex: none; shape-rendering: crispEdges; }
.ct-img { width: 26px; height: 26px; flex: none; image-rendering: pixelated; margin: 0 2px; border-radius: 6px; }
.ct-label { font-size: 15px; min-width: 100px; }

.contact-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--black);
  color: #333;
}

/* ============ Get Info dialog ============ */

.info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .2);
}

.info-window {
  max-width: 600px;
  width: 100%;
  max-height: 84vh;
  overflow: auto;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
}
.info-window .zoombox { pointer-events: none; }

.info-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 14px;
}
.info-role { font-family: var(--font-body-bold); font-weight: bold; }
.info-when { color: #555; font-size: 13px; }

.info-list { list-style: none; }
.info-list li {
  position: relative;
  padding: 6px 0 6px 20px;
}
.info-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* ============ /map page ============ */

.map-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--black);
  background: var(--gray-light);
  font-size: 13px;
}
.map-filters label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* System 7 checkbox: plain square, ✕ when checked */
.map-filters input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1.5px solid var(--black);
  background: var(--white);
  cursor: pointer;
  flex: none;
}
.map-filters input[type="checkbox"]:checked {
  background-image:
    linear-gradient(45deg, transparent 42%, var(--black) 42%, var(--black) 58%, transparent 58%),
    linear-gradient(135deg, transparent 42%, var(--black) 42%, var(--black) 58%, transparent 58%);
}
.map-legend { display: flex; align-items: center; gap: 6px; }
/* System 7 popup-menu flavoured select */
.map-filters select {
  font: inherit;
  font-size: 13px;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--black);
  border-radius: 0;
  padding: 1px 6px;
  box-shadow: 1px 1px 0 var(--black);
  cursor: pointer;
}

.map-shell { height: 420px; border-bottom: 1px solid var(--black); }
#map { height: 100%; background: var(--gray-light); }

/* pixel markers instead of Leaflet's blue pins; poi = churches/castles */
.px-marker {
  border: 2px solid var(--black);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  background: var(--accent);
}
.px-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--black);
  background: var(--accent);
  flex: none;
}
/* per-trip colours: the six stripes of the AF logo + a System 7 label brown.
   Assigned by trip order in places.geojson (js/map.js cycles px-t0..px-t6). */
.px-t0 { background: #61bb46; }  /* Иран */
.px-t1 { background: #fdb827; }  /* Непал */
.px-t2 { background: #f5821f; }  /* Беларусь */
.px-t3 { background: #009ddc; }  /* Прионежье */
.px-t4 { background: #963d97; }  /* Калининградская область */
.px-t5 { background: #996633; }  /* Карелия */
.px-t6 { background: #e03a3e; }  /* Турция */
/* churches & castles stay white-filled; the trip shows in the border colour */
.px-marker.px-poi, .px-swatch.px-poi { background: var(--white); }
.px-poi.px-t0 { border-color: #61bb46; }
.px-poi.px-t1 { border-color: #fdb827; }
.px-poi.px-t2 { border-color: #f5821f; }
.px-poi.px-t3 { border-color: #009ddc; }
.px-poi.px-t4 { border-color: #963d97; }
.px-poi.px-t5 { border-color: #996633; }
.px-poi.px-t6 { border-color: #e03a3e; }

/* tiles are third-party (Carto light) — squeeze them toward the site's monochrome */
.leaflet-tile { filter: grayscale(1); }
.leaflet-container { font-family: var(--font-body); font-size: 13px; }
.leaflet-popup-content-wrapper {
  border-radius: 0;
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
  color: var(--black);
}
.leaflet-popup-tip { border: 1px solid var(--black); box-shadow: none; }
.leaflet-popup-content { margin: 10px 14px; line-height: 1.5; }
.pp-name { font-family: var(--font-body-bold); font-weight: bold; }
.pp-date { font-family: "Monaco", "Courier New", monospace; font-size: 11px; color: #6a6a6a; margin: 2px 0 4px; }
.pp-photo { max-width: 100%; border: 1.5px solid var(--black); margin-top: 6px; image-rendering: auto; }
/* de-round the zoom control: vendor CSS ships soft shadows and 4px corners */
.leaflet-bar,
.leaflet-touch .leaflet-bar {
  border-radius: 0;
  border: 2px solid var(--black);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
}
.leaflet-bar a { border-radius: 0 !important; border: 0; border-bottom: 1px solid var(--black); color: var(--black); }
.leaflet-bar a:last-child { border-bottom: 0; }

.place-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 14px;
}
.pager-btn {
  width: 26px;
  height: 22px;
  border: 1.5px solid var(--black);
  background: var(--white);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.pager-btn:hover:not(:disabled) { box-shadow: 1px 1px 0 var(--black); }
.pager-btn:active:not(:disabled) { background: var(--black); color: var(--white); box-shadow: none; }
.pager-btn:disabled { color: #9a9a9a; cursor: default; }
.pager-info {
  font-family: "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #444;
  min-width: 110px;
  text-align: center;
}

/* the place list under the map doubles as keyboard/mobile access */
.place-list td { cursor: pointer; }
.place-list .col-date { width: 15%; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.place-list .col-place { width: 28%; }
.place-list tr.active { outline: 1.5px dotted var(--black); outline-offset: -2px; background: var(--gray-light); }

/* ============ Footer & Trash ============ */

.desk-footer {
  text-align: center;
  color: #2e353a;
  font-size: 13px;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.footer-font { margin-top: 2px; }

.trash {
  position: fixed;
  right: 22px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 1;           /* under the windows — desktop icon, not a widget */
}
.trash:hover, .trash:focus-within, .trash.open { z-index: 60; } /* keep the bubble readable */
.trash svg { width: 34px; height: 42px; shape-rendering: crispEdges; }
.trash .chicago {
  font-size: 12px;
  color: var(--white);
  background: var(--black);
  padding: 0 4px;
}
.trash-bubble {
  position: absolute;
  bottom: 105%;
  right: 0;
  width: max-content;
  max-width: 220px;
  background: var(--white);
  border: var(--border) solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--black);
  text-align: left;
}

/* ============ Boot & shutdown screens ============ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: #9aa4ab;
  background-image: repeating-conic-gradient(#8d979f 0% 25%, #a9b2b8 0% 50%);
  background-size: 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .45s ease;
}
.boot.fading { opacity: 0; pointer-events: none; }

.boot-window {
  background: var(--white);
  border: var(--border) solid var(--black);
  box-shadow: 3px 3px 0 rgba(0,0,0,.55);
  padding: 34px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  font-size: 19px;
}
.happy-mac { width: 66px; height: 78px; shape-rendering: crispEdges; }

.shutdown {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  font-size: 21px;
}
.shutdown-hint { font-size: 12px; color: #9a9a9a; font-family: var(--font-body); }

/* ============ Responsive ============ */

@media (max-width: 640px) {
  /* the menu bar is real navigation now — compact, but always visible */
  .menu-btn { padding: 0 8px; font-size: 13px; }
  html[lang="ru"] .menu-btn[data-i18n] { font-size: 12px; }
  .menu-logo { padding: 0 8px 0 4px; }
  .lang-toggle { padding: 0 6px; }
  .desktop { padding-top: 24px; gap: 24px; }
  .window-body { padding: 14px; }
  .icon-grid { grid-template-columns: 1fr; }
  .widgets { grid-template-columns: 1fr; gap: 24px; }
  .map-shell { height: 320px; }
  .place-list .col-place { width: 34%; }
  .project { flex-direction: row; text-align: left; align-items: flex-start; gap: 14px; }
  .project .p-icon { width: 52px; height: 52px; }
  .p-text { align-items: flex-start; gap: 4px; }
  .finder-list .col-role { display: none; }
  .membars { grid-template-columns: 1fr; gap: 24px; }
  .sg-list li { grid-template-columns: 26px 1fr 54px; }
  .sg-list li .sg-icon { grid-row: 1; grid-column: 1; }
  .sg-list li .mem-name { grid-row: 1; grid-column: 2; }
  .sg-list li .mem-size { grid-row: 1; grid-column: 3; }
  .sg-list .bar { grid-row: 2; grid-column: 1 / -1; }
  .sysinfo p { display: block; }   /* label and value flow as one line of text */
  .trash { display: none; }
  .hero-head { gap: 14px; }
  .hero-name { font-size: 24px; }
  .hero-photo { width: 96px; height: 96px; }
}

@media (max-width: 400px) {
  .clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boot { display: none !important; }
}
