:root {
  --color-bg-page: #101010;
  --color-bg-frame: #1a1a1a;
  --color-bg-viewport: #111;

  --color-text-main: #f1f1f1;
  --color-text-strong: #dee2e6;
  --color-text-muted: #adb5bd;
  --color-text-dark: #101010;
  --color-text-dark-muted: #495057;

  --color-panel-light: #ced4da;
  --color-panel-mid: #bfc5ca;
  --color-panel-control: #adb5bd;

  --color-border-light: #d2d8dc;
  --color-border-light-alt: #c7ccd1;
  --color-border-mid: #8b9196;
  --color-border-mid-alt: #7a7f84;
  --color-border-dark: #6f757a;
  --color-border-dark-alt: #4f555a;
}

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

html,
body {
  height: 100%;
}

body {
  background-color: #101010;
  color: #f1f1f1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

.hud-page {
  font-family: "Jersey 25", sans-serif;
  font-style: normal;
  font-weight: 400;
}

.hud-page__main {
  display: flex;
  flex: 1 1 auto;
  margin-inline: auto;
  max-width: 2560px;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.hud {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
}

.hud__frame {
  background-color: #1a1a1a;
  border-bottom: 2px solid #4f555a;
  border-left: 2px solid #c7ccd1;
  border-right: 2px solid #7a7f84;
  border-top: 2px solid #c7ccd1;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.1) inset,
    0 4px 12px rgb(0 0 0 / 0.2);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
}

.hud__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.hud__title {
  font-size: 2rem;
  line-height: 1;
}

.hud__subtitle {
  color: #adb5bd;
  font-size: 1rem;
  text-transform: uppercase;
}

.hud__viewport {
  background:
    linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.04)), #111;
  border-bottom: 2px solid #4f555a;
  border-left: 2px solid #c7ccd1;
  border-right: 2px solid #7a7f84;
  border-top: 2px solid #c7ccd1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.hud__scroll-area {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

.hud__scroll-area,
.project-modal__body {
  scrollbar-color: auto;
  scrollbar-width: auto;
}

.hud__scroll-area::-webkit-scrollbar,
.project-modal__body::-webkit-scrollbar {
  width: 0.5rem;
}

.hud__scroll-area::-webkit-scrollbar-track,
.project-modal__body::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.hud__scroll-area::-webkit-scrollbar-thumb,
.project-modal__body::-webkit-scrollbar-thumb {
  background: #7a7f84;
  border: 1px solid #4f555a;
}

.hud__scroll-area::-webkit-scrollbar-thumb:hover,
.project-modal__body::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

.hud-screen {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 0.8fr;
  height: 100%;
  left: 0;
  padding: 1.5rem;
  position: absolute;
  top: 0;
  width: 100%;
}

.hud-screen__panel {
  background-color: rgb(191 197 202 / 0.08);
  border: 1px solid rgb(210 216 220 / 0.2);
  padding: 1rem;
}

.hud-screen__label {
  color: #adb5bd;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hud-screen__heading {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.hud-screen__text {
  color: #dee2e6;
  font-size: 1.5rem;
  line-height: 1.2;
  max-width: 28ch;
}

.hud-screen__list {
  display: grid;
  gap: 0.75rem;
}

.hud-screen__list-item {
  border-left: 2px solid #6c757d;
  padding-left: 0.75rem;
}

.hud-screen__links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hud-screen__link-item {
  border-left: 2px solid #6c757d;
  padding-left: 0.75rem;
}

.hud-screen__link,
.hud-screen__meta {
  color: #adb5bd;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.hud-screen__link {
  position: relative;
  text-decoration: none;
}

.hud-screen__link:hover,
.hud-screen__link:focus-visible {
  color: #dee2e6;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.hud-screen__link:focus-visible {
  outline: 2px solid #495057;
  outline-offset: 2px;
}

.hud-screen__link::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5bd' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M10 14 19 5'/%3E%3Cpath d='M19 14v5H5V5h5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  height: 1rem;
  position: absolute;
  right: -1.25rem;
  width: 1rem;
}

.hud-screen__link:hover::after,
.hud-screen__link:focus-visible::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dee2e6' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M10 14 19 5'/%3E%3Cpath d='M19 14v5H5V5h5'/%3E%3C/svg%3E");
}

.hud-page--intro .hud-page__main {
  animation: hud-main-boot 320ms ease-out forwards;
  animation-delay: 220ms;
  opacity: 0.01;
}

.hud-page--intro .hud__frame {
  animation: hud-frame-boot 420ms steps(5, end) forwards;
  animation-delay: 240ms;
  filter: brightness(0.7) contrast(1.1);
}

.hud-page--intro .hud__viewport::before {
  animation: hud-scanlines-boot 320ms linear forwards;
  animation-delay: 240ms;
  background: repeating-linear-gradient(
    to bottom,
    rgb(255 255 255 / 0.12) 0,
    rgb(255 255 255 / 0.12) 2px,
    transparent 2px,
    transparent 5px
  );
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.hud-page--intro .hud-footer {
  animation: hud-footer-boot 560ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(100%);
}

.hud-screen--enter-from-left {
  animation: hud-enter-from-left 280ms ease forwards;
}

.hud-screen--enter-from-right {
  animation: hud-enter-from-right 280ms ease forwards;
}

.hud-screen--exit-to-left {
  animation: hud-exit-to-left 280ms ease forwards;
}

.hud-screen--exit-to-right {
  animation: hud-exit-to-right 280ms ease forwards;
}

@keyframes hud-main-boot {
  from {
    opacity: 0.01;
  }

  to {
    opacity: 1;
  }
}

@keyframes hud-frame-boot {
  0% {
    filter: brightness(0.55) contrast(1.2);
  }

  35% {
    filter: brightness(1.2) contrast(1.35);
  }

  60% {
    filter: brightness(0.85) contrast(1.15);
  }

  100% {
    filter: brightness(1) contrast(1);
  }
}

@keyframes hud-scanlines-boot {
  0% {
    opacity: 0;
  }

  18% {
    opacity: 0.42;
  }

  38% {
    opacity: 0.22;
  }

  58% {
    opacity: 0.36;
  }

  78% {
    opacity: 0.16;
  }

  100% {
    opacity: 0;
  }
}

@keyframes hud-footer-boot {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hud-enter-from-left {
  from {
    opacity: 0.7;
    transform: translateX(-100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hud-enter-from-right {
  from {
    opacity: 0.7;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hud-exit-to-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0.7;
    transform: translateX(-100%);
  }
}

@keyframes hud-exit-to-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0.7;
    transform: translateX(100%);
  }
}

.hud-footer {
  align-items: stretch;
  background-color: #ced4da;
  color: #101010;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: center;
  padding: 1rem;
  text-align: center;
}

.hud-footer__panel {
  background-color: #bfc5ca;
  border-bottom: 2px solid #6f757a;
  border-left: 2px solid #d2d8dc;
  border-right: 2px solid #8b9196;
  border-top: 2px solid #d2d8dc;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.35) inset,
    0 2px 4px rgb(0 0 0 / 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  max-width: 250px;
  min-width: 0;
  padding: 0.5rem;
  width: 100%;
}

.hud-footer__panel--link {
  align-items: center;
  color: #101010;
  display: grid;
  gap: 0.25rem;
  grid-template-areas:
    "value"
    "icon"
    "label";
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  padding-right: 1.75rem;
  position: relative;
  text-decoration: none;
}

.hud-footer__panel--link::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M10 14 19 5'/%3E%3Cpath d='M19 14v5H5V5h5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  bottom: 0.01rem;
  content: "";
  height: 0.9rem;
  position: absolute;
  right: 0.01rem;
  width: 0.9rem;
}

.hud-footer__value {
  font-size: 2.5rem;
  grid-area: value;
  line-height: 1;
}

.hud-footer__brand-icon {
  display: block;
  grid-area: icon;
  height: 2rem;
  justify-self: center;
  width: 2rem;
}

.hud-footer__label {
  font-size: 1.25rem;
  font-weight: bold;
  grid-area: label;
  line-height: 1.1;
  margin-top: auto;
  text-transform: uppercase;
}

.hud-footer__portrait-group {
  align-self: stretch;
  display: flex;
  gap: 0.5rem;
  height: 100%;
  justify-content: center;
}

.hud-footer__controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  justify-content: space-between;
}

.hud-footer__portrait {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
}

.hud-footer__image {
  aspect-ratio: 1 / 1;
  border-bottom: 2px solid #6f757a;
  border-left: 2px solid #d2d8dc;
  border-right: 2px solid #8b9196;
  border-top: 2px solid #d2d8dc;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.25) inset,
    0 2px 4px rgb(0 0 0 / 0.12);
  height: 100%;
  max-height: 150px;
  object-fit: cover;
  width: auto;
}

.hud-footer__language-button,
.hud-footer__project-button,
.hud-footer__screen-button,
.project-modal__close {
  align-items: center;
  background-color: #adb5bd;
  border-bottom: 2px solid #6f757a;
  border-left: 2px solid #d2d8dc;
  border-right: 2px solid #8b9196;
  border-top: 2px solid #d2d8dc;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.3) inset,
    0 1px 2px rgb(0 0 0 / 0.12);
  color: #101010;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.25rem;
  height: 2rem;
  justify-content: center;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
  width: 2rem;
}

.hud-footer__panel--link:hover,
.hud-footer__language-button:hover,
.hud-footer__project-button:hover,
.hud-footer__screen-button:hover,
.project-modal__close:hover {
  background-color: #a8b0b8;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.2) inset,
    0 0 0 1px rgb(0 0 0 / 0.04) inset,
    0 1px 2px rgb(0 0 0 / 0.12);
}

.hud-footer__panel--link:active,
.hud-footer__language-button:active,
.hud-footer__project-button:active,
.hud-footer__screen-button:active,
.project-modal__close:active {
  border-bottom: 2px solid #d2d8dc;
  border-left: 2px solid #8b9196;
  border-right: 2px solid #d2d8dc;
  border-top: 2px solid #6f757a;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12) inset;
}

.hud-footer__language-button[aria-pressed="true"] {
  border-bottom: 2px solid #d2d8dc;
  border-left: 2px solid #8b9196;
  border-right: 2px solid #d2d8dc;
  border-top: 2px solid #6f757a;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12) inset;
}

.hud-footer__panel--link:focus-visible,
.hud-footer__language-button:focus-visible,
.hud-footer__project-button:focus-visible,
.hud-footer__screen-button:focus-visible,
.project-modal__close:focus-visible,
.project-modal__link:focus-visible {
  outline: 2px solid #495057;
  outline-offset: 2px;
}

.hud-footer__screen-icon {
  display: block;
  fill: currentColor;
  height: 1.5rem;
  width: 1.5rem;
}

.hud-footer__project-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
}

.hud-footer__experience-list {
  display: grid;
  gap: 0.5rem;
}

.hud-footer__experience-item {
  display: flex;
  justify-content: space-between;
}

.hud-footer__experience-label {
  color: #495057;
  text-transform: uppercase;
}

.project-modal {
  background: transparent;
  border: none;
  margin: auto;
  max-height: 100vh;
  max-width: 100vw;
  padding: 0;
}

.project-modal::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition: background-color 220ms ease;
}

.project-modal[open]::backdrop {
  background-color: rgb(0 0 0 / 0.65);
}

.project-modal__content {
  background-color: #ced4da;
  border: 4px solid #6c757d;
  color: #101010;
  display: flex;
  flex-direction: column;
  left: 50%;
  max-height: calc(100dvh - 4rem);
  max-width: 40rem;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: fixed;
  top: 0;
  transform: translate(-50%, -100%);
  transition:
    opacity 280ms ease,
    transform 280ms ease;
  width: min(40rem, calc(100vw - 2rem));
}

.project-modal--visible .project-modal__content {
  opacity: 1;
  transform: translate(-50%, 2rem);
}

.project-modal--closing .project-modal__content {
  opacity: 0;
  transform: translate(-50%, -100%);
}

.project-modal__close {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  z-index: 1;
}

.project-modal__body {
  overflow-y: auto;
  padding: 1rem;
  scrollbar-gutter: stable;
}

.project-modal__title {
  font-size: 2rem;
  line-height: 1;
  margin: 2rem 0 1rem;
}

.project-modal__label {
  border-bottom: 1px solid #101010;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  width: fit-content;
}

.project-modal__image {
  background-color: #bfc5ca;
  border-bottom: 2px solid #6f757a;
  border-left: 2px solid #d2d8dc;
  border-right: 2px solid #8b9196;
  border-top: 2px solid #d2d8dc;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.25) inset,
    0 2px 4px rgb(0 0 0 / 0.12);
  display: block;
  height: auto;
  margin: 1rem auto;
  max-height: 500px;
  max-width: 500px;
  object-fit: contain;
  width: 100%;
}

.project-modal__text {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.project-modal__stack {
  display: flex;
  flex-flow: row wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.project-modal__stack-item {
  border: 1px solid #101010;
  padding: 0.05rem 0.25rem;
}

.project-modal__links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-modal__link-item {
  border-left: 2px solid #101010;
  padding-left: 0.75rem;
}

.project-modal__link {
  color: #101010;
  font-size: 1.5rem;
  position: relative;
  text-decoration: none;
}

.project-modal__link:hover,
.project-modal__link:focus-visible {
  color: #4f555a;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.project-modal__link::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101010' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M10 14 19 5'/%3E%3Cpath d='M19 14v5H5V5h5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  height: 1rem;
  position: absolute;
  right: -1.25rem;
  top: 0.15rem;
  width: 1rem;
}

.project-modal__link:hover::after,
.project-modal__link:focus-visible::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f555a' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M10 14 19 5'/%3E%3Cpath d='M19 14v5H5V5h5'/%3E%3C/svg%3E");
}

@media (min-width: 2560px) {
  .hud-footer {
    grid-template-columns: repeat(5, minmax(0, 250px));
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hud-page__main {
    min-height: auto;
  }

  .hud {
    min-height: auto;
    padding: 0.25rem;
  }

  .hud__frame {
    gap: 0.5rem;
    min-height: auto;
    padding: 0.5rem;
  }

  .hud__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .hud__title {
    font-size: 1.75rem;
  }

  .hud__viewport {
    min-height: 0;
  }

  .hud-screen {
    gap: 0.5rem;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
    padding: 0.5rem;
    position: relative;
  }

  .hud-screen__panel {
    padding: 0.5rem;
  }

  .hud-screen__label {
    margin-bottom: 0.5rem;
  }

  .hud-screen__heading {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .hud-screen__text {
    font-size: 1.25rem;
  }

  .hud-screen__list {
    gap: 0.5rem;
  }

  .hud-screen__link,
  .hud-screen__meta {
    font-size: 1rem;
  }

  .hud-screen--enter-from-left,
  .hud-screen--enter-from-right,
  .hud-screen--exit-to-left,
  .hud-screen--exit-to-right {
    animation: none;
  }

  .hud-footer {
    align-items: stretch;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto auto;
    justify-items: stretch;
    padding: 0.25rem;
  }

  .hud-footer > :nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .hud-footer > :nth-child(2) {
    grid-column: 5 / 7;
    grid-row: 1;
  }

  .hud-footer > :nth-child(3) {
    align-self: center;
    grid-column: 3 / 5;
    grid-row: 1;
    justify-self: center;
  }

  .hud-footer > :nth-child(4) {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .hud-footer > :nth-child(5) {
    grid-column: 4 / 7;
    grid-row: 2;
  }

  .hud-footer__panel {
    gap: 0.25rem;
    height: 100%;
    max-width: none;
    padding: 0.25rem;
    width: 100%;
  }

  .hud-footer__value {
    font-size: 1.25rem;
  }

  .hud-footer__brand-icon {
    height: 1rem;
    width: 1rem;
  }

  .hud-footer__label {
    font-size: 0.9rem;
  }

  .hud-footer__portrait-group {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
  }

  .hud-footer__controls {
    gap: 0.25rem;
  }

  .hud-footer__project-grid {
    width: 100%;
  }

  .hud-footer__experience-list {
    gap: 0.25rem;
  }

  .hud-footer__language-button,
  .hud-footer__project-button,
  .hud-footer__screen-button {
    height: 1.5rem;
    width: 1.5rem;
  }

  .project-modal__links {
    gap: 0.5rem;
  }

  .project-modal__link {
    font-size: 1.1rem;
  }

  .project-modal__link-item {
    padding-left: 0.5rem;
  }

  .project-modal__link::after {
    height: 0.8rem;
    right: -1rem;
    top: 0.15rem;
    width: 0.8rem;
  }
}

@media (max-height: 500px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .hud-page__main {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .hud {
    min-height: auto;
    overflow: visible;
  }

  .hud__frame {
    min-height: auto;
    overflow: visible;
  }

  .hud__viewport {
    overflow: visible;
  }

  .hud__scroll-area {
    height: auto;
    overflow: visible;
  }

  .hud-screen {
    height: auto;
    min-height: auto;
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud-page--intro .hud-footer,
  .hud-page--intro .hud-page__main,
  .hud-page--intro .hud__frame,
  .hud-page--intro .hud__viewport::before {
    animation: none;
    filter: none;
    opacity: 1;
    transform: none;
  }

  .hud-screen--enter-from-left,
  .hud-screen--enter-from-right,
  .hud-screen--exit-to-left,
  .hud-screen--exit-to-right {
    animation: none;
  }

  .project-modal::backdrop,
  .project-modal__content {
    transition: none;
  }
}
