:root {
  --desktop-width: 800;
  --desktop-height: 600;
  --desktop-icon-height: clamp(54px, 3.55vw, 80px);
  --menu-height: clamp(19px, 2.35vw, 28px);
  --pixel-shadow: 1px 1px 0 #ffffff, -1px -1px 0 #000000;
}

@font-face {
  font-family: "FindersKeepers";
  src: url("assets/about-me-window/finders-keepers.ttf") format("truetype");
  font-display: block;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1bb3ad;
}

body {
  color: #000000;
  font-family: Chicago, "Pixelated MS Sans Serif", "Courier New", monospace;
  image-rendering: pixelated;
}

button,
a {
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  background: transparent;
  text-decoration: none;
}

.desktop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: #1bb3ad url("assets/images/desktop-background.png") center / cover no-repeat;
  cursor: default;
  user-select: none;
}

.menu-bar {
  position: fixed;
  z-index: 20;
  top: -1px;
  left: -1px;
  width: calc(100vw + 2px);
  height: var(--menu-height);
  overflow: hidden;
  background: #ffffff;
  pointer-events: none;
}

.menu-bar img {
  display: block;
  image-rendering: pixelated;
}

.menu-bar-bg {
  position: absolute;
  inset: 0 -1px;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.menu-bar-left {
  position: absolute;
  top: 0;
  left: clamp(4px, 1.25vw, 18px);
  display: flex;
  align-items: center;
  height: 100%;
}

.menu-bar-left img,
.menu-help {
  flex: 0 0 auto;
  width: auto;
  height: 96%;
}

.menu-bar-left .menu-apple {
  height: 84%;
  margin-right: clamp(3px, 0.65vw, 10px);
}

.menu-bar-left img:not(.menu-apple) {
  margin-left: clamp(-6px, -0.42vw, -2px);
  transform: translateY(1px);
}

.menu-help {
  position: absolute;
  top: 0;
  right: clamp(4px, 1.5vw, 18px);
}

.stage {
  position: absolute;
  inset: var(--menu-height) 0 0;
  min-height: 0;
}

.desktop-icons-layer,
.windows-layer {
  position: absolute;
  inset: 0;
}

.desktop-icons-layer {
  z-index: 4;
}

.windows-layer {
  z-index: 30;
  pointer-events: none;
}

.windows-layer > section {
  pointer-events: auto;
}

.welcome-banner {
  position: absolute;
  z-index: 2;
  top: clamp(27px, 5.35vw, 44px);
  left: clamp(16px, 3.1vw, 30px);
  width: clamp(274px, 43vw, 520px);
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

.desktop-item {
  position: absolute;
  z-index: 1;
  width: var(--item-width);
  line-height: 0;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  transform: translate3d(0, 0, 0);
  cursor: grab;
}

.desktop-item:active {
  cursor: grabbing;
}

.desktop-item:focus-visible {
  outline: 1px dotted #000000;
  outline-offset: 3px;
}

.desktop-item.is-dragging {
  z-index: 200;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.32));
}

.desktop-item img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

.icon {
  --item-width: auto;
  height: var(--desktop-icon-height);
}

.icon img {
  width: auto;
  height: 100%;
}

.sticky {
  --item-width: clamp(230px, 30vw, 340px);
}

.folder-window {
  position: absolute;
  z-index: 1;
  top: clamp(66px, 10vh, 104px);
  left: 50%;
  width: min(82vw, 680px);
  aspect-ratio: 2654 / 1500;
  transform: translateX(-50%);
  image-rendering: pixelated;
  touch-action: none;
}

.folder-window[hidden] {
  display: none;
}

.folder-window-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.folder-window-close {
  position: absolute;
  top: 1.18%;
  right: 2.02%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.62%;
  min-width: 20px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2px solid #000000;
  background: #ffffff;
  line-height: 0;
  cursor: pointer;
}

.folder-window-close img {
  display: block;
  width: 72%;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

.folder-window-icons {
  position: absolute;
  z-index: 1;
  top: 11.5%;
  left: 3%;
  right: 3%;
  bottom: 7%;
}

.folder-window-icon {
  position: absolute;
  width: auto;
  height: var(--desktop-icon-height);
  line-height: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.folder-window-icon:active {
  cursor: grabbing;
}

.folder-window-icon img {
  display: block;
  width: auto;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

.about-window {
  position: absolute;
  z-index: 2;
  top: clamp(42px, 7vh, 76px);
  left: 50%;
  width: min(88vw, 760px);
  height: min(70vh, 650px);
  transform: translateX(-50%);
  image-rendering: pixelated;
  touch-action: none;
}

.about-window[hidden] {
  display: none;
}

.about-window-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.about-window-close {
  position: absolute;
  top: 1.05%;
  right: 2.7%;
  z-index: 4;
  width: 2.15%;
  min-width: 13px;
  line-height: 0;
  cursor: pointer;
}

.about-window-close img {
  display: block;
  width: 88%;
  height: auto;
  margin: 6%;
  image-rendering: pixelated;
  pointer-events: none;
}

.about-scroll {
  position: absolute;
  z-index: 1;
  top: 5.7%;
  left: 1.7%;
  right: 3.9%;
  bottom: 7.5%;
  overflow-y: auto;
  scrollbar-width: none;
}

.about-scroll::-webkit-scrollbar {
  display: none;
}

.about-content {
  padding: clamp(24px, 4.4vw, 38px) clamp(18px, 3.8vw, 34px) clamp(18px, 3vh, 32px);
  color: #000000;
  font-family: "FindersKeepers", Chicago, "Courier New", monospace;
  font-size: clamp(21px, 2.35vw, 28px);
  line-height: 1.18;
  letter-spacing: 0;
}

.about-content p {
  max-width: 88%;
  margin: 0 0 0.82em;
}

.about-photo {
  position: relative;
  width: min(56%, 390px);
  margin: clamp(4px, 1.5vh, 14px) auto 30px;
  line-height: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
}

.about-photo-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.about-photo:hover .about-photo-primary,
.about-photo:focus-within .about-photo-primary {
  opacity: 0;
}

.about-photo:hover .about-photo-alt,
.about-photo:focus-within .about-photo-alt {
  opacity: 1;
}

.about-caption {
  margin-top: 0;
}

.about-caption-alt {
  display: none;
}

.about-photo:hover + .about-caption .about-caption-primary,
.about-photo:focus-within + .about-caption .about-caption-primary {
  display: none;
}

.about-photo:hover + .about-caption .about-caption-alt,
.about-photo:focus-within + .about-caption .about-caption-alt {
  display: inline;
}

.about-copyright {
  padding-top: 1.4em;
}

.about-scroll-thumb {
  position: absolute;
  z-index: 3;
  top: 10.6%;
  right: 1.08%;
  width: 2.7%;
  min-width: 14px;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

@media (max-width: 620px) {
  .welcome-banner {
    top: clamp(18px, 5vw, 28px);
    left: clamp(10px, 3vw, 16px);
    width: clamp(226px, 74vw, 286px);
  }

  .sticky {
    --item-width: clamp(178px, 54vw, 230px);
  }

  .folder-window {
    top: 13vh;
    width: 96vw;
  }

  .folder-window-icons {
    left: 8%;
    right: 8%;
  }

  .about-window {
    top: 8vh;
    width: 96vw;
    height: 70vh;
  }

  .about-content {
    font-size: 20px;
  }

  .about-content p {
    max-width: 92%;
  }

  .about-photo {
    width: 72%;
    margin-top: 8px;
  }
}
