@font-face {
  font-family: Pixelify;
  src: url("../fonts/pixelify-sans-semibold.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: PlexMono;
  src: url("../fonts/ibm-plex-mono-light.woff2") format("woff2");
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

body {
  font: 16px/1.4 PlexMono, monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Page Layout Container */
.page {
  position: relative;
  width: 1090px;
  max-width: 100%;
  margin: 0 auto;
}

/* Index Page Specific Layout */
.page-index {
  min-width: 1090px;
  min-height: 2003px;
  margin-top: -12px;
}

.social {
  position: absolute;
  top: 57px;
  left: 10px;
  width: 92px;
  height: 32px;
}

.social a {
  position: absolute;
  top: 0;
  width: 35px;
  height: 32px;
}

.social a:first-child {
  left: 0;
}

.social a:last-child {
  left: 57px;
}

.social img {
  display: block;
  width: 35px;
  height: 32px;
}

.banner {
  position: absolute;
  top: 129px;
  left: -9px;
  width: 578px;
  height: 122px;
  object-fit: contain;
}

.projects {
  position: absolute;
  left: -64px;
  top: 441px;
  width: 648px;
  height: 1000px;
}

.projects h1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 648px;
  margin: 0;
  font: 600 60px/1.4 Pixelify, sans-serif;
  color: #fff;
  letter-spacing: 0;
  text-align: center;
}

.project {
  position: absolute;
  left: 0;
  width: 648px;
  height: 265px;
}

/* Shared bordered-box pseudo element */
.project::before,
.about::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid #fff;
  pointer-events: none;
}

.about::before {
  z-index: 2;
}

.project .logo-link {
  position: absolute;
  display: block;
}

.project .logo {
  display: block;
  width: 215px;
  height: auto;
}

.project .copy {
  position: absolute;
  left: 109px;
  width: 310px;
  margin: 0;
}

.project h2 {
  margin: 0;
  font: 300 17px/1.4 PlexMono, monospace;
  color: #fff;
  letter-spacing: 0;
}

.project .label {
  margin: 19px 0 0;
  font: 300 16px/1.4 PlexMono, monospace;
  color: #f30000;
}

.project .visual {
  position: absolute;
  display: block;
}

.project .visual img {
  display: block;
}

.riverbound {
  top: 147px;
}

.riverbound .logo-link {
  top: 12px;
  left: 216px;
}

.riverbound .copy {
  top: 112px;
}

.riverbound .visual {
  top: 53px;
  left: 484px;
}

.riverbound .visual img {
  width: 120px;
  height: 177px;
  object-fit: cover;
  object-position: top;
}

.cheesycat {
  top: 436px;
}

.cheesycat .logo-link {
  top: 18px;
  left: 214px;
}

.cheesycat .copy {
  top: 98px;
}

.cheesycat .visual {
  top: 53px;
  left: 462px;
}

.cheesycat .visual img {
  width: 164px;
  height: 133px;
}

.bubbles {
  top: 731px;
}

.bubbles .logo-link {
  top: 12px;
  left: 214px;
}

.bubbles .copy {
  top: 98px;
}

.bubbles .visual {
  top: 37px;
  left: 456px;
}

.bubbles .visual img {
  width: 177px;
  height: 151px;
}

.about {
  position: absolute;
  top: 57px;
  left: 602px;
  width: 487px;
  height: 1922px;
  margin: 0 0 24px;
}

.about-grid {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 1922px;
  grid-template-rows: repeat(7, min-content) 1fr;
  grid-template-columns: 100%;
}

/* Shared alignment for the three "person" blocks (mark / title) */
.mark {
  position: relative;
  display: block;
  justify-self: start;
  align-self: start;
  width: 71px;
  height: 54px;
  object-fit: contain;
}

.about h2 {
  position: relative;
  margin: 0;
  justify-self: start;
  align-self: start;
  font: 600 28px/1.4 Pixelify, sans-serif;
  color: #fff;
  letter-spacing: 0;
}

.about-copy {
  position: relative;
  justify-self: start;
  align-self: start;
  width: 424px;
  font: 300 16px/1.4 PlexMono, monospace;
  color: #fff;
  letter-spacing: 0;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 22.4px;
}

.rule {
  box-sizing: border-box;
  position: relative;
  justify-self: start;
  align-self: start;
  width: 424px;
  height: 5px;
  border-top: 3px dashed #fff;
}

/* Each block below only carries its unique grid slot + spacing */
.intro-mark {
  margin: 34px 0 17px 18px;
  grid-area: 1 / 1 / 2 / 2;
}

.about .intro-title {
  margin: 38px 0 28px 102px;
  grid-area: 1 / 1 / 2 / 2;
  width: 341px;
}

.intro-copy {
  margin: 0 0 17px 31px;
  grid-area: 2 / 1 / 3 / 2;
}

.intro-rule {
  margin: 0 0 31px 18px;
  grid-area: 3 / 1 / 4 / 2;
}

.melchior-mark {
  margin: 0 0 64px 31px;
  grid-area: 4 / 1 / 5 / 2;
}

.about .melchior-title {
  margin: 0 0 40px 114px;
  grid-area: 4 / 1 / 5 / 2;
  width: 341px;
}

.melchior-copy {
  margin: 0 0 29px 31px;
  grid-area: 5 / 1 / 6 / 2;
}

.melchior-rule {
  margin: 0 0 35px 19px;
  grid-area: 6 / 1 / 7 / 2;
}

.roger-mark {
  margin: 0 0 44px 31px;
  grid-area: 7 / 1 / 8 / 2;
}

.about .roger-title {
  margin: 0 0 20px 124px;
  grid-area: 7 / 1 / 8 / 2;
  width: 319px;
}

.roger-copy {
  margin: 0 0 10px 31px;
  grid-area: 8 / 1 / 9 / 2;
}

/* Detail Page Shared Components */
.back-link {
  -webkit-tap-highlight-color: #0000;
  position: absolute;
  cursor: pointer;
  width: 42px;
  height: 56px;
  display: block;
  padding-top: 16px;
}

.back-link svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
}

.back-link:hover {
  opacity: 0.7;
}

/* Detail Page Layout */
.game-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
}

.grid-top {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 40px;
  align-items: start;
}

.grid-bottom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}

.col-left-top,
.col-right-top {
  display: flex;
  flex-direction: column;
}

.logo-title {
  width: 100%;
  max-width: 418px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  padding-top: 32px;
  object-position: 50% 50%;
}

.subtitle {
  font-family: Pixelify, monospace;
  font-size: 18px;
  font-weight: 400;
  line-height: 25px;
  color: #ccc;
  margin-bottom: 28px;
}

.tagline {
  font-family: Pixelify, sans-serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 24px 0;
  color: #fff;
}

.description {
  font-family: PlexMono, monospace;
  font-size: 17px;
  line-height: 1.5;
  color: #ddd;
  margin-bottom: 28px;
}

.description p {
  margin: 0 0 16px 0;
}

.meta-block {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}

.store-icon {
  width: 117px;
  height: auto;
  flex-shrink: 0;
}

.meta-info {
  font-family: PlexMono, monospace;
  font-size: 16px;
  line-height: 22px;
  color: #ccc;
}

.meta-info p {
  margin: 0;
}

.hero-cover {
  width: 100%;
  height: auto;
  display: block;
  padding-top: 32px;
}

.hero-cover-mobile {
  display: none;
}

.hero-cover-desktop {
  display: block;
}

.characters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 540px;
  margin: 28px auto;
}

.char-portrait {
  width: 115px;
  height: auto;
  display: block;
}

.props-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cargo-ship {
  height: 269px;
  width: auto;
  display: block;
  object-fit: contain;
}

.anchor-sack {
  height: 127px;
  width: auto;
  display: block;
  object-fit: contain;
}

.portraits-mobile,
.props-mobile {
  display: none;
}

.stacked-props {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 28px;
}

.cat-faces-mobile,
.background-mobile {
  display: none;
}

.satellites-desktop {
  display: block;
  max-height: 119px;
  width: auto;
}

.chars-img {
  max-height: 205px;
  width: auto;
}

.bubbles-props {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  gap: 20px;
}

.bubbles-props img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.satellites-mobile {
  display: none;
}

.attributes-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: max-content;
  padding: 8px;
}

.section-heading {
  font-family: Pixelify, sans-serif;
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
  margin: 0 0 18px 0;
  text-align: center;
}

.radar-chart {
  width: 100%;
  max-width: 352px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.centered-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.gameplay-gif {
  width: 100%;
  height: auto;
  display: block;
}

.footer-container {
  margin-top: 40px;
}

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

/* Responsive Styles */
@media (max-width: 1090px) {
  .page {
    padding: 0 8px 40px;
  }
  
  .page-index {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 auto;
    padding-bottom: 70px;
  }

  .back-link {
    left: 16px;
  }

  .top {
    position: static;
    width: 100%;
    height: auto;
    padding: 28px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .social {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    margin: 0 auto 20px;
  }

  .banner {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    width: min(360px, 80%);
    height: auto;
    margin: 0 auto;
  }

  .projects {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 648px;
    height: auto;
    margin: 48px auto 0;
  }

  .projects h1 {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 0 42px;
    font-size: 48px;
    line-height: 1.2;
    text-align: left;
  }

  .project {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 auto 24px;
    padding: 28px 20px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project .logo-link,
  .project .copy,
  .project .visual {
    position: relative;
    top: auto;
    left: auto;
  }

  .project .logo-link {
    margin: 0 auto 24px;
  }

  .project .copy {
    width: min(310px, 100%);
    margin: 0 auto;
    text-align: center;
  }

  .project .visual {
    margin: 28px auto 0;
    display: flex;
    justify-content: center;
  }

  .about {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 600px;
    height: auto;
    min-height: 0;
    margin: 48px auto 0;
  }

  .about-grid {
    width: 100%;
    min-height: 0;
    height: auto;
    grid-template-columns: 71px minmax(0, 1fr);
    grid-template-rows: repeat(8, auto);
  }

  .about .intro-title,
  .about .melchior-title,
  .about .roger-title {
    width: auto;
  }

  .about h2,
  .about-copy,
  .rule {
    width: auto;
  }

  .intro-mark {
    grid-area: 1 / 1 / 2 / 2;
    margin: 28px 0 18px 18px;
  }

  .about .intro-title {
    grid-area: 1 / 2 / 2 / 3;
    margin: 32px 18px 20px 14px;
  }

  .intro-copy {
    grid-area: 2 / 1 / 3 / 3;
    margin: 0 24px 20px;
  }

  .intro-rule {
    grid-area: 3 / 1 / 4 / 3;
    margin: 0 18px 32px;
  }

  .melchior-mark {
    grid-area: 4 / 1 / 5 / 2;
    margin: 0 0 18px 18px;
  }

  .about .melchior-title {
    grid-area: 4 / 2 / 5 / 3;
    margin: 0 18px 20px 14px;
  }

  .melchior-copy {
    grid-area: 5 / 1 / 6 / 3;
    margin: 0 24px 20px;
  }

  .melchior-rule {
    grid-area: 6 / 1 / 7 / 3;
    margin: 0 18px 32px;
  }

  .roger-mark {
    grid-area: 7 / 1 / 8 / 2;
    margin: 0 0 18px 18px;
  }

  .about .roger-title {
    grid-area: 7 / 2 / 8 / 3;
    margin: 0 18px 20px 14px;
  }

  .roger-copy {
    grid-area: 8 / 1 / 9 / 3;
    margin: 0 24px 28px;
  }

  .hero-cover-mobile {
    display: block;
    padding-top: 0;
    margin-bottom: 24px;
  }

  .hero-cover-desktop {
    display: none;
  }
  
  .grid-top,
  .grid-bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .grid-top > *,
  .grid-bottom > * {
    min-width: 0;
  }

  .attributes-container {
    width: 100%;
  }

  .characters-row {
    max-width: 100%;
    gap: 8px;
  }

  .char-portrait {
    width: min(115px, 28%);
  }

  .props-center {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cargo-ship,
  .anchor-sack {
    width: auto;
    height: auto;
  }

  .cargo-ship {
    max-height: min(269px, 45vw);
    max-width: 55%;
  }

  .anchor-sack {
    max-height: min(127px, 22vw);
    max-width: 35%;
  }

  .bubbles-props {
    justify-content: center;
  }

  .bubbles-props img {
    max-width: 100%;
    height: auto;
  }

  .characters-row-desktop {
    display: none;
  }

  .portraits-mobile {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
  }

  .props-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
  }

  .stacked-props-desktop {
    display: none;
  }

  .cat-faces-mobile {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 24px;
  }

  .background-mobile {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 28px;
  }

  .satellites-desktop {
    display: none;
  }

  .satellites-mobile {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 28px;
  }
}
