:root {
  color-scheme: light;
  --desktop: #2f7373;
  --window-gray: #c0c0c0;
  --paper: #fffef1;
  --paper-deep: #f5f1d9;
  --navy: #000080;
  --blue: #0000ee;
  --visited: #551a8b;
  --red: #b60018;
  --teal: #006666;
  --green: #087f23;
  --yellow: #fff200;
  --black: #111111;
  --mid-gray: #777777;
  --dark-gray: #404040;
  --white: #ffffff;
  --body-font: Verdana, Geneva, Arial, sans-serif;
  --serif: "Times New Roman", Times, serif;
  --mono: "Courier New", Courier, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--desktop);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 34px 14px;
  color: var(--black);
  background-color: var(--desktop);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.055) 75%);
  background-position:
    0 0,
    0 3px,
    3px -3px,
    -3px 0;
  background-size: 6px 6px;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: none;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--blue);
  text-decoration: underline;
}

a:visited {
  color: var(--visited);
}

a:hover {
  color: var(--red);
}

a:focus-visible {
  outline: 2px dotted var(--black);
  outline-offset: 3px;
}

::selection {
  color: var(--white);
  background: var(--navy);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 7px 10px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--yellow);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.window {
  width: 100%;
  max-width: 790px;
  margin: 0 auto;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  background: var(--window-gray);
  box-shadow:
    1px 1px 0 var(--black),
    8px 8px 0 rgba(0, 0, 0, 0.38);
}

.title-bar {
  display: flex;
  min-height: 32px;
  margin: 3px 3px 0;
  padding: 4px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: var(--navy);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1;
}

.title-bar-name {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
}

.title-bar-name img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.title-bar-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-controls {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
}

.window-controls span {
  display: grid;
  width: 21px;
  height: 21px;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  color: var(--black);
  background: var(--window-gray);
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  place-items: center;
}

.site-nav {
  display: flex;
  margin: 0 3px;
  padding: 5px 6px 6px;
  border-bottom: 1px solid var(--mid-gray);
  gap: 2px;
  flex-wrap: wrap;
  background: var(--window-gray);
}

.site-nav a {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  align-items: center;
  color: var(--black);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:visited {
  color: var(--black);
}

.site-nav a:hover {
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark-gray);
  border-bottom-color: var(--dark-gray);
  color: var(--navy);
  background: #d4d4d4;
}

.document {
  margin: 3px;
  padding: clamp(22px, 5vw, 42px);
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(0, 0, 128, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 128, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

.profile {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.photo-frame {
  padding: 5px;
  border-top: 3px solid var(--white);
  border-left: 3px solid var(--white);
  border-right: 3px solid var(--dark-gray);
  border-bottom: 3px solid var(--dark-gray);
  background: var(--window-gray);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--black);
  object-fit: cover;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 2px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 4px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 7vw, 3.15rem);
  line-height: 0.98;
  text-shadow: 2px 2px 0 #d9d7c5;
}

.location {
  margin-bottom: 13px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: lowercase;
}

.intro {
  max-width: 32rem;
  margin-bottom: 0;
  font-size: 0.96rem;
}

.star-rule {
  display: flex;
  margin: clamp(28px, 6vw, 42px) 0;
  gap: 16px;
  align-items: center;
  color: var(--red);
}

.star-rule::before,
.star-rule::after {
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--navy) 0 5px,
    transparent 5px 9px
  );
  content: "";
  flex: 1;
}

.star-rule span {
  font-size: 0.7rem;
}

.mission {
  padding: 12px 14px;
  border-left: 5px solid var(--navy);
  background: #ededda;
  box-shadow: inset 0 0 0 1px #c9c6ad;
}

.mission p {
  margin-bottom: 0;
}

.file-label {
  margin-bottom: 4px !important;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: lowercase;
}

.mission p:last-child {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.cursor {
  color: var(--red);
  animation: cursor-blink 1.15s steps(1) infinite;
}

.attempts {
  margin-top: clamp(42px, 8vw, 62px);
}

.directory-heading {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px double var(--navy);
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.directory-path {
  margin-bottom: 3px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1;
}

.item-count {
  margin-bottom: 0;
  color: #444444;
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.project {
  display: grid;
  padding: 18px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  background: var(--white);
  box-shadow: inset -1px -1px 0 #c8c8c8;
}

.project-icon-frame {
  align-self: start;
  padding: 4px;
  border: 1px solid var(--black);
  background: var(--paper-deep);
}

.project-icon-frame img {
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.project-name {
  display: flex;
  margin-bottom: 6px;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.attempt-number {
  color: #555555;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
}

h3 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
}

h3 a {
  color: var(--blue);
}

.new-badge {
  padding: 1px 4px;
  border: 1px solid var(--black);
  color: var(--black);
  background: var(--yellow);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(-2deg);
}

.project-meta {
  display: flex;
  margin-bottom: 10px;
  gap: 6px 12px;
  flex-wrap: wrap;
  color: #444444;
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.live-status {
  color: var(--green);
}

.project-description {
  max-width: 31rem;
  margin-bottom: 15px;
  font-size: 0.91rem;
}

.retro-button {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 12px;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  align-items: center;
  color: var(--black);
  background: var(--window-gray);
  box-shadow: 1px 1px 0 var(--black);
  font-family: var(--body-font);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.retro-button:visited {
  color: var(--black);
}

.retro-button:hover {
  color: var(--navy);
  background: #d6d6d6;
}

.retro-button:active {
  border-top-color: var(--dark-gray);
  border-left-color: var(--dark-gray);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: none;
  transform: translate(1px, 1px);
}

.next-attempt {
  margin: 12px 0 0 4px;
  color: #444444;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.badges {
  display: flex;
  margin-top: clamp(48px, 9vw, 72px);
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.web-badge {
  display: flex;
  width: 96px;
  height: 34px;
  border: 2px solid var(--black);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  line-height: 1;
  text-align: center;
}

.web-badge small {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.web-badge strong {
  margin-top: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.alberta-badge {
  color: var(--white);
  background:
    linear-gradient(90deg, var(--navy) 0 26%, var(--white) 26% 30%, var(--red) 30%);
}

.screen-badge {
  color: var(--black);
  background:
    repeating-linear-gradient(
      -45deg,
      var(--yellow) 0 5px,
      #ffbf00 5px 10px
    );
}

.page-footer {
  display: flex;
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px dotted #555555;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.73rem;
}

.page-footer p {
  margin-bottom: 0;
}

.status-bar {
  display: flex;
  min-height: 29px;
  margin: 0 3px 3px;
  padding: 4px 7px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  color: #222222;
  background: var(--window-gray);
  font-family: var(--mono);
  font-size: 0.68rem;
}

@keyframes cursor-blink {
  0%,
  52% {
    opacity: 1;
  }

  53%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  body {
    padding: 9px;
  }

  .window {
    box-shadow:
      1px 1px 0 var(--black),
      4px 4px 0 rgba(0, 0, 0, 0.36);
  }

  .site-nav a {
    min-height: 44px;
    padding-inline: 9px;
  }

  .document {
    padding: 22px 18px;
  }

  .profile {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.55rem);
  }
}

@media (max-width: 440px) {
  .title-bar-name span {
    max-width: 180px;
  }

  .window-controls span {
    width: 19px;
    height: 19px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-nav a {
    width: 100%;
  }

  .profile {
    grid-template-columns: 1fr;
  }

  .photo-frame {
    width: 104px;
  }

  .directory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .project {
    grid-template-columns: 1fr;
  }

  .project-icon-frame {
    width: 64px;
  }

  .retro-button {
    width: 100%;
    justify-content: center;
  }

  .page-footer,
  .status-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
