/* ==========================================================================
   Desktop theme — retro-OS windows, menu bar and dock (Poolsuite-inspired),
   dark edition. Sits on top of the Webflow stylesheet; structure is built by
   assets/js/desktop.js and all motion is driven by GSAP.
   ========================================================================== */

:root {
  --ps-text: #f9f0e9;          /* cream */
  --ps-muted: #b4aabb;
  --ps-win: #1c1820;           /* window chrome */
  --ps-win-2: #27212d;         /* raised / hover */
  --ps-panel: #0e0b11;         /* inset content panel */
  --ps-line: #000;
  --ps-hi: rgba(255, 255, 255, .13);   /* bevel highlight */
  --ps-ring: rgba(255, 255, 255, .07); /* separates black borders from the dark desk */
  --ps-pink: #f6d6d5;
  --ps-cyan: #a6e3e9;
  --ps-yellow: #faf4c6;

  --ps-pixel: 'Silkscreen', ui-monospace, monospace;
  --ps-mono: 'VT323', ui-monospace, monospace;
  --ps-display: Eightiescomeback, Arial Narrow, sans-serif;
  --ps-body: Geistvariablevf, system-ui, sans-serif;

  --ps-menubar-h: 26px;
  --ps-dock-h: 56px;
  --ps-gap: 28px;

  --right-sidebar: 0px;        /* the Webflow side nav is replaced by menu bar + dock */
}

/* Hidden until desktop.js has assembled the windows (3s fallback in <head>). */
html.ps-loading .body-container { opacity: 0; }

::selection { background: var(--ps-pink); color: #000; }

/* ---------- Desk ---------------------------------------------------------- */
/* .body keeps Webflow's static noise GIF background. */
.body { color: var(--ps-text); }

/* The noise GIF flickers; with reduced motion, show a single still frame instead. */
@media (prefers-reduced-motion: reduce) {
  .body { background-image: linear-gradient(#0006, #0006), url("../images/noise-still.png"); }
  .project-title:hover, .backlink:hover { background-image: url("../images/noise-still.png"); }
}

/* Visible only to screen readers */
.ps-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.body-container {
  max-width: none;
  margin: 0;
  padding: calc(var(--ps-menubar-h) + var(--ps-gap)) var(--ps-gap) calc(var(--ps-dock-h) + 48px);
  background: transparent;
  border: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

html.ps-js .navbar-right { display: none; }

/* Webflow pins grid children to fixed areas by id; let our layouts place them. */
.ps-window [id^="w-node-"] { grid-area: auto !important; }

/* ---------- Menu bar ------------------------------------------------------ */
.ps-menubar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.ps-menubar__group { display: flex; pointer-events: auto; }

.ps-menubar__logo {
  display: grid;
  place-items: center;
  width: var(--ps-menubar-h);
  height: var(--ps-menubar-h);
  background: #000;
}
.ps-menubar__logo img { width: 15px; height: 15px; display: block; }

.ps-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--ps-menubar-h) - 2px);
  padding: 0 10px;
  background: var(--ps-win);
  color: var(--ps-text);
  border: 1px solid var(--ps-line);
  border-top: 0;
  box-shadow: inset 1px 0 0 var(--ps-hi), 0 0 0 1px var(--ps-ring);
  font: 10px/1 var(--ps-pixel);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.ps-menubar__group--left .ps-tab { border-left: 0; border-bottom-right-radius: 4px; }
.ps-menubar__group--right .ps-tab { border-right: 0; }
.ps-menubar__group--right .ps-tab:last-child { border-bottom-right-radius: 0; }
.ps-menubar__group--right .ps-tab:first-child { border-bottom-left-radius: 4px; }
a.ps-tab:hover { background: var(--ps-win-2); }
.ps-clock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ps-pink); box-shadow: 0 0 0 1px #000; }

/* ---------- Dock ---------------------------------------------------------- */
.ps-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  background: var(--ps-win);
  border: 1px solid var(--ps-line);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 0 1px var(--ps-ring), 0 -20px 40px -20px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.ps-dock__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 66px;
  height: var(--ps-dock-h);
  color: var(--ps-text);
  text-decoration: none;
  font: 8px/1 var(--ps-pixel);
  text-transform: uppercase;
  border-right: 1px solid var(--ps-line);
  /* Poolsuite-style bevel: highlight top-left, darker lower half */
  box-shadow: inset 1px 1px 0 var(--ps-hi), inset 0 -12px 0 rgba(0, 0, 0, .22);
}
.ps-dock__btn:last-child { border-right: 0; }
.ps-dock__btn:hover { background: var(--ps-win-2); }
.ps-dock__btn:active { box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .5), inset 0 12px 0 rgba(0, 0, 0, .18); }
.ps-dock__btn[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--ps-pink);
}
.ps-dock__icon { width: 24px; height: 24px; display: block; shape-rendering: crispEdges; }
/* Keyboard focus: one clear cyan ring on everything interactive (menu bar, dock, windows) */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--ps-cyan); outline-offset: 2px; }

/* ---------- Windows ------------------------------------------------------- */
.ps-window {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  background: var(--ps-win);
  color: var(--ps-text);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  box-shadow: inset 1px 1px 0 var(--ps-hi), 0 0 0 1px var(--ps-ring), 0 50px 80px -50px rgba(0, 0, 0, .95);
}
.ps-window.is-dragging {
  box-shadow: inset 1px 1px 0 var(--ps-hi), 0 0 0 1px var(--ps-ring), 0 70px 90px -40px rgba(0, 0, 0, 1);
}

.ps-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 18px;
  margin-bottom: 6px;
  user-select: none;
}
.ps-window.is-draggable .ps-titlebar,
.ps-window.is-draggable .ps-panel { cursor: grab; }
.ps-window.is-dragging,
.ps-window.is-dragging * { cursor: grabbing !important; }

.ps-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  padding: 0;
  background: var(--ps-panel);
  border: 1px solid var(--ps-line);
  border-radius: 2px;
  box-shadow: inset 1px 1px 0 var(--ps-hi);
  color: var(--ps-text);
  cursor: pointer;
}
.ps-close svg { width: 8px; height: 8px; display: block; shape-rendering: crispEdges; }
/* The box stays 16px, but the tappable area is 26px (24px minimum for touch) */
.ps-close { position: relative; z-index: 2; }   /* above the title rule and panel it overlaps */
.ps-close::after { content: ''; position: absolute; inset: -6px; }
.ps-close:hover { background: var(--ps-pink); color: #000; }

/* Thin rules between close box and title, like a classic title bar */
.ps-titlebar__rule {
  flex: 1;
  height: 8px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .12) 0 1px, transparent 1px 3px);
}
.ps-title {
  margin: 0;
  max-width: 70%;
  padding-right: 4px;          /* Eighties Comeback glyphs overhang their advance width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 18px/14px var(--ps-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ps-text);
}

.ps-toolbar { display: flex; gap: 6px; margin-bottom: 6px; }

.ps-panel {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--ps-panel);
  border: 1px solid var(--ps-line);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  overflow: hidden;
}

.ps-status {
  padding: 5px 3px 0;
  font: 17px/1 var(--ps-mono);
  color: var(--ps-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pills / buttons (the cyan "Get the newsletter" style) */
.ps-pill,
.hero-opp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  margin: 0;
  padding: 0 8px;
  background: var(--ps-cyan);
  color: #000;
  border: 1px solid var(--ps-line);
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .6), inset 0 -5px 0 rgba(0, 0, 0, .08);
  font: 10px/1 var(--ps-pixel);
  text-transform: uppercase;
  text-decoration: none;
}
.ps-pill:hover, .hero-opp:hover { background: var(--ps-pink); color: #000; }

/* ---------- Home: desktop grid ------------------------------------------- */
.ps-desktop {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ps-gap);
  max-width: 1440px;
  margin: 0 auto;
}
.ps-win--about { grid-column: span 8; }
.ps-win--exp { grid-column: span 4; }
.ps-win--l { grid-column: span 7; }
.ps-win--m { grid-column: span 5; }
.ps-win--s { grid-column: span 4; }
.ps-win--h { grid-column: span 6; }

/* Card images for the Accenture / Dow projects (1x / 2x, AVIF with WebP fallback) */
.work-image.ps-card-foresight,
.work-image.ps-card-ads,
.work-image.ps-card-places,
.work-image.ps-card-dow { background-size: cover; background-position: 50% 0; box-shadow: none; }
.work-image.ps-card-foresight {
  background-image: url("../images/cards/accenture-foresight-800.webp");
  background-image: image-set(url("../images/cards/accenture-foresight-800.avif") type("image/avif") 1x, url("../images/cards/accenture-foresight-800.webp") type("image/webp") 1x, url("../images/cards/accenture-foresight-1400.avif") type("image/avif") 2x, url("../images/cards/accenture-foresight-1400.webp") type("image/webp") 2x);
}
.work-image.ps-card-ads {
  background-image: url("../images/cards/accenture-design-system-800.webp");
  background-image: image-set(url("../images/cards/accenture-design-system-800.avif") type("image/avif") 1x, url("../images/cards/accenture-design-system-800.webp") type("image/webp") 1x, url("../images/cards/accenture-design-system-1400.avif") type("image/avif") 2x, url("../images/cards/accenture-design-system-1400.webp") type("image/webp") 2x);
}
.work-image.ps-card-places {
  background-image: url("../images/cards/accenture-places-800.webp");
  background-image: image-set(url("../images/cards/accenture-places-800.avif") type("image/avif") 1x, url("../images/cards/accenture-places-800.webp") type("image/webp") 1x, url("../images/cards/accenture-places-1400.avif") type("image/avif") 2x, url("../images/cards/accenture-places-1400.webp") type("image/webp") 2x);
}
.work-image.ps-card-dow {
  background-image: url("../images/cards/dow-800.webp");
  background-image: image-set(url("../images/cards/dow-800.avif") type("image/avif") 1x, url("../images/cards/dow-800.webp") type("image/webp") 1x, url("../images/cards/dow-1400.avif") type("image/avif") 2x, url("../images/cards/dow-1400.webp") type("image/webp") 2x);
}

/* About */
.ps-win--about .ps-panel { display: flex; gap: 24px; align-items: flex-start; padding: 24px; }
.ps-win--about .hero-img-1 {
  flex: none;
  width: 120px;
  max-width: 120px;
  border: 1px solid var(--ps-line);
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--ps-ring);
}
.ps-win--about .hero-intro-section { max-width: 760px; }
.ps-win--about .home-hero-subhead {
  margin: 0 0 18px;
  font: 300 19px/1.5 var(--ps-body);
  color: var(--ps-text);
}
.ps-win--about .hero-intro-link {
  color: var(--ps-pink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ps-win--about .hero-intro-link:hover { color: #000; background: var(--ps-pink); text-decoration: none; }
.ps-win--about .flex-block { display: flex; }

/* Experience */
.ps-win--exp .ps-panel { padding: 6px 16px; }
.ps-win--exp .workexp-section { width: 100%; }
.ps-win--exp .work-experience-grid { display: block; color: var(--ps-text); }
.ps-win--exp .work-position-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name time" "role role";
  column-gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .14);
}
.ps-win--exp .work-position-wrap:last-child { border-bottom: 0; }
.ps-win--exp .experience-name { grid-area: name; font: 400 22px/1.1 var(--ps-display); color: var(--ps-text); }
.ps-win--exp .experience-role { grid-area: role; padding: 2px 0 0; font: 300 15px/1.3 var(--ps-body); color: var(--ps-muted); opacity: 1; }
.ps-win--exp .experience-time { grid-area: time; font: 17px/1.3 var(--ps-mono); color: var(--ps-yellow); opacity: 1; white-space: nowrap; }

/* Project windows */
.ps-win--project .ps-panel { display: flex; flex-direction: column; }
.ps-win--project .work-image {
  display: block;
  flex: 1;
  height: auto;
  min-height: 260px;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--ps-line);
  opacity: 1;
  will-change: transform;
}
.ps-win--l .work-image { min-height: 360px; }
.ps-win--project .work-image:hover,
.ps-win--project .work-image:active { opacity: 1; }
.ps-win--project .ps-thumb { overflow: hidden; flex: 1; display: flex; }
.ps-win--project .work-desc-section {
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px 14px;
  text-align: left;
}
.ps-win--project .project-title {
  align-self: flex-start;
  padding: 0;
  font: 400 24px/1.05 var(--ps-display);
  color: var(--ps-text);
  text-align: left;
  text-decoration: none;
}
.ps-win--project .ps-card-heading { margin: 0; font: inherit; line-height: 1; align-self: flex-start; }
.ps-win--project .project-title:hover { background: none; color: var(--ps-pink); opacity: 1; padding: 0; }
.ps-win--project .work-description {
  align-self: flex-start;
  margin: 6px 0 0;
  font: 17px/1.2 var(--ps-mono);
  letter-spacing: 0;
  color: var(--ps-muted);
  text-align: left;
}

/* Leftovers from the Webflow layout */
.ps-desktop ~ .work-layout:empty,
html.ps-js .home-hero-section:empty { display: none; }

.footer-wrap { margin: 40px auto 0; max-width: 1440px; background: transparent; }
.footer-copy { font: 17px/1 var(--ps-mono); color: var(--ps-muted); text-align: center; }

/* ---------- Project pages -------------------------------------------------- */
.ps-win--page { max-width: 1120px; margin: 0 auto; }
.ps-win--page > .ps-panel { padding: 40px; overflow: visible; }
.ps-win--page .work-layout,
.ps-win--page .work-layout.project-hero {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
}
.ps-win--page .work-intro { position: static; }
.ps-win--page .backlink { display: none; } /* moved into the toolbar as a pill */
.ps-win--page .project-overview-grid {
  display: grid;
  grid-template: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  max-width: none;
  margin: 0 0 40px;
  text-align: left;
  place-items: start stretch;
}
.ps-win--page .project-overview-grid > div:only-child,
.ps-win--page .project-overview-grid > div:nth-child(3) { grid-column: 1 / -1; }
.ps-win--page .work-title {
  margin: 0 0 16px;
  font: 400 58px/.95 var(--ps-display);
  color: var(--ps-text);
  text-align: left;
}
.ps-win--page .workpage-overview {
  margin: 0 0 10px;
  font: 400 30px/1 var(--ps-display);
  color: var(--ps-pink);
}
.ps-win--page .paragraph-light,
.ps-win--page .list-item {
  font: 300 17px/1.6 var(--ps-body);
  letter-spacing: .01em;
  color: var(--ps-text);
}
.ps-win--page .list { margin: 4px 0 0; padding-left: 20px; }
.ps-win--page .paragraph-light + .workpage-overview { margin-top: 24px; }
.ps-win--page .list-item { margin-bottom: 6px; }
.ps-win--page .list-item::marker { color: var(--ps-pink); }
.ps-win--page .detail-image,
.ps-win--page .detail-header-image,
.ps-win--page .w-video {
  border: 1px solid var(--ps-line);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ps-ring);
}
.ps-win--page .detail-image { margin-bottom: 28px; }
/* width/height attributes reserve space while loading; the box still scales with the column */
.ps-win--page .detail-image,
.ps-win--page .detail-header-image { height: auto; }
.ps-win--page .w-video { margin-bottom: 28px; }

/* ---------- Responsive ----------------------------------------------------- */
@media (max-width: 991px) {
  .ps-desktop { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ps-win--about, .ps-win--exp, .ps-win--l { grid-column: 1 / -1; }
  .ps-win--m, .ps-win--s, .ps-win--h { grid-column: span 3; }
  .ps-win--page > .ps-panel { padding: 28px; }
}

@media (max-width: 767px) {
  :root { --ps-gap: 16px; }
  .ps-desktop { grid-template-columns: minmax(0, 1fr); }
  .ps-desktop > .ps-window { grid-column: 1 / -1; }
  .ps-win--about .ps-panel { flex-direction: column; padding: 18px; }
  .ps-win--about .home-hero-subhead { font-size: 17px; }
  .ps-win--project .work-image, .ps-win--l .work-image { min-height: 200px; }
  .ps-win--page > .ps-panel { padding: 20px; }
  .ps-win--page .project-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ps-win--page .work-title { font-size: 40px; }
  .ps-menubar__hide-sm { display: none; }
  .ps-dock { width: 100%; border-radius: 0; overflow-x: auto; }
  .ps-dock__btn { flex: 1 0 52px; width: auto; }
}
