/* Amiga Workbench–inspired layout — decorative “gadgets”, no real window manager */

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

:root {
  --wb-blue: #0050a0;
  --wb-blue-dark: #003870;
  --wb-screen-bar: #a8a8a8;
  --wb-screen-bar-top: #d0d0d0;
  --wb-screen-bar-bottom: #707070;
  --wb-title-active: #e07000;
  --wb-title-active-mid: #f09020;
  --wb-title-inactive: #808080;
  --wb-window-bg: #c0c0c0;
  --wb-panel: #ffffff;
  --wb-border-dark: #000000;
  --wb-border-light: #ffffff;
  --wb-border-mid: #808080;
  --wb-text: #000000;
  --wb-muted: #303030;
  /* Topaz is an 8×8 cell; 16px ≈ 2× native for crisp grid alignment */
  --font-topaz: "Topaz", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-topaz);
  font-size: 16px;
  line-height: 24px;
  font-weight: normal;
  font-synthesis: none;
  color: var(--wb-text);
  background: var(--wb-blue);
  background-image: linear-gradient(180deg, var(--wb-blue) 0%, var(--wb-blue-dark) 100%);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: optimizeSpeed;
}

strong {
  font-weight: normal;
  color: var(--wb-blue-dark);
}

/* Top “screen” menu bar */
.screen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 4px 8px;
  background: linear-gradient(
    180deg,
    var(--wb-screen-bar-top) 0%,
    var(--wb-screen-bar) 35%,
    var(--wb-screen-bar-bottom) 100%
  );
  border-bottom: 1px solid var(--wb-border-dark);
  box-shadow: inset 0 1px 0 var(--wb-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.screen-bar__menus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.screen-bar__item {
  color: var(--wb-text);
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid transparent;
  font-size: 16px;
  line-height: 16px;
}

.screen-bar__item:hover,
.screen-bar__item:focus-visible {
  background: var(--wb-panel);
  border-color: var(--wb-border-mid);
  outline: none;
}

.screen-bar__item--mobile-only {
  display: none;
}

@media (max-width: 959px) {
  .screen-bar__item--mobile-only {
    display: block;
  }
}

.screen-bar__clock {
  font-size: 16px;
  line-height: 16px;
  color: var(--wb-muted);
  padding-right: 4px;
  font-variant-numeric: tabular-nums;
}

/* Desktop area — main column + optional side gutters (decoration) */
.desktop-page {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.desktop-page__gutter--start,
.desktop-page__gutter--end {
  display: none;
}

.desktop {
  flex: 1;
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Side gutters + mobile System strip — shared icon tiles */
.desktop-page__trash-wrap,
.desktop-page__prefs-wrap,
.desktop-page__icon-wrap,
.desktop-page__secret-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.desktop-page__prefs-wrap,
.desktop-page__icon-wrap,
.desktop-page__secret-wrap {
  cursor: pointer;
}

.desktop-page__prefs-wrap:focus,
.desktop-page__secret-wrap:focus {
  outline: none;
}

.desktop-page__prefs-wrap:focus-visible,
.desktop-page__secret-wrap:focus-visible {
  outline: 2px solid var(--wb-title-active);
  outline-offset: 4px;
}

.desktop-page__icon,
.desktop-page__trash-icon,
.desktop-page__prefs-icon,
.desktop-page__secret-icon {
  display: block;
  width: 100%;
  height: auto;
  max-width: 88px;
}

.desktop-page__icon,
.desktop-page__prefs-icon,
.desktop-page__secret-icon {
  pointer-events: none;
}

.desktop-page__label,
.desktop-page__trash-label,
.desktop-page__prefs-label,
.desktop-page__secret-label {
  margin-top: 8px;
  font-size: 16px;
  line-height: 16px;
  color: var(--wb-text);
  text-shadow: 1px 1px 0 var(--wb-border-light);
}

.system-strip .desktop-page__label,
.system-strip .desktop-page__trash-label,
.system-strip .desktop-page__prefs-label,
.system-strip .desktop-page__secret-label {
  text-shadow: none;
}

/* Mobile-only: System window below Contact */
.system-strip__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
  justify-items: center;
  align-items: start;
}

.system-strip__cell {
  margin: 0;
  width: 100%;
  max-width: 140px;
  justify-self: center;
}

@media (min-width: 960px) {
  .system-strip {
    display: none !important;
  }

  .desktop-page {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
  }

  .desktop-page__gutter--start,
  .desktop-page__gutter--end {
    display: block;
    flex: 1 1 0;
    min-width: 0;
  }

  .desktop-page__gutter--start {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-right: 16px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
  }

  .desktop-page__gutter--end {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .desktop {
    flex: 0 1 720px;
    margin: 0;
  }

  .desktop-page__side-stack,
  .desktop-page__end-stack {
    position: sticky;
    top: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: 120px;
  }
}

/* Window chrome */
.wb-window {
  background: var(--wb-window-bg);
  border: 1px solid var(--wb-border-dark);
  box-shadow:
    1px 1px 0 var(--wb-border-light),
    inset -1px -1px 0 var(--wb-border-mid);
}

.wb-window__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 4px;
  background: linear-gradient(
    180deg,
    var(--wb-title-active-mid) 0%,
    var(--wb-title-active) 45%,
    #b05000 100%
  );
  border-bottom: 1px solid var(--wb-border-dark);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.wb-window__titlebar--inactive {
  background: linear-gradient(180deg, #a0a0a0 0%, var(--wb-title-inactive) 100%);
  text-shadow: none;
  color: #e8e8e8;
}

.wb-window__gadget {
  flex-shrink: 0;
  width: 14px;
  height: 10px;
  border: 1px solid var(--wb-border-dark);
  background: linear-gradient(180deg, #e0e0e0 0%, #909090 100%);
  box-shadow: inset 1px 1px 0 var(--wb-border-light);
}

.wb-window__gadget--close {
  background: linear-gradient(180deg, #ff8080 0%, #c04040 100%);
}

.wb-window__gadget--depth {
  margin-left: auto;
  width: 18px;
  height: 10px;
}

.wb-window__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  line-height: 16px;
  font-weight: normal;
  letter-spacing: 0;
  text-align: center;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-window__body {
  background: var(--wb-panel);
  margin: 4px;
  padding: 12px 14px;
  border: 1px solid var(--wb-border-mid);
  box-shadow: inset 1px 1px 0 var(--wb-border-dark);
}

.wb-window--hero .wb-window__body {
  padding: 16px 18px;
}

.lead {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.lead--tight {
  margin-top: 16px;
}

.hero-portrait {
  display: block;
  max-width: min(100%, 280px);
  width: 100%;
  height: auto;
  margin: 20px auto 0;
  border: 1px solid var(--wb-border-mid);
  box-shadow: inset 1px 1px 0 var(--wb-border-light);
  background: #e8e8e8;
}

.muted {
  color: var(--wb-muted);
  margin-top: 0;
  font-size: 16px;
  line-height: 24px;
}

/* Drawer-style list */
.drawer-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.drawer-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px dotted var(--wb-border-mid);
}

.drawer-list li:last-child {
  border-bottom: none;
}

.icon-disk {
  position: absolute;
  left: 0;
  top: 10px;
  width: 18px;
  height: 14px;
  background: linear-gradient(180deg, #e8e8e8 0%, #b0b0b0 100%);
  border: 1px solid var(--wb-border-dark);
  box-shadow: inset 1px 1px 0 var(--wb-border-light);
}

.icon-disk::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 3px;
  height: 4px;
  background: #4080c0;
  border: 1px solid #204060;
}

/* Guru Meditation style WIP banner (Trusted_by, Projects) */
#clients .guru-banner,
#work .guru-banner {
  --guru-red: #c02020;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 14px 12px 16px;
  background: #0a0a0a;
  color: var(--guru-red);
  border: 3px solid var(--guru-red);
  box-shadow:
    inset 0 0 0 1px #501010,
    1px 1px 0 var(--wb-border-mid);
}

#clients .guru-banner__head,
#work .guru-banner__head {
  margin: 0 0 12px;
  padding: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: normal;
  text-align: center;
  color: inherit;
}

#clients .guru-banner__guru,
#work .guru-banner__guru {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: normal;
  text-align: center;
  color: inherit;
  letter-spacing: 0.03em;
}

/* Clients — logo grid */
.customer-logos {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.customer-logos__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.customer-logos__frame {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: #e8e8e8;
  border: 1px solid var(--wb-border-mid);
  box-shadow: inset 1px 1px 0 var(--wb-border-light);
}

.customer-logos__frame img {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.customer-logos__name {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--wb-muted);
  max-width: 100%;
  word-break: break-word;
}

@media (min-width: 520px) {
  .customer-logos {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Projects */
.project-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.project-card {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--wb-border-mid);
  background: #f4f4f4;
  box-shadow: 1px 1px 0 var(--wb-border-light);
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 16px;
  font-weight: normal;
}

.project-card p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--wb-muted);
}

/* Contact button — raised bevel */
.contact-line {
  margin: 16px 0 8px;
}

.wb-button {
  display: inline-block;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 16px;
  font-weight: normal;
  color: var(--wb-text);
  text-decoration: none;
  background: linear-gradient(180deg, #f0f0f0 0%, #c0c0c0 100%);
  border: 2px solid;
  border-color: var(--wb-border-light) var(--wb-border-dark) var(--wb-border-dark) var(--wb-border-light);
  box-shadow: 1px 1px 0 var(--wb-border-mid);
}

.wb-button:hover,
.wb-button:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
  outline: 2px solid var(--wb-title-active);
  outline-offset: 2px;
}

.wb-button:active {
  border-color: var(--wb-border-dark) var(--wb-border-light) var(--wb-border-light) var(--wb-border-dark);
  padding: 9px 15px 7px 17px;
}

/* Site footer — Workbench status bar + legal row (scrolls with page) */
.site-footer {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

/* Status bar */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 16px;
  font-family: var(--font-topaz);
  background: linear-gradient(180deg, #c0c0c0 0%, #909090 100%);
  border-top: 1px solid var(--wb-border-dark);
  color: #202020;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  width: 100%;
  margin: 0;
  padding: 8px 12px 12px;
  box-sizing: border-box;
  font-family: var(--font-topaz);
  font-size: 16px;
  line-height: 18px;
  color: #101010;
  background: linear-gradient(180deg, #888888 0%, #707070 100%);
  border-top: 1px solid #505050;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.site-footer__legal a {
  color: #003870;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: #001830;
  outline: 2px solid var(--wb-title-active);
  outline-offset: 2px;
}

.site-footer__sep {
  color: #404040;
  user-select: none;
}

@media (min-width: 768px) {
  .desktop {
    max-width: 720px;
    padding: 24px 20px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Legal subpages — readable body text */
.legal-page {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--wb-blue);
  background-image: linear-gradient(180deg, var(--wb-blue) 0%, var(--wb-blue-dark) 100%);
  color: var(--wb-text);
}

.legal-page__bar {
  padding: 12px 16px;
  background: linear-gradient(
    180deg,
    var(--wb-screen-bar-top) 0%,
    var(--wb-screen-bar) 35%,
    var(--wb-screen-bar-bottom) 100%
  );
  border-bottom: 1px solid var(--wb-border-dark);
}

.legal-page__bar a {
  color: var(--wb-text);
  font-family: var(--font-topaz);
  font-size: 16px;
  line-height: 16px;
}

.legal-page__bar a:focus-visible {
  outline: 2px solid var(--wb-title-active);
  outline-offset: 2px;
}

.legal-doc {
  flex: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 28px 20px 48px;
  width: 100%;
  box-sizing: border-box;
  background: var(--wb-panel);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  border-left: 1px solid var(--wb-border-mid);
  border-right: 1px solid var(--wb-border-mid);
  box-shadow: 0 0 0 1px var(--wb-border-dark);
}

.legal-doc h1 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.25;
}

.legal-doc h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.legal-doc p,
.legal-doc li {
  margin: 0 0 0.75rem;
}

.legal-doc ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc hr {
  border: 0;
  border-top: 1px solid var(--wb-border-mid);
  margin: 1.35rem 0;
}

.legal-doc .legal-note {
  padding: 12px 14px;
  margin: 1.25rem 0;
  background: #fff8e8;
  border: 1px solid #c9a227;
  font-size: 14px;
}

/* Modal requester — Say icon (click) */
/* [hidden] must win: author .display:flex otherwise keeps backdrop visible */
.wb-dialog-backdrop[hidden] {
  display: none !important;
}

.wb-dialog-backdrop:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wb-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 32, 80, 0.42);
}

#prefs-dialog-backdrop {
  z-index: 210;
}

#secret-dialog-backdrop {
  z-index: 220;
}

.wb-dialog.wb-window {
  width: 500px;
  height: auto;
  max-width: min(500px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  margin: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.wb-dialog .wb-window__titlebar {
  flex-shrink: 0;
}

.wb-dialog__close {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  margin: 0;
  padding: 0 8px;
  min-width: 28px;
  min-height: 22px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: linear-gradient(180deg, #ff8080 0%, #c04040 100%);
  border: 1px solid var(--wb-border-dark);
  box-shadow: inset 1px 1px 0 var(--wb-border-light);
}

.wb-dialog__close-x {
  font-size: 18px;
  line-height: 16px;
  font-weight: normal;
  margin-top: -2px;
}

.wb-dialog__close:hover,
.wb-dialog__close:focus-visible {
  background: linear-gradient(180deg, #ffa0a0 0%, #d05050 100%);
}

.wb-dialog__close:focus-visible {
  outline: 2px solid var(--wb-border-light);
  outline-offset: 2px;
}

.wb-dialog__close:active {
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.wb-dialog__body.wb-window__body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px;
  padding-bottom: 36px;
}

.wb-dialog__label {
  flex-shrink: 0;
  margin: 0;
  font-size: 16px;
  line-height: 16px;
}

.wb-dialog__input {
  width: 100%;
  flex: 0 0 auto;
  min-height: 32px;
  align-self: stretch;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  line-height: 20px;
  padding: 6px 8px;
  color: var(--wb-text);
  background: var(--wb-panel);
  border: 1px solid var(--wb-border-mid);
  box-shadow: inset 1px 1px 0 var(--wb-border-dark);
}

.wb-dialog__input:focus {
  outline: none;
  border-color: var(--wb-blue-dark);
  box-shadow:
    inset 1px 1px 0 var(--wb-border-dark),
    0 0 0 1px var(--wb-title-active);
}

.wb-dialog__body.wb-dialog__body--prefs {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(58vh, 400px);
  overflow-y: auto;
  padding-bottom: 16px;
  margin: 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wb-dialog__prefs-list {
  margin: 0;
  padding-left: 22px;
  font-size: 16px;
  line-height: 22px;
  color: var(--wb-text);
}

.wb-dialog__prefs-list li {
  margin-bottom: 2px;
}

.wb-dialog__prefs-list li:last-child {
  margin-bottom: 0;
  color: var(--wb-muted);
}

.wb-dialog--secret.wb-window {
  width: auto;
  min-width: 0;
  max-width: min(92vw, 1000px);
}

.wb-dialog__body.wb-dialog__body--secret {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(82vh, 860px);
  overflow: auto;
  margin: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

.wb-dialog__secret-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(78vh, 820px);
  object-fit: contain;
}
