/* ============================================================
   Ruiz & Davies — Retro desktop (Windows 3.11 / 1992)
   ============================================================ */

:root {
  --teal: #008080;
  --silver: #c0c0c0;
  --light: #dfdfdf;
  --shadow: #808080;
  --navy: #000080;
  --blue: #1084d0;
  --ink: #000;
  --field: #fff;

  --ui: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
  --mono: "VT323", "Courier New", monospace;
  --pixel: "Press Start 2P", "Courier New", monospace;

  --bevel-up: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px var(--shadow), inset 2px 2px var(--light);
  --bevel-down: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px var(--shadow), inset -2px -2px var(--light);
  --bevel-sunken: inset 1px 1px var(--shadow), inset -1px -1px #fff, inset 2px 2px #000;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--ink);
  background: var(--teal);
  overflow: hidden;
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
}
body.booting { cursor: progress; }

h1, h2 { font-size: 18px; margin: 0 0 .5rem; }
h2 { font-size: 16px; }
p { margin: 0 0 .75rem; line-height: 1.45; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--navy); }
.muted { color: #4a4a4a; }

/* ---------- Shared chrome ---------- */
.title-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px 0 6px;
  background: var(--shadow);
  color: #d8d8d8;
  user-select: none;
}
.title-bar-active {
  background: linear-gradient(90deg, var(--navy), var(--blue));
  color: #fff;
}
.title-bar-text {
  font-weight: bold;
  font-size: 12px;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-bar-controls { display: flex; gap: 2px; }
.tb-btn {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-family: var(--ui); font-size: 11px; font-weight: bold; line-height: 1;
  color: #000; background: var(--silver);
  border: 0; box-shadow: var(--bevel-up); cursor: pointer;
}
.tb-btn:active { box-shadow: var(--bevel-down); }

/* ---------- Buttons ---------- */
.btn95 {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--ui); font-size: 13px; color: #000;
  background: var(--silver); border: 0;
  padding: 7px 16px; min-width: 90px; justify-content: center;
  box-shadow: var(--bevel-up); cursor: pointer; text-decoration: none;
}
.btn95:active { box-shadow: var(--bevel-down); transform: translate(1px, 1px); }
.btn95:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn95-go { background: var(--silver); font-weight: bold; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }

/* ============================================================
   BOOT / LOADING
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, #007a7a 0 8px, #008080 8px 16px);
}
.boot.hide { animation: bootOut .45s steps(4) forwards; }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }

.boot-window {
  width: min(440px, 92vw);
  background: var(--silver);
  box-shadow: var(--bevel-up), 6px 6px 0 rgba(0,0,0,.35);
}
.boot-body { padding: 20px 22px 24px; text-align: center; }
.boot-logo {
  font-family: var(--pixel); font-size: 30px; color: var(--navy);
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--shadow);
  margin: 8px 0 16px; letter-spacing: 1px;
}
.boot-status {
  font-family: var(--mono); font-size: 20px; line-height: 1;
  color: #000; margin: 0 0 14px;
}
.boot-status::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.boot-thumbs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  min-height: 64px; margin-bottom: 16px;
}
.boot-thumb {
  width: 84px; opacity: 0; transform: translateY(6px) scale(.9);
  transition: opacity .18s steps(2), transform .18s steps(2);
}
.boot-thumb.show { opacity: 1; transform: none; }

.progress {
  height: 22px; background: var(--field);
  box-shadow: var(--bevel-sunken); padding: 3px;
}
.progress-fill {
  height: 100%; width: 0;
  background:
    repeating-linear-gradient(90deg, var(--navy) 0 12px, transparent 12px 15px),
    var(--navy);
  background-size: 15px 100%, 100% 100%;
  /* chunky segmented bar */
  background: var(--navy);
  box-shadow: inset 0 0 0 100px transparent;
  transition: width .15s steps(3);
  position: relative;
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0 13px, var(--silver) 13px 15px);
}
.boot-pct { font-family: var(--mono); font-size: 18px; margin: 8px 0 0; }

/* ============================================================
   DESKTOP / PROGRAM MANAGER
   ============================================================ */
.progman {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--silver);
  box-shadow: var(--bevel-up);
}
.progman-title { height: 24px; }
.progman-title .title-bar-text { font-size: 13px; }

.menubar {
  display: flex; align-items: center; gap: 2px;
  padding: 2px 4px; background: var(--silver);
  box-shadow: inset 0 -1px 0 var(--shadow), inset 0 -2px 0 #fff;
}
.menu-item {
  font-family: var(--ui); font-size: 13px; color: #000;
  background: none; border: 0; padding: 3px 9px; cursor: default;
}
.menu-item:hover { background: var(--navy); color: #fff; }
.menubar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.lang-btn {
  font-family: var(--ui); font-weight: bold; font-size: 12px; color: #000;
  text-decoration: none; background: var(--silver);
  box-shadow: var(--bevel-up); padding: 3px 10px;
}
.lang-btn:active { box-shadow: var(--bevel-down); }
.clock {
  font-family: var(--mono); font-size: 16px; color: #000;
  background: var(--field); box-shadow: var(--bevel-sunken);
  padding: 1px 8px; min-width: 58px; text-align: center;
}

.desktop-area {
  position: relative; flex: 1; overflow: hidden;
  margin: 4px; box-shadow: var(--bevel-sunken);
  background: var(--teal);
}

/* ---------- Desktop icons ---------- */
.icons {
  position: absolute; inset: 0; padding: 14px;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 6px; max-height: 100%;
}
.icon {
  width: 92px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; text-align: center; border: 1px dotted transparent;
}
.icon:focus { outline: 0; }
.icon.selected { border-color: #fff; background: rgba(0,0,128,.45); }
.icon-img {
  width: 56px; height: 50px;
  display: grid; place-items: center;
}
.icon-img .site-preview { width: 56px; }
.icon-label {
  font-size: 12px; color: #fff; line-height: 1.2;
  text-shadow: 1px 1px 0 #000;
  padding: 1px 3px;
}
.icon.selected .icon-label { background: var(--navy); }

/* ---------- Site preview (mini browser window) ---------- */
.site-preview {
  background: var(--silver); box-shadow: var(--bevel-up);
  overflow: hidden; --accent: var(--blue);
}
.sp-bar {
  height: 14px; display: flex; align-items: center; gap: 4px;
  padding: 0 3px; background: var(--accent);
}
.sp-btns { display: flex; gap: 2px; }
.sp-btns i { width: 4px; height: 4px; background: #fff; display: block; }
.sp-url {
  font-size: 7px; color: #fff; font-family: var(--ui);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-screen {
  aspect-ratio: 4 / 3; background: var(--field);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 4px; text-align: center;
}
.sp-logo {
  font-family: var(--pixel); color: var(--accent); line-height: 1;
  font-size: 14px;
}
.sp-name { font-size: 8px; font-weight: bold; color: #000; line-height: 1.1; }
.sp-cat { font-size: 7px; color: var(--shadow); line-height: 1.1; }

/* ============================================================
   WINDOWS
   ============================================================ */
.window {
  position: absolute; top: 40px; left: 40px;
  width: min(380px, 90vw); z-index: 10;
  background: var(--silver);
  box-shadow: var(--bevel-up), 5px 5px 0 rgba(0,0,0,.35);
}
.window[hidden] { display: none; }
.window .title-bar { cursor: move; touch-action: none; }
.window-body { padding: 16px 18px 18px; }
.window-body p:last-child { margin-bottom: 0; }

.window-project { width: min(340px, 90vw); }
.proj-preview { width: 200px; margin: 0 auto 14px; }
.window-project .proj-preview .sp-logo { font-size: 28px; }
.window-project .proj-preview .sp-name { font-size: 13px; }
.window-project .proj-preview .sp-cat { font-size: 10px; }
.window-project .proj-preview .sp-url { font-size: 11px; }
.window-project .proj-preview .sp-bar { height: 22px; }
.window-project .proj-preview .sp-btns i { width: 6px; height: 6px; }

.eyebrow {
  font-family: var(--mono); font-size: 17px; color: var(--navy);
  letter-spacing: 1px; margin: 0 0 6px; text-align: center;
}
.readme-title { font-size: 17px; line-height: 1.25; text-align: center; }
.window-readme { width: min(420px, 92vw); }
.window-readme .window-body { text-align: center; }
.window-readme .btn-row { justify-content: center; }
.hint { font-family: var(--mono); font-size: 15px; color: var(--shadow); text-align: center; margin: 8px 0 0; }

.project-cat {
  font-family: var(--mono); font-size: 15px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 14px; }
.tags li {
  font-size: 11px; font-weight: bold; color: #000;
  background: var(--silver); box-shadow: var(--bevel-up);
  padding: 2px 7px;
}

.svc-list { display: grid; gap: 12px; margin-top: 12px; }
.svc-list li { display: flex; gap: 8px; }
.svc-num { font-family: var(--pixel); font-size: 11px; color: var(--navy); padding-top: 2px; }
.svc-list strong { font-size: 14px; }
.svc-list p { margin: 2px 0 0; }

.founders { display: grid; gap: 10px; margin-top: 12px; }
.founder { display: flex; align-items: center; gap: 10px; }
.founder-av {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--pixel); font-size: 14px; color: #fff;
  background: var(--navy); box-shadow: var(--bevel-up);
}
.founder-av img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
}
.founder strong { display: block; font-size: 14px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .icons { flex-direction: row; align-content: flex-start; gap: 2px; }
  .icon { width: 80px; }
  .window { width: 94vw; }
  .window:not(.dragged) { left: 50%; transform: translateX(-50%); }
  .window.dragged { transform: none; }
  .menu-item { padding: 3px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .boot-thumb, .progress-fill { transition: none !important; animation: none !important; }
}
