@font-face {
  font-family: "Diatype Variable";
  src: url("assets/fonts/Cargo-DiatypePlusVariable.woff2") format("woff2-variations");
  font-weight: 200 1000;
  font-style: normal;
  font-display: block;
}

:root {
  --black: rgba(0, 0, 0, 0.85);
  --muted: rgba(0, 0, 0, 0.6);
  --shadow: 0.4rem 0.4rem 2rem rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Diatype Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--black);
  background: #111;
  overflow: hidden;
}

button,
a,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.desktop {
  min-height: 100dvh;
  position: relative;
  background:
    linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)),
    url("assets/leopard.jpg") center / cover;
  isolation: isolate;
}

.menu-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0.4rem 0.6rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  box-shadow: none;
}

.menu-items {
  flex: 1 1 auto;
}

.menu-bar time {
  flex: 0 0 auto;
}

.sticky-note {
  position: fixed;
  top: 8rem;
  left: 8rem;
  z-index: 20;
  width: min(28rem, 36vw);
  padding: 1.1rem;
  background: #fff48f;
  border: 0.1rem solid rgba(0, 0, 0, 0.19);
  border-radius: 0.3rem;
  box-shadow: 0.1rem 0.1rem 0.6rem rgba(0, 0, 0, 0.2);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
}

.sticky-note p {
  margin: 0 0 1.15rem;
}

.text-link {
  border: 0;
  padding: 0;
  color: inherit;
  background: none;
  text-decoration: underline;
  cursor: pointer;
}

.caret {
  animation: blink 0.8s steps(1) infinite;
}

.icon-field {
  --icon-offset-y: 3rem;
  position: relative;
  min-height: 100dvh;
  padding-top: 2.3rem;
}

.desktop-icon {
  position: absolute;
  z-index: var(--z);
  left: min(calc(var(--x) - (var(--w) / 2)), calc(100vw - var(--w) - 0.5rem));
  top: calc(2.3rem + var(--icon-offset-y) + var(--y));
  width: var(--w);
  border: 0;
  padding: 0;
  color: white;
  background: transparent;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.desktop-icon:active {
  cursor: pointer;
}

.desktop-icon img,
.desktop-icon video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0.125rem 0.1rem rgba(0, 0, 0, 0.3));
  pointer-events: none;
  -webkit-user-drag: none;
}

.desktop-icon.round img,
.desktop-icon.round video {
  aspect-ratio: 1;
  border: 0.1rem solid rgba(0, 0, 0, 0.16);
  border-radius: 999rem;
  filter: drop-shadow(0 0.2rem 0.25rem rgba(0, 0, 0, 0.4));
  height: var(--w);
  object-fit: cover;
  overflow: hidden;
}

.desktop-icon.tall img {
  max-height: 8rem;
  width: auto;
  max-width: 100%;
}

.desktop-icon.folder img {
  margin-top: 0.8rem;
}

.desktop-icon.game-icon img {
  width: 6.8rem;
  max-height: 4.8rem;
  object-fit: contain;
}

.desktop-icon span {
  display: block;
  margin-top: 0.5em;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 450;
  line-height: 1.2;
  text-shadow: 0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.75);
}

.desktop-icon:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 0.35rem;
}

.window-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  overflow: auto;
  padding: 5rem 1rem 8rem;
  pointer-events: none;
}

.window-layer.active {
  display: block;
  pointer-events: auto;
}

.window {
  display: none;
  width: min(80vw, 1180px);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  background: #fff;
  border-radius: 1.8rem;
  box-shadow: var(--shadow);
  pointer-events: auto;
  transform-origin: top center;
  animation: grow 0.28s ease both;
}

.window.active {
  display: block;
}

.window.narrow {
  width: min(60vw, 900px);
}

.window.archive {
  width: min(60vw, 900px);
}

.window.contact {
  width: min(36rem, calc(100vw - 2rem));
}

.window-title {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 1.8rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.3;
}

.traffic {
  display: flex;
  gap: 0.35rem;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

.traffic i {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
}

.traffic i:nth-child(1) {
  background: rgb(255, 92, 95);
}

.traffic i:nth-child(2) {
  background: rgb(250, 200, 0);
}

.traffic i:nth-child(3) {
  background: rgb(52, 199, 89);
}

.window-body {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
}

.window-body a {
  color: inherit;
}

.folder-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 4.75rem);
  gap: 1.25rem;
  min-height: 7.5rem;
  align-items: start;
}

.selected-work-files {
  grid-template-columns: 14rem repeat(2, 7.5rem);
  gap: 2rem;
}

.folder-icon {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  width: 4.75rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}

.folder-icon-grid .folder-icon > img {
  display: block;
  width: 3.2rem !important;
  height: 3.2rem !important;
  max-width: 3.2rem !important;
  max-height: 3.2rem !important;
  object-fit: contain;
  filter: drop-shadow(0 0.125rem 0.1rem rgba(0, 0, 0, 0.25));
}

.folder-icon-grid .folder-icon > video {
  display: block;
  width: 6.75rem;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 0.125rem 0.1rem rgba(0, 0, 0, 0.25));
}

.selected-work-files .folder-icon {
  width: 7.5rem;
}

.selected-work-files .wide-video-file {
  width: 14rem;
}

.selected-work-files .wide-video-file > video {
  width: auto;
  height: 8.75rem;
  max-width: 14rem;
}

.folder-icon span {
  font-size: 0.95rem;
  line-height: 1.15;
  text-decoration: none;
}

hr {
  border: 0;
  height: 1px;
  margin: 0 0 0.8rem;
  background: rgba(0, 0, 0, 0.15);
}

.project {
  margin-bottom: 5.5rem;
}

.project:last-child {
  margin-bottom: 0;
}

.meta {
  display: grid;
  grid-template-columns: 1.05fr 1fr 2.1fr;
  gap: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  padding-top: 0.8rem;
  margin-bottom: 2rem;
}

.meta b {
  font-weight: 500;
}

.meta p {
  margin: 0;
}

.gallery {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

.gallery.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gallery.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.art-gallery {
  align-items: stretch;
  gap: 1rem;
  grid-auto-flow: dense;
  grid-auto-rows: 7rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-items: stretch;
}

.art-projects .meta {
  grid-template-columns: 1fr 1fr 2.4fr;
}

.art-projects .meta p {
  white-space: pre-line;
}

.thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  color: var(--muted);
  text-align: center;
}

.thumb img {
  display: block;
  width: 100%;
  height: auto;
  background: #eee;
}

.art-thumb {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.art-thumb img {
  height: 100%;
  object-fit: cover;
}

.art-thumb.large {
  grid-column: span 3;
  grid-row: span 3;
}

.art-thumb.wide {
  grid-column: span 3;
  grid-row: span 2;
}

.art-thumb.tall {
  grid-column: span 2;
  grid-row: span 3;
}

.art-thumb.medium {
  grid-column: span 2;
  grid-row: span 2;
}

.thumb span {
  display: block;
  margin: 0.5em 0 1em;
  font-size: 1.1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 1rem;
}

.about-grid p {
  margin: 0 0 1.1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 0, 0, 0.03);
  color: var(--black);
  resize: vertical;
}

.contact-form button {
  justify-self: start;
  border: 0;
  border-radius: 10em;
  padding: 0.55rem 1.1rem;
  color: rgba(0, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 4rem;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2rem);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img,
.lightbox video {
  max-width: min(100%, 900px);
  max-height: 78dvh;
  object-fit: contain;
}

.lightbox p {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.5rem 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.5rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  border: 0;
  border-radius: 10em;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

@keyframes grow {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow: auto;
  }

  .desktop {
    min-height: 100dvh;
  }

  .menu-bar {
    font-size: 0.9rem;
    overflow: hidden;
  }

  .menu-items {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sticky-note {
    display: none;
  }

  .icon-field {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1rem;
    align-content: end;
    min-height: 100dvh;
    padding: 5rem 1rem 2rem;
  }

  .desktop-icon {
    position: static;
    width: auto;
    max-width: 7rem;
    justify-self: center;
  }

  .desktop-icon img,
  .desktop-icon video {
    max-height: 6rem;
    width: auto;
    max-width: 100%;
  }

  .desktop-icon span {
    font-size: 0.95rem;
  }

  .window-layer {
    padding: 4rem 0.75rem 3rem;
  }

  .window,
  .window.narrow,
  .window.archive {
    width: 100%;
    border-radius: 1.2rem;
    padding: 1rem 1rem 2rem;
  }

  .window-title {
    font-size: 1.1rem;
    margin-bottom: 1.4rem;
  }

  .window-body {
    font-size: 1rem;
  }

  .meta,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery.five,
  .gallery.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .folder-icon-grid {
    grid-template-columns: repeat(2, 4.75rem);
    min-height: 7.5rem;
  }

  .selected-work-files {
    grid-template-columns: 1fr;
  }

  .selected-work-files .folder-icon,
  .selected-work-files .wide-video-file {
    width: 100%;
  }

  .selected-work-files .wide-video-file > video {
    max-width: 100%;
  }

  .art-gallery {
    gap: 0.75rem;
    grid-auto-rows: 6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .art-thumb.large,
  .art-thumb.wide,
  .art-thumb.tall,
  .art-thumb.medium {
    grid-column: span 1;
    grid-row: span 2;
  }

  .lightbox {
    padding: 1rem;
  }
}
