/* G3OSHA — optional WIN98 theme
   Activated by html[data-theme="win98"]. Base hub stays untouched. */

@font-face {
  font-family: "Pixelated MS Sans Serif";
  font-style: normal;
  font-weight: 400;
  src: url("/vendor/98.css/ms_sans_serif.woff2") format("woff2"),
       url("/vendor/98.css/ms_sans_serif.woff") format("woff");
}
@font-face {
  font-family: "Pixelated MS Sans Serif";
  font-style: normal;
  font-weight: 700;
  src: url("/vendor/98.css/ms_sans_serif_bold.woff2") format("woff2"),
       url("/vendor/98.css/ms_sans_serif_bold.woff") format("woff");
}

html[data-theme="win98"] {
  --w98-face: silver;
  --w98-ink: #222;
  --w98-font: "Pixelated MS Sans Serif", "MS Sans Serif", sans-serif;
  --w98-out: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  --w98-in: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  --w98-frame: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}

html[data-theme="win98"] body { padding-bottom: 30px; }

/* ══════ DESKTOP ICONS ══════ */
.desk-rail {
  position: fixed; left: 10px; top: 12px; z-index: 40;
  display: flex; flex-direction: column; gap: 12px; width: 72px;
}
.desk-icon {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; cursor: pointer; padding: 2px;
  color: #e8e8e8; text-shadow: 1px 1px 0 #000; text-decoration: none;
  font-family: var(--w98-font); font-size: 11px; line-height: 1.15; text-align: center;
  -webkit-font-smoothing: none;
}
.desk-icon:hover, .desk-icon:focus { outline: 1px dotted #fff; color: #fff; }
.desk-icon .ico {
  width: 32px; height: 32px; display: block; image-rendering: pixelated;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff;
}
.ico-folder {
  background: linear-gradient(#ffcc4d 0 10px, #e8b923 10px 12px, #ffd978 12px 100%);
  border: 1px solid #8a6a10; position: relative;
}
.ico-folder::before {
  content: ""; position: absolute; top: -4px; left: 2px; width: 12px; height: 4px;
  background: #e8b923; border: 1px solid #8a6a10; border-bottom: 0;
}
.ico-comp { background: #c0c0c0; border: 1px solid #000; position: relative; }
.ico-comp::before { content: ""; position: absolute; inset: 4px 4px 8px; background: #008080; border: 1px solid #000; }
.ico-comp::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 3px; background: #000080; }
.ico-note {
  background: #fffef0; border: 1px solid #000;
  background-image: repeating-linear-gradient(transparent, transparent 3px, #cde 3px, #cde 4px);
}
.ico-cal { background: #fff; border: 1px solid #000; position: relative; }
.ico-cal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: #a00; }
.ico-cal::after {
  content: ""; position: absolute; inset: 10px 4px 4px;
  background-image: repeating-linear-gradient(transparent, transparent 3px, #999 3px, #999 4px);
}
.ico-mail { background: #fff; border: 1px solid #000; position: relative; }
.ico-mail::after {
  content: ""; position: absolute; inset: 6px 3px;
  background: linear-gradient(135deg, transparent 45%, #333 46%, #333 50%, transparent 51%),
              linear-gradient(-135deg, transparent 45%, #333 46%, #333 50%, transparent 51%);
  border: 1px solid #333;
}
.ico-about { background: navy; border: 1px solid #fff; }
.ico-about::after {
  content: "i"; color: #fff; font-weight: 700; font-size: 18px;
  display: grid; place-items: center; height: 100%;
}
/* ══════ ABOUT AS DIALOG ══════ */
html[data-theme="win98"] #about-popup {
  background: var(--w98-face) !important;
  border: 0 !important;
  box-shadow: var(--w98-frame), 4px 6px 0 rgba(0,0,0,0.45) !important;
  padding: 26px 10px 10px !important;
  font-family: var(--w98-font) !important;
  -webkit-font-smoothing: none;
  color: var(--w98-ink);
}
html[data-theme="win98"] #about-popup::before {
  content: "About — G3OSHA.exe";
  position: absolute; top: 3px; left: 3px; right: 3px; height: 20px;
  background: linear-gradient(90deg, navy, #1084d0);
  color: #fff; font-weight: 700; font-size: 11px; letter-spacing: 0;
  display: flex; align-items: center; padding-left: 4px;
  opacity: 1;
}
html[data-theme="win98"] #about-close {
  top: 5px; right: 6px;
  width: 16px; height: 14px; padding: 0;
  background: var(--w98-face); box-shadow: var(--w98-out);
  color: #000; font-size: 9px; line-height: 1;
  font-family: var(--w98-font);
}
html[data-theme="win98"] #about-close:hover { color: #000; }
html[data-theme="win98"] #about-content,
html[data-theme="win98"] .about-name,
html[data-theme="win98"] .about-tagline,
html[data-theme="win98"] .about-bio,
html[data-theme="win98"] .about-status,
html[data-theme="win98"] .about-link-label,
html[data-theme="win98"] .about-mantra-ring,
html[data-theme="win98"] .about-protection,
html[data-theme="win98"] .about-ascii,
html[data-theme="win98"] .about-sep {
  color: var(--w98-ink) !important;
  opacity: 1 !important;
  letter-spacing: 0 !important;
}
html[data-theme="win98"] .about-bio { border-left-color: navy !important; }
html[data-theme="win98"] .about-link-item {
  background: #dfdfdf !important;
  border: 0 !important;
  box-shadow: var(--w98-out);
}
html[data-theme="win98"] .about-link-icon { color: navy !important; }
html[data-theme="win98"] .about-photo { border: 2px solid #000 !important; }

/* ══════ SECTION AS EXPLORER WINDOW ══════ */
html[data-theme="win98"] #section-view {
  inset: 0;
  align-items: center; justify-content: center;
  padding: 18px 12px 40px;
  background: transparent;
  z-index: 80;
}
html[data-theme="win98"] #section-view.hidden { display: none !important; }
html[data-theme="win98"] #section-view:not(.hidden) ~ #theme-switch { display: block; }

html[data-theme="win98"] #section-view > #section-topbar,
html[data-theme="win98"] #section-view > #section-content,
html[data-theme="win98"] #section-view > #section-footer {
  width: min(860px, calc(100vw - 20px));
  flex: none;
  font-family: var(--w98-font);
  -webkit-font-smoothing: none;
}

html[data-theme="win98"] #section-topbar {
  background: linear-gradient(90deg, navy, #1084d0) !important;
  border: 3px solid var(--w98-face) !important;
  border-top-color: #dfdfdf !important;
  border-bottom: 0 !important;
  padding: 4px 4px 4px 6px !important;
  margin-top: 0;
}
html[data-theme="win98"] #section-topbar::after { content: none !important; }
html[data-theme="win98"] #section-title-bar {
  color: #fff !important; font-weight: 700; font-size: 11px; letter-spacing: 0 !important;
  order: 1;
}
html[data-theme="win98"] #back-btn {
  order: 2; margin-left: auto;
  background: var(--w98-face) !important;
  border: 0 !important;
  box-shadow: var(--w98-out);
  color: #000 !important;
  font-family: var(--w98-font) !important;
  font-size: 11px; letter-spacing: 0 !important;
  padding: 2px 8px !important;
}
html[data-theme="win98"] #section-content {
  background: #fff !important;
  color: var(--w98-ink);
  box-shadow: var(--w98-in);
  border-left: 3px solid var(--w98-face) !important;
  border-right: 3px solid var(--w98-face) !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 10px !important;
  height: min(70vh, 640px);
  flex: none !important;
}
html[data-theme="win98"] #section-footer {
  background: var(--w98-face) !important;
  border: 3px solid var(--w98-face) !important;
  border-top: 0 !important;
  border-bottom-color: grey !important;
  color: var(--w98-ink) !important;
  font-size: 11px !important;
  padding: 3px 6px !important;
}

/* content inside explorer window */
html[data-theme="win98"] #section-content .project-card,
html[data-theme="win98"] #section-content .filter-tag,
html[data-theme="win98"] #section-content .tag {
  border-color: #888 !important;
  background: #efefef !important;
  color: var(--w98-ink) !important;
}
html[data-theme="win98"] #section-content .project-title,
html[data-theme="win98"] #section-content .project-desc,
html[data-theme="win98"] #section-content .project-year,
html[data-theme="win98"] #section-content .filter-label,
html[data-theme="win98"] #section-content .empty,
html[data-theme="win98"] #section-content .art-venue,
html[data-theme="win98"] #section-content .drops-hint,
html[data-theme="win98"] #section-content .drop-item,
html[data-theme="win98"] #section-content .cal-event-desc {
  color: var(--w98-ink) !important;
  opacity: 1 !important;
  letter-spacing: 0 !important;
}
html[data-theme="win98"] #section-content .project-title a { color: #000080 !important; }
html[data-theme="win98"] #section-content .project-card::before,
html[data-theme="win98"] #section-content .project-card::after { border-color: #888 !important; }
html[data-theme="win98"] #section-content .project-card:hover {
  border-color: navy !important; box-shadow: none !important;
}
html[data-theme="win98"] #section-content .filter-tag.active {
  background: navy !important; color: #fff !important; border-color: #000 !important;
}
html[data-theme="win98"] #section-content .project-media,
html[data-theme="win98"] #section-content .project-media-yt,
html[data-theme="win98"] #section-content .sketchfab-embed { border-color: #000 !important; }

/* drops as explorer icons */
html[data-theme="win98"] #section-content .drops-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
  gap: 12px 8px !important;
}
html[data-theme="win98"] #section-content .drop-item:hover {
  background: rgba(0,0,128,0.08) !important;
  border-color: transparent !important;
  outline: 1px dotted #000;
}
html[data-theme="win98"] #section-content .drop-item .shot {
  width: 48px !important; height: 48px !important;
  background-color: #fff !important;
  border: 0 !important;
  box-shadow: var(--w98-in);
}
html[data-theme="win98"] #section-content .drop-item.empty .shot {
  background-image: none !important;
  color: #666 !important; font-size: 10px !important;
}
html[data-theme="win98"] #section-content .drop-item .name { font-size: 11px !important; }

/* ══════ TASKBAR ══════ */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  height: 30px; background: var(--w98-face);
  box-shadow: inset 0 1px #fff; border-top: 2px solid #dfdfdf;
  display: flex; align-items: center; gap: 4px; padding: 2px 3px;
  font-family: var(--w98-font); font-size: 11px; color: var(--w98-ink);
  -webkit-font-smoothing: none; cursor: default;
}
.taskbar button {
  font-family: var(--w98-font); font-size: 11px; color: var(--w98-ink);
  background: var(--w98-face); border: 0; box-shadow: var(--w98-out);
  min-height: 22px; padding: 0 8px; cursor: pointer;
}
.start-btn { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.start-flag {
  width: 16px; height: 14px; flex-shrink: 0; border: 1px solid #000;
  background:
    linear-gradient(#b400ff 0 50%, #00f0ff 50% 100%) left / 50% 100% no-repeat,
    linear-gradient(#c8ff00 0 50%, #ff2bd6 50% 100%) right / 50% 100% no-repeat;
}
.task-buttons { flex: 1; display: flex; gap: 3px; min-width: 0; }
.task-buttons button {
  flex: 0 1 200px; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-active { box-shadow: var(--w98-in) !important; }
.tray {
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
  padding: 2px 8px; min-width: 52px; text-align: center;
}

/* ══════ START MENU ══════ */
.start-menu {
  position: fixed; left: 2px; bottom: 30px; z-index: 210; width: 200px;
  background: var(--w98-face); box-shadow: var(--w98-frame);
  display: flex; font-family: var(--w98-font); -webkit-font-smoothing: none;
}
.start-menu.hidden { display: none !important; }
.start-banner {
  writing-mode: vertical-rl; transform: rotate(180deg);
  background: linear-gradient(#000080, #b400ff);
  color: #fff; font-weight: 700; font-size: 16px; padding: 8px 4px;
}
.start-banner span { font-weight: 400; opacity: 0.85; }
.start-menu ul { list-style: none; margin: 0; padding: 4px 0; flex: 1; }
.start-menu a, .start-menu button {
  display: block; width: 100%; text-align: left; padding: 6px 12px;
  background: none; border: 0; box-shadow: none; cursor: pointer;
  color: var(--w98-ink); text-decoration: none;
  font-family: var(--w98-font); font-size: 11px;
}
.start-menu a:hover, .start-menu button:hover { background: navy; color: #fff; }

/* ══════ HUB TWEAKS UNDER THEME ══════ */
html[data-theme="win98"] #hub-mantra { bottom: calc(2vh + 28px); }
html[data-theme="win98"] #theme-switch {
  top: auto; bottom: 40px; left: 1.2rem;
  font-family: var(--w98-font); font-size: 11px; letter-spacing: 0;
  background: var(--w98-face); border: 0; box-shadow: var(--w98-out); color: var(--w98-ink);
}
html[data-theme="win98"] #theme-switch span { color: navy; }
html[data-theme="win98"] #theme-switch:hover { color: #000; box-shadow: var(--w98-out); }

@media (max-width: 768px) {
  .desk-rail {
    flex-direction: row; flex-wrap: wrap;
    width: auto; left: 8px; right: 8px; top: 8px; gap: 8px;
  }
  html[data-theme="win98"] #section-content { height: min(62vh, 520px); }
}
