@font-face {
  font-family: "Gothic Pixels";
  src: url("assets/Gothic-Pixels.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #000000;
  --rule-width: 4px;
  --rule: var(--rule-width) solid var(--ink);
  --page-gutter: clamp(16px, 4.25vw, 68px);
  --page-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.35;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border: var(--rule);
  background: #ffffff;
  transform: translateY(-150%);
}

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

.site-header {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: end;
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--page-width));
  height: 86px;
  margin: 0 auto;
}

.wordmark {
  position: absolute;
  z-index: 3;
  top: 62px;
  left: calc((var(--page-gutter) * -1) + 20px);
  display: block;
  padding: 0 14px 9px 0;
  background: #ffffff;
  font-family: "Gothic Pixels", "Courier New", monospace;
  font-size: clamp(5.8rem, 8vw, 7.5rem);
  font-weight: normal;
  line-height: 0.76;
  text-decoration: none;
  transform: rotate(-11deg);
  transform-origin: 44% 50%;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(32px, 7.2vw, 112px);
  padding: 0 20px 16px;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
}

.site-nav a {
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-nav a:not(:hover, :focus-visible, .is-active) {
  text-decoration-color: transparent;
}

main {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--page-width));
  margin-inline: auto;
}

.projects-panel {
  display: grid;
  min-height: clamp(440px, 58vh, 520px);
  padding-block: clamp(60px, 9vh, 80px);
  padding-inline: clamp(24px, 10vw, 153px) clamp(24px, 6.6vw, 101px);
  border: var(--rule);
  scroll-margin-top: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr 1fr;
  gap: clamp(26px, 3vw, 46px);
  align-self: start;
  width: 100%;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: clamp(180px, 22vh, 220px);
  margin: 0;
  padding: 12px;
  border: var(--rule);
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  text-decoration: none;
}

.project-card:hover,
.project-card:focus-visible {
  background: #000000;
  color: #ffffff;
}

.project-card:active {
  transform: translate(3px, 3px);
}

.project-card--games {
  min-height: clamp(180px, 22vh, 220px);
}

.card-title {
  font-size: clamp(2.9rem, 4.6vw, 4.6rem);
  line-height: 1;
}

.project-card--mods .card-title {
  font-size: clamp(2.7rem, 4.1vw, 4rem);
}

.project-card--minigames .card-title {
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
}

.secondary-panel {
  min-height: clamp(360px, 50vh, 480px);
  padding: clamp(48px, 6vw, 80px);
  border-right: var(--rule);
  border-bottom: var(--rule);
  border-left: var(--rule);
  scroll-margin-top: 0;
}

.secondary-panel h2 {
  margin: 0 0 36px;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: normal;
  line-height: 1;
}

.secondary-panel p {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

@media (max-width: 780px) {
  :root {
    --rule-width: 3px;
  }

  .site-header {
    width: calc(100% - 24px);
    height: 132px;
  }

  .wordmark {
    top: 42px;
    left: 4px;
    padding-right: 8px;
    font-size: clamp(6rem, 27vw, 8.5rem);
    transform: rotate(-10deg);
  }

  .site-nav {
    width: 100%;
    gap: 0;
    justify-content: space-between;
    padding: 0 2px 14px;
    font-size: 1rem;
  }

  main {
    width: calc(100% - 24px);
  }

  .projects-panel {
    min-height: auto;
    padding: 60px 18px 28px;
  }

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

  .project-card,
  .project-card--games {
    min-height: 150px;
  }
}

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

}
